Information processing method, device, equipment and storage medium
Patent Information
- Application Number
- CN202110897892.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-05
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-08-05
AI Technical Summary
In the transmission of alarm information of smart home devices, the alarm hosting device record table has a large amount of data, resulting in a long loading time, which reduces the real-time nature of alarm information transmission.
The target device to activate the target service is determined by using the service status vector in the first server, and its alarm information is sent to the second server. The service status vector has a smaller amount of data, which reduces processing time and improves the real-time nature of alarm information transmission.
This solution reduces processing time, improves the real-time transmission of alarm information of smart home devices, and solves the problem of delay in alarm information transmission in the prior art.
Smart Images

Figure CN115941429B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and is related to but not limited to information processing methods, devices, equipment and storage media. Background Art
[0002] With the continuous development of Internet of Things (IOT) technology and smart home technology, it is of great significance to obtain the alarm information of smart home devices and send the alarm information of each smart home device to the community server in a timely manner.
[0003] In the related technology, smart home devices report the information collected by each smart home device to the IOT server; the IOT server first determines the alarm information of the alarm device based on the reported information, and then loads the alarm hosting device record table from the community server, and based on the alarm hosting device record table, determines the device that has activated the alarm hosting service in the alarm device, and then sends the alarm information of the target device to the community server.
[0004] It can be seen that in the related technology, when determining the devices for which the alarm hosting service is activated, it is necessary to load the alarm hosting device record table from the community server. Since the alarm hosting device record table records the devices for which the alarm hosting service is activated and the devices for which the alarm hosting service is not activated, etc., the data volume is large and the loading time is long, resulting in low real-time transmission of alarm information. Summary of the invention
[0005] The present application provides an information processing method and apparatus, equipment, and storage medium, which can improve the real-time transmission of alarm information.
[0006] The technical solution of this application is implemented as follows:
[0007] The present application provides an information processing method, which is applied to a first server and includes:
[0008] Obtaining alarm information of each of the at least one alarm device; the alarm device is a terminal device that meets the alarm condition;
[0009] Determine a target device in the at least one alarm device based on a service state vector; the target device is a terminal device that activates a target service; the service state vector is used to indicate whether each of the at least one alarm device activates the target service;
[0010] The alarm information of the target device is sent to the second server.
[0011] The present application provides an information processing device, which is deployed on a first server and is characterized in that the device includes:
[0012] An obtaining unit, used to obtain alarm information of each alarm device in at least one alarm device; the alarm device is a terminal device that meets the alarm condition;
[0013] A determination unit, configured to determine a target device in the at least one alarm device based on a service state vector; the target device is a terminal device for activating a target service; the service state vector is used to indicate whether each of the at least one alarm device activates the target service;
[0014] A sending unit is used to send the alarm information of the target device to the second server.
[0015] The present application also provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above-mentioned information processing method when executing the program.
[0016] The present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned information processing method is implemented.
[0017] The information processing method, apparatus, device and storage medium provided by the present application include: a first server obtains the alarm information of each of the at least one alarm device; the alarm device is a terminal device that meets the alarm condition; a target device is determined in the at least one alarm device based on a service state vector; the target device is a terminal device that activates the target service; the service state vector is used to characterize whether each of the at least one alarm device activates the target service; and the alarm information of the target device is sent to the second server. In this solution, the target device that activates the target service is determined in the alarm device through the service state vector; because the service state vector has a small amount of data, the processing time is reduced and the real-time transmission of the alarm information is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 An optional structural diagram of an information processing system provided in an embodiment of the present application;
[0019] Figure 2 An optional flowchart of the information processing method provided in the embodiment of the present application;
[0020] Figure 3 An optional flowchart of the information processing method provided in the embodiment of the present application;
[0021] Figure 4 An optional flowchart of the information processing method provided in the embodiment of the present application;
[0022] Figure 5 An optional flowchart of the information processing method provided in the embodiment of the present application;
[0023] Figure 6 An optional structural diagram of an IOT server provided in an embodiment of the present application;
[0024] Figure 7 An optional structural diagram of an information processing device provided in an embodiment of the present application;
[0025] Figure 8 An optional structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0027] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0028] In the following description, the terms "first\second\third" are used only as examples to distinguish different objects, and do not represent a specific order for the objects, nor do they have a limitation on the order of precedence. It is understandable that "first\second\third" can be interchanged with a specific order or order of precedence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0030] The embodiments of the present application may provide information processing methods and devices, equipment and storage media. In practical applications, the information processing method may be implemented by an information processing device, and each functional entity in the information processing device may be collaboratively implemented by hardware resources of an electronic device (such as a terminal device), such as computing resources such as a processor, and communication resources (such as for supporting various communication methods such as optical cables and cellular).
[0031] The information processing method provided in the embodiment of the present application is applied to an information processing system.
[0032] As an example, the structure of the information processing system 10 may be as follows: Figure 1 As shown, the information processing system 10 includes: at least one terminal device 101, a first server 102 and at least one second server 103; the terminal device 101 is connected to the first server 102 via a network 104, and communicates with the first server 102 via the connection; the first server 102 is connected to the second server 103 via a network 105, and communicates with the second server 103 via the connection.
[0033] The terminal device 101 is used to collect various information and report the collected information and device attribute information (such as device model, device identification, etc.) to the first server 102 through the network 104. The terminal device 101 may include various smart devices, for example, the terminal device 101 may include: smart smoke sensors, smart gas sensors, smart water sensors, smart cameras, smart TVs, smart electricity meters, smart water meters, smart air conditioners and other smart home devices.
[0034] The first server 102 is used to receive the reported information of the terminal device 101, process the reported information to obtain alarm information, and send the alarm information to the second server 103. The first server 102 is an electronic device with relevant data processing capabilities; in one example, the first server 102 can be an IOT server.
[0035] The second server 103 is used to receive the alarm information sent by the first server 102. The second server 103 is an electronic device with relevant data processing capabilities; in one example, the second server 103 is a server running a community or property management platform.
[0036] In one example, the information processing system 10 may include multiple terminal devices 101 and multiple second servers 103; wherein the multiple terminal devices 101 are deployed in multiple different areas, and one second server 103 may manage the terminal devices 101 in one area.
[0037] The network 104 is used to report the information collected by the terminal device 101 to the first server 102. The network 104 can be a local area network or a wide area network with relevant data transmission capabilities; in one example, the network 104 can be a WIFI, a Transmission Control Protocol (TCP) wide area network, or an operator's World Wide Web (Internet). The network 105 is used to send the alarm information generated by the first server 102 to the second server 103.
[0038] In the present application embodiment, based on Figure 1In the information processing system shown, the first server 102 can receive the device information reported by the terminal device 101, and execute: obtaining the alarm information of each of the at least one alarm device; the alarm device is a terminal device that meets the alarm condition; determining the target device in the at least one alarm device based on the service state vector; the target device is a terminal device that activates the target service; the service state vector is used to characterize whether each of the at least one alarm device activates the target service; and sending the alarm information of the target device to the second server.
[0039] Next, combine Figure 1 The schematic diagram of the information processing system 10 shown illustrates various embodiments of the information processing method and apparatus, device and storage medium provided in the embodiments of the present application.
[0040] In a first aspect, the present invention provides an information processing method, which is applied to Figure 1 The first server 102 is shown. The following describes the first server executing the information processing method provided in the embodiment of the present application.
[0041] Figure 2 A flowchart of an optional information processing method is shown. The information processing method provided in the embodiment of the present application may include but is not limited to Figure 2 The following S201 to S203 are shown.
[0042] S201. A first server obtains alarm information of each alarm device in at least one alarm device.
[0043] The alarm device is a terminal device that meets the alarm conditions.
[0044] The embodiments of the present application do not limit the specific content and configuration method of the alarm conditions, which can be determined according to actual needs.
[0045] In one example, the first server may configure a general alarm condition, and determine whether a terminal device is an alarm device according to the general alarm condition.
[0046] In another example, the first server may configure an alarm condition for a device model, and determine whether a terminal device is an alarm device according to the alarm condition corresponding to the device model.
[0047] In yet another example, the first server may configure an alarm condition for a device identifier, and determine whether a terminal device is an alarm device according to the alarm condition corresponding to the device identifier.
[0048] The alarm information is used to characterize the status of the alarm device; the embodiment of the present application does not limit the specific content of the alarm information and can be configured according to actual needs.
[0049] In a possible implementation, the alarm information may include one or more of the following: an alarm prompt, a device identification (Identity document, ID), an alarm level, a device model, and an alarm type.
[0050] The alarm prompt may include at least one of an alarm text prompt and an alarm icon prompt. For example, the alarm prompt may include: gas alarm!
[0051] The device identifier is used to uniquely identify a terminal device. For example, the device identifier can be a group of numbers, a group of letters, or a group of words; or a combination of numbers, letters, and words.
[0052] The alarm level is used to characterize the severity of the alarm. For example, the alarm level can be divided into low-level alarm, low-level alarm, and low-level alarm. For example, a low-level alarm may include an alarm caused by low battery; a medium-level alarm may include an alarm caused by the TV not being turned off; a high-level alarm may be a gas alarm, or an emergency call for help, etc.
[0053] The alarm types may include: power alarm, fault alarm, gas alarm, etc., wherein each alarm type may correspond to an alarm level. It is understandable that the alarm information may also include other information, which will not be listed here one by one.
[0054] The embodiment of the present application does not limit the time when the first server obtains the alarm information of each alarm device in at least one alarm device, and can be configured according to actual needs. For example, it can be obtained periodically, or based on a trigger of a certain condition, or based on a certain operation or instruction.
[0055] The implementation of S201 may include: the first server determines the terminal device that meets the alarm condition as an alarm device, obtains at least one alarm device, and then obtains the alarm information of each alarm device in the at least one alarm device.
[0056] S202: The first server determines a target device in the at least one alarm device based on a service state vector.
[0057] The target device is the terminal device that activates the target service.
[0058] The target service, also known as the alarm hosting service, is used to indicate that the alarm information of the terminal device can be centrally managed by the server, that is, the alarm information of the terminal device that has activated the target service can be sent to the server that manages the terminal device for centralized management.
[0059] The service state vector may be used to indicate whether each alarm device in at least one alarm device has activated the target service; it is understandable that the service state vector may also be used to indicate whether a non-alarm device has activated the target service.
[0060] The embodiment of the present application does not limit the specific type of the service status vector. In one example, the service status vector may be a bit vector or other types of vectors.
[0061] Since the service state vector can represent whether an alarm device has activated the target service, the implementation of S202 may include: the first server determines whether each alarm device in at least one alarm device has activated the target service based on the service state vector, and determines the alarm device that has activated the target service as the target device.
[0062] The embodiment of the present application does not limit the number of target devices obtained by the first server in S202; for example, the target device may be one or more.
[0063] S203: The first server sends the alarm information of the target device to the second server.
[0064] The second server is used to receive the alarm information. For example, the second server can be Figure 2 The second server 103 in.
[0065] In a possible implementation, the information processing system includes a second server; then the implementation of S203 may include: the first server sending the alarm information of the target device to the second server.
[0066] In another possible implementation, the information processing system includes multiple second servers, each second server manages terminal devices in one area, and the implementation of S203 may include: the first server searches for the second server that manages the target device, and sends the alarm information of the target device to the second server that manages the target device.
[0067] The embodiments of the present application do not limit the specific sending method and can be configured according to actual needs.
[0068] In an example, the sending method may include at least one of the following: a Transmission Control Protocol (TCP) message, a User Datagram Protocol (UDP message, etc.
[0069] If there are multiple target devices, the first server may send the alarm information of each target device in the multiple target devices to the second server in the same implementation manner.
[0070] In the case where the multiple target devices are managed by one second server, the first server may send the alarm information of the multiple target devices to the second server.
[0071] In the case where multiple target devices are managed by different second servers, the second server managing each target device is first determined, and then the alarm information of each target device is sent to the second server managing it. For example, if target device 1 is managed by second server 1 and target device 2 is managed by second server 2, the first server sends the alarm information of target device 1 to second server 1 and sends the alarm information of target device 2 to second server 2.
[0072] When sending the alarm information of multiple target devices, the alarm information of the multiple target devices may be sent in parallel at the same time, or the alarm information of the multiple target devices may be sent in a first order.
[0073] In one example, the sending order may include: the time sequence of obtaining the alarm information, or the sequence corresponding to the alarm levels (high-level alarms are sent first).
[0074] The information processing scheme provided by the embodiment of the present application includes: obtaining the alarm information of each of the alarm devices in at least one alarm device; the alarm device is a terminal device that meets the alarm condition; determining the target device in the at least one alarm device based on the service state vector; the target device is a terminal device that activates the target service; the service state vector is used to characterize whether each of the at least one alarm device activates the target service; and sending the alarm information of the target device to the second server. In this scheme, the target device that activates the target service is determined in the alarm device through the service state vector; because the service state vector has a small amount of data, the processing time is reduced, and the real-time transmission of the alarm information is improved.
[0075] It should be noted that the service state vector may be stored in other devices (eg, the second server), or the service state vector may also be cached in the first server.
[0076] In the case where the service status vector is stored in other devices, before executing S202, the first server first loads the service status vector through the network; in this way, on the one hand, since the service status vector has a small amount of data and a short loading time, the real-time transmission of the alarm information can be improved; on the other hand, since the service status vector is stored in other devices, the amount of storage resources of the first server can be increased.
[0077] When the service state vector is cached in the first server, on the one hand, since it is stored in the first server, it can be directly called, avoiding the loading process, thereby reducing the processing time; on the other hand, the service state vector has a smaller data volume and the processing process is simpler, further reducing the processing time.
[0078] Optionally, in order to improve the accuracy of the target device obtained, after obtaining the target device based on the service status vector, the alarm hosting device record table can be searched to further confirm the obtained target device. If the obtained target device is consistent with the record of the alarm delay device, that is, both indicate the activation of the target service, the next step is executed to send the alarm information of the target device to the second device; if the record of the obtained target device is inconsistent with the record of the alarm hosting device, the alarm hosting device record table is used as the standard to redetermine the target device, and then the alarm information of the target device is sent to the second device.
[0079] For ease of understanding, a process of establishing a service state vector is briefly described, which may specifically include but is not limited to the following steps 1 to 3.
[0080] Step 1: The first server configures a service state vector.
[0081] Specifically, the first server may configure the dimension and bit number of the service state vector.
[0082] The embodiment of the present application does not limit the dimension and the number of bits of the configured service state vector, for example, it can be configured based on actual experience or actual needs.
[0083] Among them, the larger the dimension and the number of bits of the service state vector, the higher the accuracy of obtaining the target device based on the service state vector; at the same time, the more complex the processing process is, and the longer the processing time is; the smaller the dimension and the number of bits of the service state vector, the lower the accuracy of obtaining the target device based on the service state vector; at the same time, the simpler the processing process is, and the shorter the processing time is.
[0084] Exemplarily, the first server may configure the service state vector as a 3-dimensional 1024-bit bit vector.
[0085] Step 2: The first server determines the position of the service state corresponding to each terminal device in the service state vector based on the device identification of each terminal device.
[0086] The embodiment of the present application does not specifically limit the method by which the first server determines the position of the service status corresponding to each terminal device in the service status vector.
[0087] For example, the identifier of terminal device A is A112513, and the first server obtains 00120020 after hash calculation of A112513; the first server can use the 12th bit as the position of the service status corresponding to terminal device A in the first dimension of the service status vector, the 32nd bit as the position of the service status corresponding to terminal device A in the second dimension of the service status vector, and the 52nd bit as the position of the service status corresponding to terminal device A in the third dimension of the service status vector.
[0088] For example, the identifier of terminal device B is 25CB2513, and the first server obtains 0015010 after hash calculation of 25CB2513; the first server can use the 15th bit as the position of the service status corresponding to terminal device B in the first dimension of the service status vector, the 25th bit as the position of the service status corresponding to terminal device B in the second dimension of the service status vector, and the 35th bit as the position of the service status corresponding to terminal device B in the third dimension of the service status vector.
[0089] Step 3: The first server represents the service status corresponding to each terminal device in the service status vector based on the position of the service status corresponding to each terminal device in the service status vector.
[0090] The embodiment of the present application does not limit the specific manner in which the first server represents the service status corresponding to each terminal device in the service status vector.
[0091] For example, if terminal device A activates the target service, the first server writes 1 in the 12th bit of the first dimension, the 32nd bit of the second dimension, and the 52nd bit of the third dimension of the service state vector, respectively, to indicate that terminal device A activates the target service; the first server refers to the processing process of terminal device A, traverses all terminal devices that have activated the target service, and completes the characterization of all terminal devices that have activated the target service in the service state vector; if terminal device B has not activated the target service, the first server writes 0 in the 15th bit of the first dimension, the 25th bit of the second dimension, and the 35th bit of the third dimension of the service state vector, respectively, to indicate that terminal device B has not activated the target service; the first server refers to the processing process of terminal device B, traverses all terminal devices that have not activated the target service, and completes the characterization of all terminal devices that have not activated the target service in the service state vector; then writes 0 to all other bits, thereby obtaining a configured service state vector.
[0092] It can be seen that in the configured service state vector, the service state corresponding to the terminal device that has activated the target service is represented differently from the service state corresponding to the terminal device that has not activated the target service. Therefore, when querying whether a terminal device has activated the target service, the position of the service state corresponding to the terminal device in the service state vector can be found, and based on the position, it can be determined whether the terminal device has activated the target service.
[0093] The following describes the process of determining the target device in at least one alarm device based on the service state vector in S202 by the first service, which may include but is not limited to: Figure 3 S301 to S304 shown.
[0094] In practice, steps S301 to S304 are performed on each of the at least one alarm device, so that the at least one target device can be obtained.
[0095] S301. A first server obtains location information based on a device identifier of the alarm device.
[0096] The location information is used to represent the location of the target service state corresponding to the alarm device in the service state vector.
[0097] The embodiment of the present application does not limit the method for obtaining location information and can be configured according to actual needs.
[0098] In one example, the location information may be obtained based on a device identification of the alarm device.
[0099] In another example, the location information may also be obtained based on the name of the alarm device or other information that can uniquely indicate an alarm device.
[0100] The embodiment of the present application does not limit the amount of location information and can be configured according to actual needs.
[0101] In one example, the number of location information is one, that is, the target service state corresponding to the alarm device is represented based on one location information.
[0102] In another example, the number of location information is greater than 1 (plurality), that is, the target service status corresponding to the alarm device is characterized based on multiple location information.
[0103] S302: The first server determines whether the target service status indicates activation of the target service based on the location information.
[0104] Since the location information is used to characterize the target service status corresponding to the alarm device, the implementation of S302 may include: the first server obtains the target service status corresponding to the alarm device based on the location information, and determines whether the target service status represents the activation of the target service. If so, execute the following S303; if not, execute the following S304.
[0105] S303: If the target service status indicates that the target service is activated, the first server determines that the alarm device is the target device.
[0106] The embodiment of the present application does not limit the way in which the first server determines that the alarm device is the target device, and can be configured according to actual needs. For example, the target device can be re-identified to distinguish it from other non-target devices in terms of identification. For another example, the device identification of the target device can be stored in the first location, so that the target device can be obtained by querying the device identification in the first location; that is, the identification of the target device is distinguished from the identification of the non-target device in the storage location.
[0107] It is understandable that the target device may not be processed at all, that is, the first server directly performs operations for the target device and performs operations for non-target devices; that is, the target device and the non-target device are distinguished from the subsequent operations.
[0108] S304: If the target service status indicates that the target service is not activated, the first server determines that the alarm device is a non-target device.
[0109] The implementation of S304 may refer to S303, except that the first server executes the action for the non-target device.
[0110] The following describes a process in which the first server obtains location information based on the device identification of the alarm device in S301. The implementation of this process may include but is not limited to the following method a or method b.
[0111] Method a: The service state vector is a one-dimensional vector;
[0112] Mode b: The service state vector is a multi-bit vector.
[0113] The implementation of method a may include: the first server performs a hash conversion on the device identifier of the first alarm device to obtain a U-bit data, and obtains the location information based on the U-bit data.
[0114] U is an integer greater than 1.
[0115] The embodiment of the present application does not limit the method of obtaining the location information based on the U-bit data, and can be configured according to actual needs.
[0116] In one example, the first server determines the value corresponding to the U-bit data as the location information.
[0117] In another example, the first server determines the value corresponding to the first v bits of data in the U bits of data as the position information.
[0118] Corresponding to mode a, S301 may include example a1: the identifier of the alarm device is 00325A1, the first server obtains data 121 after hashing 00325A1, and determines the 121st bit in the service state vector as the location information.
[0119] Corresponding to mode a, S301 may include example b1: the identifier of the alarm device is 00325A1, and the first server obtains data 121 after hashing 00325A1, and determines the 12th bit in the service state vector as the location information.
[0120] Taking the service state vector as a three-dimensional vector as an example, the implementation of method b may include but is not limited to the following S3011 to S3014.
[0121] S3011. The first server performs a hash conversion on the device identifier of the alarm device to obtain a U-bit data.
[0122] The embodiment of the present application does not limit the specific algorithm of the hash conversion, and can be configured according to actual needs. For example, the hash conversion can be based on the MurmurHash algorithm.
[0123] S3012. The first server obtains first position information based on the values of first m data of the U-bit data.
[0124] The first position information represents the position of the first dimension of the target service state in the first dimension of the service state vector; m is less than U.
[0125] Exemplarily, the implementation of S3012 may include: the first server determines the values corresponding to the first m data of the U-bit data as the first position information.
[0126] The present application embodiment does not limit the value of m, and can be configured according to actual needs. For example, m can be Or m can be Round forward or backward.
[0127] S3013. The first server obtains second location information based on the values of the first m data and the values of the last n data.
[0128] The second position information represents the position of the second dimension of the target service state in the second dimension of the service state vector; the sum of n and m is U.
[0129] The embodiment of the present application does not impose a unique limitation on the method for obtaining the second position information based on the values of the first m data and the values of the last n data, and can be configured according to actual needs.
[0130] For example, the first server may determine the sum of the values of the first m data and the values of the last n data as the second location information.
[0131] For another example, the first server may determine the absolute value of the difference between the values of the first m data and the values of the last n data as the second position information.
[0132] S3014. The first server obtains third location information based on the set multiples of the values corresponding to the last n data and the values of the first m data.
[0133] The third position information represents the position of the third dimension of the target service state in the third dimension of the service state vector; the value of the multiple is set to be greater than 1.
[0134] The embodiment of the present application does not impose a unique limitation on the manner in which the first server obtains the third position information based on the set multiples of the values corresponding to the last n data and the values of the first m data, as well as on the value of the set multiples.
[0135] In one example, the first server may determine the sum of twice the values corresponding to the last n data and the values of the first m data as the third location information.
[0136] It is understandable that the first server may also determine the sum of twice the values corresponding to the last n data and three times the values corresponding to the first m data as the third position information.
[0137] The following is an explanation of the process in S302 where the first server determines whether the target service status represents activation of the target service based on the location information. The process may include but is not limited to the following method a1 or method b1.
[0138] Method a1: the number of location information is one;
[0139] Mode b1: The amount of position information is greater than one.
[0140] The implementation of method a1 may include: the first server determines whether the value of the target service status (i.e., the data stored at the location indicated by the location information) is a set value based on the location information; if it is the set value, the first server determines that the target service status represents the activation of the target service, i.e., the alarm device activates the target service; if it is not the set value, the first server determines that the target service status represents that the target service is not activated, i.e., the alarm device does not activate the target service.
[0141] Assuming that the number of location information is three, the implementation of method b1 may include but is not limited to the following S3021 to S3024.
[0142] Among them, the location information includes first location information, second location information and third location information; the first location information represents the position of the first dimension of the target service state in the first dimension of the service state vector, the second location information represents the position of the second dimension of the target service state in the second dimension of the service state vector, and the third location information represents the position of the third dimension of the target service state in the third dimension of the service state vector.
[0143] S3021. The first server determines whether the value of the first dimension of the target service status is a first set value based on the first location information.
[0144] The first server reads the value of the first dimension of the target service status stored at the location pointed to by the first location information, and determines whether the value of the first dimension of the target service status is a first set value; if so, executes the following S3022, if not, determines that the target service status indicates that the target service is not activated, that is, the alarm device does not activate the target service.
[0145] The embodiment of the present application does not impose a unique limit on the value of the first setting value, and can be configured according to actual needs. For example, the first setting value can be 1, or the first setting value can be 0.
[0146] S3022: If the value of the first dimension is the first set value, the first server determines whether the value of the second dimension of the target service status is the second set value based on the second location information.
[0147] If the value of the first dimension of the target service status is the first set value, the first server reads the value of the second dimension of the target service status stored at the location pointed to by the second location information, and determines whether the value of the second dimension of the target service status is the second set value; if so, execute the following S3023, if not, determine that the target service status indicates that the target service is not activated, that is, the alarm device does not activate the target service.
[0148] The embodiment of the present application does not limit the value of the second setting value, wherein the second setting value may be the same as the first setting value or may be different from the first setting value.
[0149] S3023. If the value of the second dimension is the second set value, the first server determines whether the value of the third dimension of the target service status is the third set value based on the third location information.
[0150] If the value of the second dimension of the target service status is the second set value, the first server reads the value of the third dimension of the target service status stored at the location pointed to by the third location information, and determines whether the value of the third dimension of the target service status is the third set value; if so, execute the following S3024; if not, determine that the target service status indicates that the target service has not been activated, that is, the alarm device has not activated the target service.
[0151] The embodiment of the present application does not limit the value of the third setting value, wherein the third setting value may be the same as the first setting value or different from the first setting value; may be the same as the second setting value or different from the second setting value.
[0152] S3024: If the value of the third dimension is the third set value, the first server determines that the target service status represents activation of the target service.
[0153] If the value of the third dimension of the target service status is the third set value, the first server determines that the target service status represents the activation of the target service, that is, the alarm device activates the target service; otherwise, it determines that the target service status represents that the target service is not activated, that is, the alarm device does not activate the target service.
[0154] In this way, when the value of the first dimension is different from the first set value, it is directly determined that the target service status indicates that the target service is not activated, that is, the alarm device has not activated the service, thereby avoiding the reading and judgment of the second dimension value, and reducing the amount of data processed by the first server, thereby improving processing efficiency and further improving the real-time transmission of alarm information.
[0155] It can be understood that the implementation of method b1 may also include: the first server simultaneously and in parallel reads the value of the first dimension of the target service state stored at the location pointed to by the first location information, the value of the second dimension of the target service state stored at the location pointed to by the second location information, and the value of the third dimension of the target service state stored at the location pointed to by the third location information, and simultaneously and in parallel determines whether the value of the first dimension is the same as the first set value, whether the value of the second dimension is the same as the second set value, and whether the value of the third dimension is the same as the third set value; if all three are the same, it is determined that the target service state represents the activation of the reference service, that is, the alarm device activates the reference service; if there is at least one different item among the three, it is determined that the target service state represents that the reference service is not activated, that is, the alarm device does not activate the reference service.
[0156] In this way, similar judgments are made on the values of the three dimensions in parallel to determine whether the target service status represents the activation of the reference service, which is simple and reliable.
[0157] The following describes the sending method of S203 in which the first service sends the alarm information of the target device to the second server.
[0158] Method a2: Use a fixed sending method to send.
[0159] Method b2: Send using a sending method corresponding to the alarm level.
[0160] The implementation of mode a2 may include: the first server sends the alarm information of the target device to the second server using a fixed sending mode.
[0161] The embodiments of the present application do not specifically limit the fixed sending mode and can be configured according to actual needs. For example, the fixed sending mode may include any of the following: UDP message sending mode, TCP message sending mode.
[0162] The implementation of method b2 may include but is not limited to the following S2031 and S2032.
[0163] S2031. The first server obtains a sending method corresponding to the alarm level of the target device.
[0164] The first server pre-configures a corresponding sending mode for each alarm level. For example, a low alarm level can be configured as a UDP message sending mode, and a high alarm level can be configured as a TCP message sending mode.
[0165] S2032: The first server sends the alarm information of the target device to the second server using the sending method.
[0166] Specifically, the first server packages the alarm information of the target device into a format supported by a sending method corresponding to the alarm level of the target device, and then sends the alarm information of the target device to the second server through the sending method.
[0167] In this way, different sending methods can be used for different alarm levels to meet different needs. For example, for low alarm levels, UDP message sending method can be used to improve sending efficiency; for high alarm levels, TCP message sending method can be used to improve sending reliability.
[0168] Optionally, before executing S201, the information processing method provided in the embodiment of the present application further includes determining an alarm device. Exemplarily, the process may include but is not limited to the following: Figure 4 S401 to S404 shown.
[0169] S401: A first server determines a device model and a detection parameter of each of at least one candidate device.
[0170] In one example, the candidate device may be any terminal device;
[0171] In another example, the candidate device may be a terminal device that meets the parameter selection condition.
[0172] The device model is used to characterize the type of terminal device; for example, different types of terminal devices have different device models.
[0173] Detection parameters are used to characterize the detection information collected by the terminal device. For example, the detection parameters of a smart meter may include: power usage, remaining power, etc.; the detection parameters of a smart camera may include: suspicious persons detected, no suspicious persons detected, etc.
[0174] In the case where the candidate device can be any terminal device, the implementation of S401 may include: the first server obtains information reported by each terminal device, searches for the device model and detection parameters of each terminal device in the reported information, and thus obtains the device model and detection parameters of each candidate device in at least one candidate device.
[0175] After executing S401, the first server may execute the following S402 to S404 for each candidate device, thereby obtaining at least one alarm device.
[0176] S402: The first server determines an alarm condition corresponding to the candidate device according to a device model of the candidate device.
[0177] Among them, the device model of a terminal device corresponds to an alarm condition.
[0178] The embodiment of the present application does not limit the content of the alarm condition and can be configured according to actual needs.
[0179] For example, the alarm condition corresponding to the smart meter with the device model of 501134 may include: the remaining power is less than or equal to 20 watts.
[0180] In advance, the device model of each terminal device and its corresponding alarm condition are stored in a preset location. The implementation of S402 may include: the first server searches the preset location for the alarm condition corresponding to the device model of the candidate device and reads the content of the alarm condition.
[0181] S403: If the detection parameter of the candidate device meets the alarm condition, the first server determines that the candidate device is the alarm device.
[0182] The first server matches the detection parameters of the candidate device with the alarm condition, and if the detection parameters of the candidate device meet the alarm condition corresponding to the device model, the candidate device is determined to be an alarm device.
[0183] Exemplarily, the first server determines that the detection parameters of the candidate device are: the remaining power is 10 watts, and the alarm condition corresponding to the device model of the candidate device may include: the remaining power is less than or equal to 20 watts; the implementation of S403 may include: the first server matches the remaining power of 10 watts with the remaining power is less than or equal to 20 watts, and determines that the detection parameters meet the alarm conditions corresponding to the device model, then determines that the candidate device is an alarm device.
[0184] S404: If the detection parameters of the candidate device do not meet the alarm condition, the first server determines that the candidate device is a non-alarm device.
[0185] The implementation of S404 may refer to the above S403, which will not be described in detail here.
[0186] It should be noted that, in the case where the candidate device may be a terminal device that meets the parameter selection conditions, the information processing method provided in the embodiment of the present application may also include a process of determining the candidate device, which process may include but is not limited to: Figure 5 S501 and S502 shown.
[0187] S501. A first server obtains a detection parameter of each terminal device in at least one terminal device.
[0188] The first server obtains detection parameters of each terminal device in at least one terminal device based on information reported by each terminal device.
[0189] S502. The first server determines, among the at least one terminal device, a terminal device whose detection parameters include an alarm parameter as the candidate device.
[0190] The first server matches the detection parameters of each terminal with the alarm parameters, and determines a terminal device whose detection parameters include the alarm parameters in at least one terminal device as a candidate device.
[0191] The embodiment of the present application does not limit the number of candidate devices, and the candidate device may be one or more.
[0192] The fact that the detection parameters include alarm parameters can be understood as: the detection parameters include at least one alarm parameter.
[0193] In this way, before determining the alarm device, the first server can filter the terminal devices first, that is, filter out the terminal devices whose detection parameters do not include the alarm parameters, obtain candidate devices, and then determine the alarm device among the candidate devices, avoiding matching non-candidate devices with alarm conditions, reducing the amount of data processing, improving processing efficiency, and further improving the real-time transmission of alarm information.
[0194] Below, the information processing method provided in the embodiment of the present application is explained through specific application scenarios.
[0195] After being networked, smart home devices such as door magnetic sensors, smoke sensors, gas sensors, and water sensors are connected to the operator's wide area network, establish a long connection with the IOT server, and report device information to the IOT server regularly or triggered by events. Common device information includes but is not limited to: battery power, demolition alarm, door magnetic opening and closing status, smoke status, gas status, and water status. After the user activates the smart home device alarm hosting service, when the status reported by the smart home device matches the preset alarm threshold, the IOT server pushes the device alarm information to the community server. The alarm information content may include the alarm prompt text, alarm device identification, and alarm device product model.
[0196] In related technologies, the alarm condition threshold and the managed device ID are usually preset in the database. When the IOT platform receives the parameter status message reported by the smart home device, it needs to read the database configuration in real time according to the device ID and product ID for matching. When the alarm condition matches the managed device ID, the alarm information is pushed to the community server in real time.
[0197] The related art has the following defects:
[0198] Each time a terminal device status message is received, the database needs to be read, multiple matching operations are performed in the process, and then the alarm information is output. When the number of devices is small and the reported parameter messages are sparse, the real-time nature of the alarm can be met, but when the number of devices is large and the message reports are dense, it is subject to the database input / output (IO) bottleneck and network bandwidth limitations, which can easily lead to message accumulation and delayed processing of messages, resulting in a sharp drop in the real-time nature of the alarm.
[0199] This application intends to solve the problem of high-concurrency reporting of status messages by smart home devices, which can be processed in real time and push alarm information to the community server in near real time.
[0200] The principle may include: the IOT server can receive hundreds of millions of smart home device status change messages every day, of which only a very small number of messages are alarm parameter changes, and only some of these alarms have enabled device alarm hosting services. The platform only needs to process these alarms and push them to the corresponding community servers. Based on this, this solution uses multi-level caching and funnel filtering to process smart home device status messages.
[0201] The IOT server can use a funnel filtering method to determine the target device (a smart home device that meets the alarm conditions and has activated the alarm hosting service) among multiple smart home devices. Figure 6As shown, the IOT server may include: a parameter verification layer 601, an expression calculation layer 602, a hash sampling layer one 603, a hash sampling layer two 604, a hash sampling layer three 605, and a precise matching layer 606; the IOT server may filter the smart furniture devices layer by layer through the parameter verification layer 601, the expression calculation layer 602, the hash sampling layer one 603, the hash sampling layer two 604, the hash sampling layer three 605, and the precise matching layer 606 to obtain the target device.
[0202] The parameter verification layer 601 is used to filter out terminal devices whose undetected parameters do not include alarm parameters among the terminal devices that report information.
[0203] The expression calculation layer 602 is used to filter out the terminal devices that do not meet the alarm conditions based on the results of the parameter verification layer to obtain the alarm devices.
[0204] The hash sampling layer 1 603 is used to filter out some terminal devices that do not have the target service activated based on the result of the expression calculation layer.
[0205] The hash sampling layer 2 604 is used to filter out some terminal devices that do not activate the target service again based on the result of the hash sampling layer 1.
[0206] The hash sampling layer 3 605 is used to filter out some terminal devices that do not activate the target service again based on the result of the hash sampling layer 2.
[0207] The precise matching layer 606 is used to perform precise search on the result of the hash sampling layer 3 to obtain the target device.
[0208] Taking a gas detector as an example, when combustible gas is detected, the information reported by the device may include:
[0209] {device:{ID:000D6F0015168A3E, name:Hongyan gas detector:params:[{name:gasLeak, value:1}], seqID:172ff4fa901, timestamp:1593421310178, type:6, userInfo:{phone:18867101195, userID:2948811}}}.
[0210] ID: 000D6F0015168A3E, used to represent the device ID as 000D6F0015168A3E.
[0211] name: Hongyan gas detector, used to characterize the device name as Hongyan gas detector.
[0212] params: [{name: gasLeak, value: 1}], used to characterize the parameters including the gasLeak parameter in detail, and the value of the asLeak parameter is 1 (combustible gas is detected).
[0213] seqID: 172ff4fa901, the serial number used to represent the device information is 172ff4fa901.
[0214] timestamp: 1593421310178, which indicates the timestamp of obtaining the device information is 1593421310178.
[0215] type: 6, the information type used to represent the device information is 6 (status change information).
[0216] userInfo: {phone: 18867101195, userID: 2948811}, used to represent user information including: the phone number is 18867101195, and the user ID is 2948811.
[0217] The reported information includes three key parameters: device ID (device.ID), device model (device.type), and params parameter details. The parameter named gasLeak is in a state of 1, which means that combustible gas is detected.
[0218] Configuration Preparation 1.
[0219] The database is preset with a device alarm (product_alarm) table as shown in Table 1, wherein device_type indicates the device model, params_name indicates the parameter name, compare_type indicates the matching operator (eq equal, lt less than, gt greater than), compare_value indicates the comparison value, type indicates the alarm level, alarm_type indicates the alarm type, and alarm_content indicates the alarm prompt text.
[0220] Table 1 Example of equipment alarm table
[0221]
[0222] In simple terms, the device alarm table can be used to learn what detection parameters of a terminal device can trigger what alarm when what alarm conditions are met. The device alarm table records a small amount of data, so when the system starts, all of it can be loaded into the local process cache.
[0223] Configuration Preparation 2.
[0224] The database is preset with a device alarm trusteeship (product_alarm_sub) table as shown in Table 2, where device_id represents the device ID, device_type represents the device model, platform_id represents the server ID (equivalent to the second server ID) that manages the device, and family represents the sending method. The alarm trusteeship table is used to maintain the trusteeship device ID, which records which community server can manage which level of alarm for which device. This part of the data is relatively large and is not suitable for direct storage in the local process cache.
[0225] Table 2 Example of device alarm trusteeship table
[0226] device_id device_type platform_id family 00D6F0015168513E 30680 2 3 00D254F57513E25A 31708 2 3 00D58SE543411122 24003 1 3 …… …… …… ……
[0227] Therefore, in the solution of the present application, only the service state vector after device ID sampling is cached, and specifically, the following 1) to 4) are executed for each device that activates the target service:
[0228] 1) The IOT server uses the device ID as the variable x and uses the MurmurHash algorithm to obtain a set of data.
[0229] For example, take 000D6F0015168A3E as input and substitute it into the function h 0 = Murmur_hash(x, 128) calculates a 128-bit int random number h 0 .
[0230] 2) IOT server decomposition 0 The two variables h are high and low 64 bits Low ,h High .
[0231] h Low =h 0 %10 64 , indicating h 0 The value of the lower 64 bits; h High =h 0 / 10 64 Indicates h 0 The value of the high 64 bits of .
[0232] 3) The IOT server calculates three sample hash values h 1 ,h 2 ,h 3 .
[0233] h 1 =h High ;h 2 =h High +h Low ;h 3=h High +2*h Low .
[0234] 4) The IOT server caches three bit vectors L1, L2, and L3 with a length of 1024 in the process, and 1 %1024 position 1, set h in L2 2 %1024 position 1, set h in L3 3 % Set 1024 positions to 1 and the remaining positions to 0.
[0235] For each device that activates the target service, the following 1) to 4) are executed to obtain a service state vector.
[0236] Parameter verification layer processing: When the smart home device reports a message, it first enters the parameter verification layer for processing. This layer is the entrance to the funnel chain processing. It mainly matches the reported detection parameter content with the parameters cached in configuration one, performs preliminary screening, and filters out terminals whose detection parameters do not include alarm parameters; matches device.type with devce.param.name in the message, and cleans out the messages that need to be passed to the next layer for processing.
[0237] The expression calculation layer needs to calculate the detection parameter value in the message and the cached rules in configuration one as conditional expressions, including equal logic, greater than logic, and less than logic. Only messages whose expressions are calculated to be true will enter the next layer of processing logic.
[0238] Hash sampling layer 1. Since a device alarm has been generated when entering the hash sampling layer 1, it is necessary to determine whether the alarm needs to be pushed to the community server. The same processing as steps 1) to 4) in the second stage of configuration preparation is used to calculate the sampling value h 1 , and then query the cache L1 h 1 %Whether the 1024 position is 1, only the message whose corresponding sampling point in the L1 cache is set will enter the next layer for processing.
[0239] Hash sampling layer 2 uses the same processing as steps 1) to 4) in the configuration preparation phase 2 to calculate the sampling value h 2 , and then query the cache L2 h 2 %Whether the 1024 position is 1, only the message whose corresponding sampling point of L2 cache is set will enter the next layer for processing.
[0240] Hash sampling layer 3 uses the same processing as steps 1) to 4) in the configuration preparation phase 2 to calculate the sampling value h 3 , and then query the cache L3 h 3 %Whether the 1024 position is 1, only the message whose corresponding sampling point in the L3 cache is set will enter the next layer for processing.
[0241] Precise matching layer: When a message enters this layer, it means that the alarm information needs to be pushed to the community server. However, since only the device ID information is saved in the process cache and there is no corresponding community information, it is necessary to query the community-related information back to the table. At the same time, in order to make up for the error rate of the device hash sampling layer, the table query can be further double-checked. The community information of the device is found from the database, and the alarm is pushed to the corresponding community server to complete a complete alarm processing process.
[0242] The technical effects of this application may include:
[0243] 1. Based on the analysis of the smart home device alarm business model, a progressive funnel chain message processing mode is introduced to gradually clean the messages so that the system performance consumption is layered and superimposed. The computing performance consumption of the upper layer of the funnel chain is the lowest, and the computing performance of the lower layer of the funnel chain is the highest.
[0244] Second, we have made special treatment for the local cache of massive device ID data, which not only controls the cache size but also ensures query efficiency. The hash sampling of the device and the bit vector mapping method greatly compresses the occupied space. At the same time, the hierarchical storage method is also conducive to controlling the query consumption during query.
[0245] 3. For the calculation of three sampling values, only one hash mapping is performed, and the three sampling values are calculated in a split weighted manner, which is simple to implement.
[0246] 4. All data required for processing (service status vector, etc.) are cached in the local cache of the process, without network IO overhead and database query consumption, and the processing time is greatly reduced.
[0247] 5. Hierarchical funnel chain processing divides the processing flow into several levels of computing consumption, saving the computing resources of the central processing unit (CPU).
[0248] In a second aspect, an information processing device according to an embodiment of the present application is provided below in combination with Figure 7 The structure of the information processing device is described below.
[0249] like Figure 7 As shown, the information processing device 70 includes: an obtaining unit 701, a determining unit 702 and a sending unit 703. Among them:
[0250] The obtaining unit 701 is used to obtain the alarm information of each alarm device in at least one alarm device; the alarm device is a terminal device that meets the alarm condition;
[0251] A determination unit 702 is configured to determine a target device in the at least one alarm device based on a service state vector; the target device is a terminal device that activates a target service; the service state vector is used to indicate whether each of the at least one alarm device activates the target service;
[0252] The sending unit 703 is used to send the alarm information of the target device to the second server.
[0253] In some embodiments, the alarm information includes a device identifier, and the determining unit 702 is further configured to:
[0254] The following processing is performed for each of the at least one alarm device:
[0255] Obtaining location information based on the device identification of the alarm device; the location information is used to represent the position of the target service state corresponding to the alarm device in the service state vector;
[0256] Determining, based on the location information, whether the target service status indicates that the target service is activated;
[0257] If the target service status indicates that the target service is enabled, the alarm device is determined to be the target device.
[0258] In some embodiments, the service state vector is a three-dimensional vector, and the determining unit 702 is further configured to:
[0259] Performing a hash conversion on the device identification of the alarm device to obtain a U-bit data; wherein U is an integer greater than 1;
[0260] First position information is obtained based on the values of the first m data of the U-bit data, where the first position information represents the position of the first dimension of the target service state in the first dimension of the service state vector; m is less than U;
[0261] Based on the values of the first m data and the values of the last n data, second position information is obtained, where the second position information represents the position of the second dimension of the target service state in the second dimension of the service state vector; the sum of n and m is U;
[0262] Based on a set multiple of the values corresponding to the last n data and the values of the first m data, third position information is obtained, wherein the third position information represents the position of the third dimension of the target service state in the third dimension of the service state vector; the value of the set multiple is greater than 1.
[0263] In some embodiments, the location information includes first location information, second location information, and third location information, the first location information represents the position of the first dimension of the target service state in the first dimension of the service state vector, the second location information represents the position of the second dimension of the target service state in the second dimension of the service state vector, and the third location information represents the position of the third dimension of the target service state in the third dimension of the service state vector; the determination unit 702 is further used to: determine whether the value of the first dimension of the target service state is a first set value based on the first location information;
[0264] If the value of the first dimension is the first set value, determining whether the value of the second dimension of the target service status is the second set value based on the second location information;
[0265] If the value of the second dimension is the second set value, determining whether the value of the third dimension of the target service status is the third set value based on the third location information;
[0266] If the value of the third dimension is the third set value, determining that the target service state represents activation of the target service.
[0267] In some embodiments, the warning information includes a warning level, and the sending unit 703 is further configured to:
[0268] Obtaining a sending mode corresponding to an alarm level of the target device;
[0269] Based on the sending method, the alarm information of the target device is sent to the second server.
[0270] In some embodiments, the information processing device 70 may further include a processing unit:
[0271] Before the obtaining unit 701 performs its actions, the processing unit is used to:
[0272] Determine a device model and detection parameters of each of the at least one candidate device;
[0273] For each of the candidate devices, perform the following processing:
[0274] Determine, according to the device model of the candidate device, an alarm condition corresponding to the candidate device;
[0275] If the detection parameter of the candidate device meets the alarm condition, the candidate device is determined to be the alarm device.
[0276] In some embodiments, the processing unit is further configured to:
[0277] Obtaining detection parameters of each terminal device in at least one terminal device;
[0278] Among the at least one terminal device, a terminal device whose detection parameters include alarm parameters is determined as the candidate device.
[0279] It should be noted that the information processing device provided in the embodiment of the present application includes the various units included, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.
[0280] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0281] It should be noted that in the embodiment of the present application, if the above-mentioned information processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0282] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the information processing method provided in the above embodiment are implemented.
[0283] Combine the following Figure 8 The structure of the electric device 80 shown in FIG.
[0284] In one example, the electronic device 80 may be the above-mentioned electronic device. Figure 8As shown, the electronic device 80 includes: a processor 801, at least one communication bus 802, at least one external communication interface 803 and a memory 804. The communication bus 802 is configured to realize the connection and communication between these components. The external communication interface 803 may include a standard wired interface and a wireless interface.
[0285] The memory 804 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by the processor 801 and various modules in the electronic device (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0286] In a fourth aspect, an embodiment of the present application provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the information processing method provided in the above embodiment are implemented.
[0287] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0288] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the 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 embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0289] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0290] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0291] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0292] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0293] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0294] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function 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 embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0295] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An information processing method, It is characterized in that The method is applied to a first server, and the method includes: Obtaining alarm information of each of the at least one alarm device; the alarm device is a terminal device that meets the alarm condition; Determining a target device in the at least one alarm device based on a service state vector; the target device is a terminal device for opening a target service; the service state vector is configured by the first server, and the configuration of the service state vector includes: configuring the service state vector; determining a position of a service state corresponding to each terminal device in the service state vector based on a device identifier of each terminal device; representing a service state corresponding to each terminal device in the service state vector based on a position of the service state corresponding to each terminal device in the service state vector; The alarm information of the target device is sent to the second server.
2. The method according to claim 1, It is characterized in that The alarm information includes a device identifier, and determining a target device in the at least one alarm device based on a service state vector includes: The following processing is performed for each of the at least one alarm device: Obtaining location information based on the device identification of the alarm device; the location information is used to represent the position of the target service state corresponding to the alarm device in the service state vector; Determining, based on the location information, whether the target service status indicates that the target service is activated; If the target service status indicates that the target service is enabled, the alarm device is determined to be the target device.
3. The method according to claim 2, It is characterized in that The service status vector is a three-dimensional vector, and the obtaining of the location information based on the device identification of the alarm device includes: Performing a hash conversion on the device identification of the alarm device to obtain a U-bit data; wherein U is an integer greater than 1; First position information is obtained based on the values of the first m data of the U-bit data, where the first position information represents the position of the first dimension of the target service state in the first dimension of the service state vector; m is less than U; Based on the values of the first m data and the values of the last n data, second position information is obtained, where the second position information represents the position of the second dimension of the target service state in the second dimension of the service state vector; the sum of n and m is U; Based on a set multiple of the values corresponding to the last n data and the values of the first m data, third position information is obtained, wherein the third position information represents the position of the third dimension of the target service state in the third dimension of the service state vector; the value of the set multiple is greater than 1.
4. The method according to claim 2 or 3, It is characterized in that The position information includes first position information, second position information and third position information, the first position information represents the position of the first dimension of the target service state in the first dimension of the service state vector, the second position information represents the position of the second dimension of the target service state in the second dimension of the service state vector, and the third position information represents the position of the third dimension of the target service state in the third dimension of the service state vector; The determining, based on the location information, whether the target service status represents activation of the target service includes: Determining whether a value of a first dimension of the target service state is a first set value based on the first location information; If the value of the first dimension is the first set value, determining whether the value of the second dimension of the target service status is the second set value based on the second location information; If the value of the second dimension is the second set value, determining whether the value of the third dimension of the target service status is the third set value based on the third location information; If the value of the third dimension is the third set value, determining that the target service state represents activation of the target service.
5. The method according to claim 1, It is characterized in that The alarm information includes an alarm level, and sending the alarm information of the target device to the second server includes: Obtaining a sending mode corresponding to an alarm level of the target device; Based on the sending method, the alarm information of the target device is sent to the second server.
6. The method according to claim 1, It is characterized in that Before obtaining the alarm information of each of the at least one alarm device, the method further includes: Determine a device model and detection parameters of each of the at least one candidate device; For each of the candidate devices, perform the following processing: Determine, according to the device model of the candidate device, an alarm condition corresponding to the candidate device; If the detection parameter of the candidate device meets the alarm condition, the candidate device is determined to be the alarm device.
7. The method according to claim 6, It is characterized in that The method further comprises: Obtaining detection parameters of each terminal device in at least one terminal device; Among the at least one terminal device, a terminal device whose detection parameters include alarm parameters is determined as the candidate device.
8. An information processing device, the device being deployed on a first server, It is characterized in that The device comprises: An obtaining unit, used to obtain alarm information of each alarm device in at least one alarm device; the alarm device is a terminal device that meets the alarm condition; A determination unit, configured to determine a target device in the at least one alarm device based on a service state vector; the target device is a terminal device for opening a target service; the service state vector is configured by the first server, and the configuration of the service state vector includes: configuring the service state vector; determining a position of a service state corresponding to each terminal device in the service state vector based on a device identifier of each terminal device; and characterizing a service state corresponding to each terminal device in the service state vector based on a position of the service state corresponding to each terminal device in the service state vector; A sending unit is used to send the alarm information of the target device to the second server.
9. An electronic device comprising a memory and a processor, It is characterized in that The memory stores a computer program that can be run on the processor, and when the processor executes the program, the information processing method according to any one of claims 1 to 7 is implemented.
10. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the information processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Alarm processing method and device
CN109951345A
Alarm data management method and apparatus, and computer device and storage medium
WO2020029407A1