Information processing method and device, electronic equipment, server and storage medium
By generating verification codes in IoT devices, the server pressure caused by one-way data reporting from IoT devices is solved, thereby reducing communication frequency and enabling rapid location of device alarms.
Patent Information
- Application Number
- CN202310506496.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-05-06
AI Technical Summary
The one-way data reporting method of IoT devices leads to excessive server pressure and high communication frequency.
By generating a verification code on the master device and sending it to the server based on the operating data of the slave and master devices at a preset time period, the communication frequency is reduced.
It reduces server load, improves communication efficiency, and enables quick and accurate location of device alarm issues.
Smart Images

Figure CN116633756B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to an information processing method and device, an electronic device, a server and a storage medium. BACKGROUND
[0002] The current data reporting mode commonly used in Internet of Things devices is one-way reporting to a server, and each device reports each piece of data individually. When there are too many devices, the communication frequency is large, which causes excessive pressure on the server. SUMMARY
[0003] To solve the problems in the related art, the present application provides an information processing method and device, an electronic device, a server and a storage medium, which can reduce the communication frequency and thus reduce the pressure on the server.
[0004] An information processing method is provided in an embodiment of the present application and applied to an electronic device, comprising:
[0005] In a case where the electronic device is a master device and running data of a slave device in a same network group as the master device is acquired, a check code is generated based on the running data of the slave device and the running data of the master device.
[0006] The check code is sent to a server based on a preset time period.
[0007] In some embodiments, the running data includes device alarm information, and the method further comprises:
[0008] Determining whether device alarm information of the slave device is received;
[0009] In a case where device alarm information of a target slave device is not received within a preset time length, generating the device alarm information of the target slave device to acquire the device alarm information of the slave device.
[0010] In some embodiments, the device alarm information includes an alarm marker bit, alarm information and a device network identifier, in a case where the alarm marker bit is a first marker, it is represented that there is new alarm in the device alarm information, and in a case where the alarm marker bit is a second marker, it is represented that there is no new alarm in the device alarm information, and the generation of the device alarm information of the target slave device comprises:
[0011] Determining that the alarm marker of the target slave device is the first marker;
[0012] Filling the alarm information of the target slave device as target alarm information;
[0013] generate device alarm information of the target slave device based on the first flag, the target alarm information and the device network identifier of the target slave device.
[0014] In some embodiments, the method further comprises:
[0015] sorting based on the connection sequence of the slave device and the master device to obtain a sorting result;
[0016] compressing and encrypting the device alarm information of the slave device and the device alarm information of the master device based on the sorting result to generate a check code.
[0017] In some embodiments, the method further comprises:
[0018] obtaining communication information of each electronic device under the same network group;
[0019] setting a target electronic device as a master device and setting other electronic devices as slave devices based on the communication information.
[0020] In some embodiments, the method further comprises
[0021] storing device alarm information of the master device in a first period;
[0022] In the case that a first alarm information appears in a second period, determining whether a second alarm information in the device alarm information of the first period is the same as the first alarm information, wherein the first period is a previous period of the second period;
[0023] In the case that the second alarm information is the same as the first alarm information, setting a device alarm flag bit in the device alarm information of the first period as a second flag to obtain the device alarm information of the second period;
[0024] In the case that the second alarm information is different from the first alarm information, setting a device alarm flag bit in the device alarm information of the first period as a first flag to obtain the device alarm information of the second period.
[0025] In some embodiments, the method further comprises:
[0026] In the case that the electronic device is a slave device and a first alarm information appears in a second period, determining whether a second alarm information in the device alarm information of the first period is the same as the first alarm information, wherein the first period is a previous period of the second period;
[0027] In a case where the second alarm information is the same as the first alarm information, setting a device alarm mark bit in the device alarm information of the first period to a second mark to obtain device alarm information of a second period, and sending the device alarm information of the second period to the master device;
[0028] In a case where the second alarm information is different from the first alarm information, setting a device alarm mark bit in the device alarm information of the first period to a first mark to obtain device alarm information of a second period, and sending the device alarm information of the second period to the master device.
[0029] Embodiments of the present application provide a method for processing information, applied to a server, comprising:
[0030] obtaining a check code of a current period sent by a master device, the check code being generated by the master device based on running data of the slave device and running data of the master device;
[0031] comparing the check code of the current period with a check code of a previous period of the current period to obtain a comparison result;
[0032] determining whether there is a new alarm for the master device and the slave device based on the comparison result.
[0033] Embodiments of the present application provide a device for processing information, comprising:
[0034] a generating module configured to, in a case where the electronic device is a master device and running data of a slave device under the same network as the master device is obtained, generate a check code based on the running data of the slave device and running data of the master device;
[0035] a sending module configured to send the check code to a server based on a preset time period.
[0036] Embodiments of the present application provide a device for processing information, comprising:
[0037] a obtaining module configured to obtain a check code of a current period sent by a master device, the check code being generated by the master device based on running data of a slave device and running data of the master device;
[0038] a comparing module configured to compare the check code of the current period with a check code of a previous period of the current period to obtain a comparison result;
[0039] a determining module configured to determine whether there is a new alarm for the master device and the slave device based on the comparison result.
[0040] Embodiments of the present application provide an electronic device, comprising:
[0041] A memory and a processor, the memory has a computer program stored thereon, the computer program is executed by the processor to execute the information processing method of any one of the above.
[0042] The embodiment of the present application provides a storage medium, the storage medium stores a computer program, the computer program can be executed by one or more processors, and the computer program can be used to implement the information processing method of any one of the above.
[0043] The information processing method, device, electronic device, server and storage medium provided by the present application can reduce the communication frequency, and thus reduce the pressure of the server. BRIEF DESCRIPTION OF DRAWINGS
[0044] The present application will be described in more detail below based on the embodiments and with reference to the drawings.
[0045] Figure 1 The implementation flowchart of the information processing method provided by the embodiment of the present application is shown in the figure.
[0046] Figure 2 The implementation flowchart of another information processing method provided by the embodiment of the present application is shown in the figure.
[0047] Figure 3 The flowchart of the information processing method provided by the embodiment of the present application is shown in the figure.
[0048] Figure 4 The composition structure diagram of the electronic device provided by the embodiment of the present application is shown in the figure.
[0049] In the drawings, the same components are denoted by the same reference numerals, and the drawings are not drawn according to the actual scale. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be described in further detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0051] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0052] If the application file appears "first\second\third" similar description to add the following description, in the following description, the term "first\second\third" is only to distinguish similar objects, not represent the specific order of the object, can be understood, "first\second\third" can be exchanged in the specific order or the order of precedence, as far as possible, to enable the application described herein to be implemented in addition to the order illustrated or described.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification is for the purpose of describing only the embodiments of this application and is not intended to be limiting.
[0054] Based on the problems in the related art, the embodiments of the present application provide an information processing method, which is applied to an electronic device, which can be a mobile terminal, a computer, etc., and can be a smart home device. The electronic device can be a controller of a smart home device, which can include an air conditioner, a refrigerator, a television, etc.
[0055] The information processing method provided by the embodiments of the present application can realize the functions by calling program codes by the processor of the electronic device, wherein the program codes can be saved in a computer storage medium.
[0056] The embodiments of the present application provide an information processing method, Figure 1 The implementation flowchart of the information processing method provided by the embodiments of the present application is shown in Figure 1 As shown, it comprises:
[0057] In step S1, in the case that the electronic device is a master device and the running data of a slave device in the same network group as the master device is acquired, a check code is generated based on the running data of the slave device and the running data of the master device.
[0058] In the embodiments of the present application, each electronic device can compete, so as to determine one electronic device as a master device and at least one slave device from the electronic devices, and the master device communicates with the server.
[0059] In the embodiments of the present application, each electronic device has a networking function and can forward data.
[0060] In the embodiments of the present application, only one master device in a network group communicates with the server, the slave devices in the network group communicate with the master device, and each slave device is connected to the master device. The devices in the network can be connected through WiFi, Bluetooth, etc.
[0061] In this embodiment of the application, the operating data may include: device alarm information.
[0062] In this embodiment of the application, the method of obtaining the operating data of the device may include: directly obtaining the operating data of each slave device from each slave device, or directly receiving the operating data of each slave device from some slave devices and the master device can automatically generate the operating data of electronic devices that have not been received.
[0063] In this embodiment, the device alarm information sent by the slave device and the master device can be sorted according to the order in which they are connected to obtain a sorting result; based on the sorting result, the device alarm information sent by the slave device and the device alarm information of the master device are compressed and encrypted to generate a verification code.
[0064] In this embodiment of the application, the encryption algorithm can be configured.
[0065] Step S2: Send the verification code to the server based on a preset time period.
[0066] In this embodiment of the application, the preset time period can be configured. For example, the preset time period can be configured to be 5 minutes, 10 minutes, etc.
[0067] In this embodiment of the application, the master device can send the verification code to the server via the network.
[0068] In this embodiment of the application, the server can verify the checksum and process it. In this embodiment, the server's processing of the checksum includes: comparing the checksum of the current period with the checksum of the previous period to obtain a comparison result; and determining whether there are any new alarms in the master device and the slave device based on the comparison result.
[0069] In this embodiment, since only the master device sends the verification code to the server, while the slave device does not need to send data to the server, by having the electronic device as the master device and obtaining the operating data of the slave device in the same network as the master device, a verification code is generated based on the operating data of the slave device and the operating data of the master device; the verification code is sent to the server based on a preset time period, which can reduce the communication frequency and thus reduce the pressure on the server.
[0070] In some embodiments, the operating data includes: device alarm information; prior to step S1, the method further includes:
[0071] Step S11: Determine whether the device alarm information of the slave device has been received.
[0072] In this embodiment of the application, under the same network, the master device has device information of all slave devices, and the master device can determine whether it has received device alarm information sent by all slave devices.
[0073] In this embodiment of the application, if no device alarm information is received from the slave device, the system continues to wait for a preset period of time.
[0074] Step S12: If no device alarm information of the target slave device is received within a preset time period, generate device alarm information of the target slave device to obtain the device alarm information of the slave device.
[0075] In this embodiment of the application, the preset duration can be configured. For example, the preset duration can be set to 5 seconds.
[0076] In this embodiment of the application, the target device is an electronic device that has not received device alarm information.
[0077] In this embodiment, the device alarm information includes: an alarm tag, alarm information, and a device network identifier. The device alarm information can be represented as: tag (tag), mac (device network identifier), or info (alarm information). In this embodiment, when the alarm tag is a first tag, it indicates that a new alarm exists in the device alarm information; when the alarm tag is a second tag, it indicates that no new alarm exists in the device alarm information.
[0078] In this embodiment of the application, the alarm flag can be represented by tag, the first flag can be represented by 1, and the second flag can be represented by 0.
[0079] In this embodiment of the application, generating the device alarm information of the target slave device includes:
[0080] Step S121: Determine the alarm flag of the target slave device as the first flag.
[0081] Following the example above, set the tag to 1.
[0082] Step S122: Fill the target slave device's alarm information into target alarm information.
[0083] In this embodiment of the application, the target alarm information may be that the device has not reported it.
[0084] Step S123: Generate device alarm information for the target slave device based on the first tag, the target alarm information, and the device network identifier of the target slave device.
[0085] In this embodiment of the application, the device network identifier can be the device MAC address.
[0086] In some embodiments, prior to step S1, the method further includes:
[0087] Step S101: Obtain the communication information of each electronic device in the same network.
[0088] In this embodiment of the application, the communication information may include: communication signal strength and communication signal stability.
[0089] Step S102: Based on the communication information, set one target electronic device as the master device and set the other electronic devices other than the target electronic device as slave devices.
[0090] In this embodiment of the application, the target electronic device with the strongest signal and the most stable communication signal can be determined as the master device, and other electronic devices other than the target electronic device can be set as slave devices.
[0091] In some embodiments, the master and slave devices can also be configured by the user.
[0092] In some embodiments, during the processing of each cycle, the method further includes:
[0093] Step S201: Store the device alarm information of the first cycle of the main device.
[0094] In this embodiment of the application, each electronic device is equipped with a cache, and the master device can cache the device alarm information of the first cycle.
[0095] Step S202: If the first alarm information appears in the second cycle, determine whether the second alarm information in the device alarm information of the first cycle is the same as the first alarm information, wherein the first cycle is the previous cycle of the second cycle.
[0096] In this embodiment of the application, the first cycle and the second cycle can be any two adjacent cycles in the processing.
[0097] Step S203: If the second alarm information is the same as the first alarm information, set the device alarm flag bit in the device alarm information of the first cycle to the second flag to obtain the device alarm information of the second cycle.
[0098] If the first alarm message is the same as the second alarm message, it means there are no new alarms. Continuing with the example above, setting the tag to 0 will retrieve the device alarm messages for the second cycle.
[0099] Step S204: If the second alarm information is different from the first alarm information, set the device alarm flag bit in the device alarm information of the first cycle to the first flag to obtain the device alarm information of the second cycle.
[0100] In this embodiment, if the second alarm information differs from the first alarm information, it indicates that a new alarm has occurred. Continuing with the example above, setting the tag to 1 will retrieve the device alarm information for the second period.
[0101] In this embodiment of the application, the master device can generate a device alarm signal based on its own alarm information.
[0102] In some embodiments, electing one of the electronic devices can also be a slave device. When the electronic device is a slave device and a first alarm message appears in the second cycle, it is determined whether the second alarm message stored in the device alarm message of the first cycle is the same as the first alarm message, wherein the first cycle is the previous cycle of the second cycle; if the second alarm message is the same as the first alarm message, the device alarm flag bit in the device alarm message of the first cycle is set to a second flag to obtain the device alarm message of the second cycle, and the device alarm message of the second cycle is sent to the master device; if the second alarm message is different from the first alarm message, the device alarm flag bit in the device alarm message of the first cycle is set to a first flag to obtain the device alarm message of the second cycle, and the device alarm message of the second cycle is sent to the master device.
[0103] Based on the foregoing embodiments, this application further provides an information processing method, which is applied to a server. Figure 2 A schematic diagram illustrating the implementation flow of another information processing method provided in this application embodiment is shown below. Figure 2 As shown, it includes:
[0104] Step S21: Obtain the current period's verification code sent by the master device. The verification code is generated by the master device based on the slave device's operating data and the master device's operating data.
[0105] In this embodiment of the application, the operating data may be device alarm information.
[0106] Step S22: Compare the check code of the current period with the check code of the previous period to obtain the comparison result.
[0107] In this embodiment of the application, the server is provided with a cache area, which is used to store the check code of the previous period.
[0108] In this embodiment of the application, the server can decompress and decrypt the verification code before comparison.
[0109] Step S23: Based on the comparison results, determine whether there are any new alarms in the master device and the slave device.
[0110] In this embodiment, the server can obtain device information of devices with a flag bit set to 1, thereby enabling alarm location of the devices. This embodiment allows for accurate and rapid identification of the problematic device.
[0111] Based on the foregoing embodiments, this application provides an information processing method, which is applied to an information processing system, the information processing system including: a slave device, a master device, and a server.
[0112] In this embodiment, within the same network, a master device transmits information to the server. Each slave device reports its own alarm information to the master device in the network based on its own situation. The master device generates a unique checksum by combining the alarm information according to certain rules. The checksum contains the anchor point information of each device in the network. The master device uploads this checksum to the server. The server only checks whether the checksum has changed each time. If they match, it means that the alarm has not changed. If they do not match, the problematic device can be quickly located through the anchor point. In this way, the server load can be effectively reduced, and the problematic device can be found accurately and quickly.
[0113] In this embodiment, the implementing entity is a home appliance. These appliances are required to have network connectivity and data forwarding capabilities. Only one master device connects to the server within a network. Slave devices communicate with the master device, and each slave device connects to the master device. Each slave device forwards its own operational data to the master device. The master device processes the information, generates a verification code, and uploads it to the server. The server compares the verification code uploaded by the master device with the verification code previously uploaded by that device to determine if any new alarm information has appeared. Each device has a certain amount of cache space to record its most recent forwarded information to the master device. The main fields of the device alarm information forwarded by the device to the master device are: tag (marker bit), mac (its own MAC address), and info (alarm information). The networking methods between devices include, but are not limited to, WiFi, Bluetooth, etc., for the purpose of data transmission between devices.
[0114] Figure 3 This is a flowchart illustrating an information processing method provided in an embodiment of this application, as shown below. Figure 3 As shown, it includes:
[0115] If different devices in the same space are all under the same network, then a master device is selected among the devices under that network to connect to the server.
[0116] Each slave device periodically forwards its own information to the master device. If a new alarm message is generated, the tag bit is set to 1, the device MAC address is filled in and the alarm message is forwarded to the master device, and the device's own cache is updated at the same time. If no alarm message is generated, or the alarm message is the same as the alarm message in the cache, the tag bit is set to 0, the device MAC address is filled in, the alarm message is set to empty and forwarded to the master device, without updating the device's own cache.
[0117] The main device collects alarm information forwarded by devices in the network, determines whether it has received alarm information from all devices, and waits if there are any devices that have not received alarm information. If it still has not received alarm information after waiting for a certain period of time, it determines that there is a problem with the device, marks the position as 1, and fills in the alarm information (the device has not reported).
[0118] Once all device data has been recorded (including devices for which no data has been received and the main device has filled in the records), the main device sorts the recorded device information, compresses and encrypts it using an algorithm, generates a string of verification codes, and uploads it to the server.
[0119] The server receives the verification code reported by the master device, retrieves the verification code previously reported by the master device from the database, compares it with the current verification code. If they match, it determines that no new alarm information has been generated by any device in the network. If they do not match, the server updates the verification code in the database, decrypts it by calling the appropriate method, obtains the device information with the flag bit set to 1, obtains the alarm information of that device, and performs subsequent processing operations.
[0120] In this embodiment of the application, the main device can be nominated by the devices themselves through other inherent algorithms to compete and nominate the device with the best and most stable communication, or it can be specified by the user.
[0121] In this application embodiment, the self-information refers to tag (marker bit), mac (self-MAC information), and info (alarm information);
[0122] In this embodiment of the application, the waiting time is determined according to the program's running status and is related to the time when the device reports on a schedule. It is tentatively set that the device reports every 10 minutes and the main device waits for 5 seconds each time.
[0123] Once the master device is determined, a fixed order of devices in this network is established, and the subsequent order can be determined by the order in which each device connects to the master device for the first time.
[0124] The information processing method provided in this application only checks the verification code uploaded by the main device each time, which effectively reduces the pressure on the server side and can accurately and quickly find problematic devices and alarm information.
[0125] Based on the foregoing embodiments, this application provides an information processing device. The modules and units included in the device can be implemented by a processor in a computer device; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0126] This application provides an information processing apparatus, which includes:
[0127] The generation module is used to generate a verification code based on the operating data of the slave device and the operating data of the master device when the electronic device is the master device and the operating data of the slave device in the same network as the master device are obtained;
[0128] The sending module is used to send the verification code to the server based on a preset time period.
[0129] In some embodiments, the operating data includes: device alarm information, and the information processing device is further configured to:
[0130] Determine whether the device alarm information from the slave device has been received;
[0131] If no device alarm information from the target slave device is received within a preset time period, device alarm information from the target slave device is generated to obtain the device alarm information from the slave device.
[0132] In some embodiments, the device alarm information includes: an alarm flag bit, alarm information, and a device network identifier. When the alarm flag bit is a first flag, it indicates that a new alarm exists in the device alarm information; when the alarm flag bit is a second flag, it indicates that no new alarm exists in the device alarm information. Generating the device alarm information for the target slave device includes:
[0133] The target device's alarm flag is determined to be the first flag;
[0134] The alarm information of the target slave device is filled into the target alarm information;
[0135] The device alarm information of the target slave device is generated based on the first tag, the target alarm information, and the device network identifier of the target slave device.
[0136] In some embodiments, generating a verification code based on the device alarm information sent by the slave device and the device alarm information of the master device includes:
[0137] The slave devices are sorted according to the order in which they are connected to the master device, and the sorting result is obtained.
[0138] Based on the sorting result, the device alarm information sent by the slave device and the device alarm information of the master device are compressed and encrypted to generate a verification code.
[0139] In some embodiments, the information processing apparatus is further configured to:
[0140] To obtain communication information of various electronic devices within the same network;
[0141] Based on the communication information, one target electronic device is set as the master device, and the other electronic devices are set as slave devices.
[0142] In some embodiments, the information processing apparatus is further configured to:
[0143] Store the device alarm information for the first cycle of the main device;
[0144] If the first alarm message appears in the second cycle, determine whether the second alarm message in the device alarm message of the first cycle is the same as the first alarm message, wherein the first cycle is the cycle before the second cycle;
[0145] If the second alarm information is the same as the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the second flag to obtain the device alarm information of the second cycle;
[0146] If the second alarm information is different from the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the first flag to obtain the device alarm information of the second cycle.
[0147] In some embodiments, the information processing apparatus is further configured to:
[0148] When the electronic device is a slave device and the first alarm information appears in the second cycle, it is determined whether the second alarm information in the device alarm information stored in the first cycle is the same as the first alarm information, wherein the first cycle is the previous cycle of the second cycle;
[0149] If the second alarm information is the same as the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the second flag to obtain the device alarm information of the second cycle, and the device alarm information of the second cycle is sent to the master device.
[0150] If the second alarm information is different from the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the first flag to obtain the device alarm information of the second cycle, and the device alarm information of the second cycle is sent to the master device.
[0151] In some embodiments, this application further provides an information processing apparatus, the information processing apparatus comprising:
[0152] The acquisition module is used to acquire the current period's verification code sent by the master device. The verification code is generated by the master device based on the operating data of the slave device and the operating data of the master device.
[0153] The comparison module is used to compare the check code of the current period with the check code of the previous period to obtain the comparison result.
[0154] The determination module is used to determine whether there are any new alarms in the master device and the slave device based on the comparison results.
[0155] It should be noted that, in the embodiments of this application, if the above-mentioned information processing method is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0156] Accordingly, this application provides a storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps in the information processing method provided in the above embodiments.
[0157] This application provides an electronic device; Figure 4 This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application, such as... Figure 4 As shown, the electronic device 400 includes: a processor 401, at least one communication bus 402, a user interface 403, at least one external communication interface 404, and a memory 405. The communication bus 402 is configured to enable communication between these components. The user interface 403 may include a display screen, and the external communication interface 404 may include standard wired and wireless interfaces. The processor 401 is configured to execute a program for processing information stored in the memory, to implement the steps in the information processing method provided in the above embodiments.
[0158] In some embodiments, this application also provides a server for performing the methods described above.
[0159] It should be noted that the descriptions of the storage media, electronic devices, and server embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage media and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0160] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0161] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, object, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, object, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, object, or apparatus that includes that element.
[0162] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0163] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0164] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0165] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0166] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0167] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An information processing method, characterized in that, Applied to electronic devices, including: When the electronic device is the master device and obtains the operating data of the slave device in the same network as the master device, a checksum is generated based on the operating data of the slave device and the operating data of the master device; wherein, the operating data includes device alarm information; the device alarm information includes: alarm flag bit, alarm information and device network identifier; when the alarm flag bit is a first flag, it indicates that there is a new alarm in the device alarm information, and when the alarm flag bit is a second flag, it indicates that there is no new alarm in the device alarm information; The verification code is sent to the server based on a preset time period; The method further includes: Determine whether the device alarm information from the slave device has been received; If no device alarm information from the target slave device is received within a preset time period, device alarm information of the target slave device is generated to obtain the device alarm information of the slave device; wherein, generating the device alarm information of the target slave device includes: The target device's alarm flag is designated as the first flag; The alarm information of the target slave device is filled into target alarm information; wherein, the target alarm information includes alarms that the device has not reported; The device alarm information of the target slave device is generated based on the first tag, the target alarm information, and the device network identifier of the target slave device.
2. The method according to claim 1, characterized in that, The step of generating a verification code based on the device alarm information sent by the slave device and the device alarm information of the master device includes: The slave devices are sorted according to the order in which they are connected to the master device, and the sorting result is obtained. Based on the sorting result, the device alarm information sent by the slave device and the device alarm information of the master device are compressed and encrypted to generate a verification code.
3. The method according to claim 1, characterized in that, The method further includes: To obtain communication information of various electronic devices within the same network; Based on the communication information, one target electronic device is set as the master device, and the other electronic devices are set as slave devices.
4. The method according to claim 3, characterized in that, The method also includes Store the device alarm information for the first cycle of the main device; If the first alarm message appears in the second cycle, determine whether the second alarm message in the device alarm message of the first cycle is the same as the first alarm message, wherein the first cycle is the cycle before the second cycle; If the second alarm information is the same as the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the second flag to obtain the device alarm information of the second cycle; If the second alarm information is different from the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the first flag to obtain the device alarm information of the second cycle.
5. The method according to claim 3, characterized in that, The method further includes: When the electronic device is a slave device and the first alarm information appears in the second cycle, it is determined whether the second alarm information in the device alarm information stored in the first cycle is the same as the first alarm information, wherein the first cycle is the previous cycle of the second cycle; If the second alarm information is the same as the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the second flag to obtain the device alarm information of the second cycle, and the device alarm information of the second cycle is sent to the master device. If the second alarm information is different from the first alarm information, the device alarm flag bit in the device alarm information of the first cycle is set to the first flag to obtain the device alarm information of the second cycle, and the device alarm information of the second cycle is sent to the master device.
6. An information processing method, characterized in that, Applied to servers, including: The master device obtains the current period's checksum sent by the master device. The checksum is generated by the master device based on the operating data of the slave device and the master device's operating data. The operating data includes device alarm information. The device alarm information includes an alarm flag, alarm details, and a device network identifier. When the alarm flag is a first flag, it indicates that a new alarm exists; when the alarm flag is a second flag, it indicates that no new alarm exists. The master device further includes the following steps when sending the checksum: Determine whether the device alarm information from the slave device has been received; If no device alarm information from the target slave device is received within a preset time period, device alarm information of the target slave device is generated to obtain the device alarm information of the slave device; wherein, generating the device alarm information of the target slave device includes: The target device's alarm flag is designated as the first flag; The alarm information of the target slave device is filled into target alarm information; wherein, the target alarm information includes alarms that the device has not reported; The device alarm information of the target slave device is generated based on the first tag, the target alarm information, and the device network identifier of the target slave device; The check code of the current period is compared with the check code of the previous period to obtain the comparison result. Based on the comparison results, it is determined whether there are any new alarms in the master device and the slave device.
7. An information processing apparatus, characterized in that, include: A generation module is used to generate a checksum based on the operating data of the slave device and the operating data of the master device when the electronic device is the master device and the operating data of the slave device in the same network as the master device are obtained; wherein, the operating data includes device alarm information; the device alarm information includes: alarm flag bit, alarm information and device network identifier; when the alarm flag bit is a first flag, it indicates that there is a new alarm in the device alarm information, and when the alarm flag bit is a second flag, it indicates that there is no new alarm in the device alarm information; The sending module is used to send the verification code to the server based on a preset time period; The processing device is also used for: Determine whether the device alarm information from the slave device has been received; If no device alarm information from the target slave device is received within a preset time period, device alarm information of the target slave device is generated to obtain the device alarm information of the slave device; wherein, generating the device alarm information of the target slave device includes: The target device's alarm flag is designated as the first flag; The alarm information of the target slave device is filled into target alarm information; wherein, the target alarm information includes alarms that the device has not reported; The device alarm information of the target slave device is generated based on the first tag, the target alarm information, and the device network identifier of the target slave device.
8. An information processing device, characterized in that, include: The acquisition module is used to acquire the checksum of the current period sent by the master device. The checksum is generated by the master device based on the operating data of the slave device and the master device's operating data. The operating data includes device alarm information. The device alarm information includes: an alarm flag bit, alarm information, and a device network identifier. When the alarm flag bit is a first flag, it indicates that a new alarm exists; when the alarm flag bit is a second flag, it indicates that no new alarm exists. The master device also includes the following steps when sending the checksum: Determine whether the device alarm information from the slave device has been received; If no device alarm information from the target slave device is received within a preset time period, device alarm information of the target slave device is generated to obtain the device alarm information of the slave device; wherein, generating the device alarm information of the target slave device includes: The target device's alarm flag is designated as the first flag; The alarm information of the target slave device is filled into target alarm information; wherein, the target alarm information includes alarms that the device has not reported; The device alarm information of the target slave device is generated based on the first tag, the target alarm information, and the device network identifier of the target slave device; The comparison module is used to compare the check code of the current period with the check code of the previous period to obtain the comparison result. The determination module is used to determine whether there are any new alarms in the master device and the slave device based on the comparison results.
9. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs the method as described in any one of claims 1 to 6.
10. A storage medium, characterized in that, The computer program stored in the storage medium can be executed by one or more processors and can be used to implement the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Two-dimensional code communication method for transformer substation
CN110113198A
Power supply power failure alarm monitoring method, device and system
CN110677286A