Self-adaptive detection method, device and equipment of sensor and intelligent equipment
By generating sensor marks on the data interface of the smart device and matching processing, the problem that the smart device software side cannot accurately distinguish sensor types, and the accurate identification and correct use of sensor types are achieved.
Patent Information
- Application Number
- CN202310957552.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
How to accurately distinguish the types of sensors on the software side of smart devices is an urgent problem. The existing technology cannot effectively distinguish the types of sensors, resulting in the inability to use the sensors correctly.
By generating sensor marks when the sensor is connected to the data interface, the mark indicates the connection relationship between the data interface and the sensor, and matching the mark information with the preset sensor type, the corresponding relationship between each sensor and the sensor type is obtained.
The sensor type of newly inserted smart devices is achieved accurately and quickly, solving the problem of difficult sensor type distinction, and ensuring that the sensor can be used correctly.
Smart Images

Figure CN119437316A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to a sensor adaptive detection method, device, equipment and smart device. Background Art
[0002] Air conditioners, water heaters and other equipment have become common smart devices in our lives. Sensors are an important part of smart devices and play a key auxiliary role in the intelligent control of smart devices.
[0003] Take the air conditioner as an example. The air conditioner can cool in hot seasons and heat in cold seasons, which increases the user experience. The air conditioner is usually equipped with multiple air conditioner sensors. In the prior art, when the air conditioner is installed, the connection lines of air conditioner sensors with different functions have different colors, and the air conditioner also has different interfaces. However, each air conditioner sensor can only operate correctly and realize the corresponding function only when it is connected to the corresponding functional interface. However, as for how to install it, the installer may need to be familiar with the corresponding knowledge, so that the air conditioner sensor can operate normally.
[0004] In the related art, there is no need to specially distinguish the color of the connecting wires and the corresponding port information during installation, which simplifies the manual operation connection. However, it will appear on the software side that it is impossible to accurately distinguish which port corresponds to which function of the air-conditioning sensor, and it is impossible to distinguish the type of sensor, which will cause the air-conditioning sensor to be unable to be used correctly.
[0005] Therefore, how to distinguish the types of sensors on the software side of smart devices is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The present invention provides a sensor adaptive detection method, device, equipment and intelligent device, which can accurately and quickly determine the sensor type of a sensor newly inserted into the intelligent device.
[0007] In a first aspect, the present invention provides an adaptive detection method of a sensor, the method being applied to a smart device, the smart device comprising a plurality of sensors and a plurality of data interfaces, the adaptive detection method of the sensor comprising:
[0008] When the sensor is connected to the data interface, a sensor mark indicating that the sensor and the data interface are connected is generated, wherein the sensor mark indicates a connection relationship between the data interface and the sensor;
[0009] Preprocessing the sensor tag and the preset sensor type to obtain tag information;
[0010] The tag information indicates the corresponding relationship between each of the sensors and the sensor type.
[0011] Preferably, according to the adaptive detection method of the sensor provided by the present invention, the sensor tag and the preset sensor type are preprocessed to obtain tag information, including:
[0012] Based on the connection relationship between the data interface and the sensor, using the sensor to collect environmental data to obtain a sensor value;
[0013] The sensor value and the sensor type are matched to obtain the tag information.
[0014] Preferably, according to the adaptive detection method of the sensor provided by the present invention, the matching process of the sensor value and the sensor type to obtain the tag information includes:
[0015] Sorting the plurality of sensor values in a preset order to obtain a sensor value sequence;
[0016] The sensor value sequence and the sensor type are matched to obtain the tag information.
[0017] Preferably, according to the adaptive detection method of the sensor provided by the present invention, the sensor value sequence at least includes: an indoor value sequence and an outdoor value sequence;
[0018] The step of sorting the plurality of sensor values in a preset order to obtain a sensor value sequence includes:
[0019] Classifying multiple sensor values according to the location information of the sensors to obtain indoor sensor values and outdoor sensor values;
[0020] Sorting the multiple indoor sensor values according to the preset order to obtain the indoor value sequence;
[0021] Sorting the plurality of outdoor sensor values in the preset order to obtain the outdoor value sequence;
[0022] The preset order is a positive order from large to small, or a reverse order from small to large.
[0023] Preferably, according to the adaptive detection method of the sensor provided by the present invention, the tag information at least includes: a first corresponding relationship, a second corresponding relationship;
[0024] The sensor types include at least an indoor temperature sensor type and an indoor coil temperature sensor type;
[0025] The matching process of the sensor value sequence and the sensor type to obtain the tag information includes:
[0026] In the case where the sensor value sequence indicates the indoor value sequence, matching is performed according to the indoor sensor value with a large value in the indoor value sequence and the sensor type, and determining a first correspondence between the sensor corresponding to the indoor sensor value with the large value and the indoor temperature sensor type,
[0027] According to matching the indoor sensor value with a smaller value in the indoor value sequence and the sensor type, a second corresponding relationship between the sensor corresponding to the indoor sensor value with a smaller value and the indoor coil temperature sensor type is determined.
[0028] Preferably, according to the adaptive detection method of the sensor provided by the present invention, after the step of preprocessing the sensor tag and the preset sensor type to obtain tag information, the method further includes:
[0029] Receiving a collection instruction for collecting a target value;
[0030] Collecting the target value according to the collection instruction and the marking information;
[0031] Determining whether the target value is within a preset value range;
[0032] If so, determining that the correspondence between the sensor and the sensor type indicated by the tag information is correct;
[0033] If not, it is determined that the correspondence between the sensor and the sensor type indicated by the tag information is abnormal.
[0034] Preferably, according to the adaptive detection method of the sensor provided by the present invention, after the step of determining that the corresponding relationship indicated by the tag information is abnormal, the method further includes:
[0035] triggering a preset deletion mechanism and generating a deletion instruction, deleting the marking information according to the deletion instruction, and generating a warning information indicating that the corresponding relationship indicated by the marking information is abnormal;
[0036] The warning information is sent to a preset display area to remind the user in the display area to re-plug the connection line between the sensor and the data interface.
[0037] In a second aspect, the present invention further provides an adaptive detection device for a sensor, which is applied to a smart device, wherein the smart device includes a plurality of sensors and a plurality of data interfaces, and the adaptive detection device for the sensor includes:
[0038] a generating module, configured to generate a sensor mark indicating that the sensor and the data interface are connected when the sensor is connected to the data interface for the first time, wherein the sensor mark indicates a connection relationship between the data interface and the sensor;
[0039] A preprocessing module, used for preprocessing the sensor tag and the preset sensor type to obtain tag information;
[0040] The tag information indicates the corresponding relationship between each of the sensors and the sensor type.
[0041] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the adaptive detection method of the sensor as described above are implemented.
[0042] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the adaptive detection method of the sensor as described in any one of the above.
[0043] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned adaptive detection methods for sensors.
[0044] In a sixth aspect, the present invention further provides an air conditioner, comprising a controller and a plurality of air conditioner sensors, wherein the controller, when executed, implements the steps of the adaptive detection method of any of the sensors described above.
[0045] The present invention provides a sensor adaptive detection method, device, equipment and intelligent device, which generates a sensor tag indicating that the sensor and the data interface are connected when the sensor is connected to the data interface, and the sensor tag indicates the connection relationship between the data interface and the sensor; the sensor tag and the preset sensor type are preprocessed to obtain tag information; wherein the tag information indicates the corresponding relationship between each sensor and the sensor type. The generated tag information can accurately and quickly determine the sensor type of the sensor newly inserted into the intelligent device. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 It is a schematic diagram of the flow of the adaptive detection method of the sensor provided by the present invention;
[0048] Figure 2 It is a structural schematic diagram of the adaptive detection device of the sensor provided by the present invention;
[0049] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Combine the following Figure 1-Figure 3 The invention describes a sensor adaptive detection method, device, equipment and intelligent device, which can accurately and quickly determine the sensor type of a sensor newly inserted into the intelligent device through the generated tag information.
[0052] The invention discloses an intelligent device, comprising a controller, a plurality of air-conditioning sensors and a plurality of data interfaces. The controller executes the steps of a self-adaptive detection method of the sensors.
[0053] The smart device may be at least, but not limited to, an air conditioner, a water heater, and a refrigerator.
[0054] like Figure 1 As shown, it is a schematic diagram of the implementation process of the adaptive detection method of the sensor provided by an embodiment of the present invention. The adaptive detection method of the sensor may include but is not limited to steps S100 to S200.
[0055] S100, when the sensor is connected to the data interface, generating a sensor mark that the sensor and the data interface are connected, the sensor mark indicating a connection relationship between the data interface and the sensor;
[0056] S200, preprocessing the sensor tag and the preset sensor type to obtain tag information;
[0057] The tag information indicates the corresponding relationship between each of the sensors and the sensor type.
[0058] It should be noted that the execution subject of the adaptive detection method of the sensor in the embodiment of the present application may be a hardware device with data information processing capability and / or the necessary software required to drive the hardware device to work.
[0059] Optionally, the execution subject may include but is not limited to workstations, servers, computers, user terminals and other intelligent devices. Among them, user terminals include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc.
[0060] In step S100 of some embodiments, when the sensor is connected to the data interface, a sensor mark indicating that the sensor and the data interface are connected is generated, and the sensor mark indicates a connection relationship between the data interface and the sensor.
[0061] It can be understood that, taking the smart device as an air conditioner as an example, after the air conditioning sensor of the air conditioner and the data port of the air conditioner are connected, when the air conditioner is powered on for the first time, in order to distinguish which data port corresponds to what function the air conditioner sensor has, when the sensor is connected to the data interface through a wire, a sensor mark indicating that the sensor and the data interface are connected is automatically generated.
[0062] For example, if the sensors are A, B, and C, the corresponding data interfaces are interface 1, interface 2, and interface 3.
[0063] Each data interface is only connected to one sensor. In the prior art, a sensor must be uniquely connected to a data interface with the same function. However, in the present invention, a user can randomly insert a sensor into the data interface of a smart device, and the controller of the smart device adaptively detects the sensor type of each sensor inserted into the data interface.
[0064] When the sensor is connected to the data interface, a sensor mark indicating that the sensor and the data interface are connected is automatically generated.
[0065] The sensor mark indicates the connection relationship between the data interface and the sensor, for example, the connection relationship between sensor A and data interface 2 , the connection relationship between sensor B and data interface 1 , and the connection relationship between sensor C and data interface 3 .
[0066] In step S200 of some embodiments, the sensor tag and the preset sensor type are preprocessed to obtain tag information.
[0067] The tag information indicates the corresponding relationship between each of the sensors and the sensor type.
[0068] The specific execution steps may be: based on the connection relationship between the data interface and the sensor, using the sensor to collect environmental data to obtain a sensor value;
[0069] The sensor value and the sensor type are matched to obtain the tag information.
[0070] For example, by utilizing the connection relationship between sensor A and data interface 2, the connection relationship between sensor B and data interface 1, and the connection relationship between sensor C and data interface 3, the environmental data collected by sensor A is transmitted through data interface 2 to obtain the first sensor value.
[0071] The environmental data collected by sensor B is transmitted through data interface 1 to obtain a second sensor value, and the environmental data collected by sensor C is transmitted through data interface 3 to obtain a third sensor value.
[0072] The step of matching the sensor value and the sensor type to obtain the tag information may specifically be:
[0073] Sorting the plurality of sensor values in a preset order to obtain a sensor value sequence;
[0074] The sensor value sequence and the sensor type are matched to obtain the tag information.
[0075] It should be noted that the sensor value sequence at least includes: an indoor value sequence and an outdoor value sequence.
[0076] The step of sorting the multiple sensor values in a preset order to obtain a sensor value sequence may specifically be: classifying the multiple sensor values according to the position information of the sensors to obtain indoor sensor values and outdoor sensor values;
[0077] Sorting the multiple indoor sensor values according to the preset order to obtain the indoor value sequence;
[0078] Sorting the plurality of outdoor sensor values in the preset order to obtain the outdoor value sequence;
[0079] The preset order is a positive order from large to small, or a reverse order from small to large.
[0080] For example, the first sensor value M1 and the second sensor value M2 are indoor sensor values, and the third sensor value N1, the fourth sensor value N2, and the fifth sensor value N3 are outdoor sensor values.
[0081] Taking the preset order as an example, the indoor numerical sequence is M1>M2, or M1 <M2。
[0082] The outdoor value sequence may be N1>N3>N2.
[0083] In some embodiments of the present invention, the marking information at least includes but is not limited to: a first corresponding relationship and a second corresponding relationship.
[0084] The sensor types at least include but are not limited to indoor temperature sensor types and indoor coil temperature sensor types.
[0085] The step of matching the sensor value sequence with the sensor type to obtain the tag information may specifically be:
[0086] In the case where the sensor value sequence indicates the indoor value sequence, matching is performed based on the indoor sensor value with a larger value in the indoor value sequence and the sensor type, and a first corresponding relationship between the sensor corresponding to the indoor sensor value with the larger value and the indoor temperature sensor type is determined.
[0087] According to matching the indoor sensor value with a smaller value in the indoor value sequence and the sensor type, a second corresponding relationship between the sensor corresponding to the indoor sensor value with a smaller value and the indoor coil temperature sensor type is determined.
[0088] For example, if the indoor numerical sequence is M1 greater than M2, then M1 is the indoor sensor value with a large value, and the pre-set sensor type rule is that the sensor type corresponding to the indoor sensor value with a large value is the indoor temperature sensor type. Therefore, the sensor corresponding to the indoor sensor value with the large value is determined, and the first correspondence between the sensor and the indoor temperature sensor type is determined.
[0089] That is, the first corresponding relationship indicates that the sensor value detected by the sensor output by the current data interface is the value detected by the indoor temperature sensor, and the sensor correspondingly connected to the current data interface is the indoor temperature sensor.
[0090] Through the first corresponding relationship, it can be directly determined that the data output by the data interface is the value detected by the indoor temperature sensor.
[0091] Similarly, the second corresponding relationship indicates that the sensor connected to the indoor sensor value with a smaller value in the indoor value sequence is the indoor coil temperature sensor.
[0092] Through the second corresponding relationship, it can be directly determined that the data output by this data interface is the value detected by the indoor coil temperature sensor.
[0093] In some embodiments of the present invention, after the step of preprocessing the sensor tag and the preset sensor type to obtain tag information, the method further includes:
[0094] Receiving a collection instruction for collecting a target value;
[0095] Collecting the target value according to the collection instruction and the marking information;
[0096] Determining whether the target value is within a preset value range;
[0097] If so, determining that the correspondence between the sensor and the sensor type indicated by the tag information is correct;
[0098] If not, it is determined that the correspondence between the sensor and the sensor type indicated by the tag information is abnormal.
[0099] It can be understood that in order to verify the correctness of the marking information, the controller receives an acquisition instruction for collecting the target value, and then calls the marking information from the database according to the acquisition instruction to obtain the target value detected by the target sensor corresponding to the target data interface through the target data interface corresponding to the acquisition instruction.
[0100] It is determined whether the target value is within a value range. If the target value is within a preset value range, it is determined that the correspondence between the sensor and the sensor type indicated by the tag information is correct.
[0101] If it is determined that the target value is not within the value range, it is determined that the correspondence between the sensor and the sensor type indicated by the tag information is abnormal.
[0102] In some embodiments of the present invention, after the step of determining that the corresponding relationship indicated by the tag information is abnormal, the method further includes:
[0103] triggering a preset deletion mechanism and generating a deletion instruction, deleting the marking information according to the deletion instruction, and generating a warning information indicating that the corresponding relationship indicated by the marking information is abnormal;
[0104] The warning information is sent to a preset display area to remind the user in the display area to re-plug and re-plug the connection line between the sensor and the data interface to re-adaptively detect the sensor type corresponding to the sensor connected to the data interface. The correspondence between the sensor connected to the data interface and the preset sensor type is stored in the marking information.
[0105] In the embodiment of the present invention, taking the smart device as an air conditioner as an example, the indoor sensor at least includes: an indoor temperature sensor, an indoor coil temperature sensor. The outdoor sensor at least includes: an outdoor temperature sensor, an outdoor coil temperature sensor, and an exhaust temperature sensor.
[0106] Taking an air conditioner as an example, when the air conditioner is turned on for cooling, after running for a preset period of time, the multiple temperature values detected are sorted. The low temperature value is the indoor coil sensor, and the high temperature value is the indoor temperature sensor.
[0107] Similarly, when the air conditioner is turned on for cooling operation, the temperature values detected by the three outdoor sensors are sorted. The highest temperature value is the exhaust temperature sensor, the second highest is the outdoor coil temperature sensor, and the lowest is the outdoor temperature sensor. The corresponding tag information is stored in an outdoor preset memory, which can be an E2PROM.
[0108] The present invention provides a sensor adaptive detection method, device, equipment and intelligent device, which generates a sensor tag indicating that the sensor and the data interface are connected when the sensor is connected to the data interface, and the sensor tag indicates the connection relationship between the data interface and the sensor; the sensor tag and the preset sensor type are preprocessed to obtain tag information; wherein the tag information indicates the corresponding relationship between each sensor and the sensor type. The generated tag information can accurately and quickly determine the sensor type of the sensor newly inserted into the intelligent device.
[0109] The adaptive detection device of the sensor provided by the present invention is described below. The adaptive detection device of the sensor described below and the adaptive detection method of the sensor described above can be referred to each other.
[0110] like Figure 2 FIG. 1 is a schematic diagram of the structure of the adaptive detection device of the sensor provided by the present invention. The adaptive detection device of the sensor is applied to an air conditioner. The air conditioner includes at least a plurality of air conditioner sensors. The air conditioner sensors include at least a target sensor. The adaptive detection device of the sensor includes:
[0111] A generating module 210, configured to generate a sensor mark indicating that the sensor and the data interface are connected when the sensor is connected to the data interface, wherein the sensor mark indicates a connection relationship between the data interface and the sensor;
[0112] The preprocessing module 220 is used to preprocess the sensor tag and the preset sensor type to obtain tag information; wherein the tag information indicates the corresponding relationship between each of the sensors and the sensor type.
[0113] Preferably, according to the adaptive detection device of a sensor provided by the present invention, the preprocessing module 220 is used to collect environmental data using the sensor based on the connection relationship between the data interface and the sensor to obtain a sensor value;
[0114] The sensor value and the sensor type are matched to obtain the tag information.
[0115] Preferably, according to the adaptive detection device of a sensor provided by the present invention, the preprocessing module 220 is used to sort the plurality of sensor values in a preset order to obtain a sensor value sequence;
[0116] The sensor value sequence and the sensor type are matched to obtain the tag information.
[0117] Preferably, according to the adaptive detection device of a sensor provided by the present invention, the sensor value sequence at least includes: an indoor value sequence and an outdoor value sequence;
[0118] A preprocessing module 220, configured to classify multiple sensor values according to location information of the sensors to obtain indoor sensor values and outdoor sensor values;
[0119] Sorting the multiple indoor sensor values according to the preset order to obtain the indoor value sequence;
[0120] Sorting the plurality of outdoor sensor values in the preset order to obtain the outdoor value sequence;
[0121] The preset order is a positive order from large to small, or a reverse order from small to large.
[0122] Preferably, according to the adaptive detection device of a sensor provided by the present invention, the tag information at least includes: a first corresponding relationship, a second corresponding relationship;
[0123] The sensor types include at least an indoor temperature sensor type and an indoor coil temperature sensor type;
[0124] A preprocessing module 220 is used for, when the sensor value sequence indicates that it is the indoor value sequence, matching the indoor sensor value with the sensor type according to the indoor sensor value with the larger value in the indoor value sequence, and determining a first corresponding relationship between the sensor corresponding to the indoor sensor value with the larger value and the indoor temperature sensor type;
[0125] According to matching the indoor sensor value with a smaller value in the indoor value sequence and the sensor type, a second corresponding relationship between the sensor corresponding to the indoor sensor value with a smaller value and the indoor coil temperature sensor type is determined.
[0126] Preferably, according to the adaptive detection device of a sensor provided by the present invention, after the step of preprocessing the sensor tag and the preset sensor type to obtain tag information, the device is also used to receive a collection instruction for collecting a target value;
[0127] Collecting the target value according to the collection instruction and the marking information;
[0128] Determining whether the target value is within a preset value range;
[0129] If so, determining that the correspondence between the sensor and the sensor type indicated by the tag information is correct;
[0130] If not, it is determined that the correspondence between the sensor and the sensor type indicated by the tag information is abnormal.
[0131] Preferably, according to the adaptive detection device of a sensor provided by the present invention, after the step of determining that the corresponding relationship indicated by the tag information is abnormal, the device is further used to trigger a preset deletion mechanism and generate a deletion instruction, delete the tag information according to the deletion instruction, and generate warning information that the corresponding relationship indicated by the tag information is abnormal;
[0132] The warning information is sent to a preset display area to remind the user in the display area to re-plug the connection line between the sensor and the data interface.
[0133] The present invention provides a sensor adaptive detection method, device, equipment and intelligent device, which generates a sensor tag indicating that the sensor and the data interface are connected when the sensor is connected to the data interface, and the sensor tag indicates the connection relationship between the data interface and the sensor; the sensor tag and the preset sensor type are preprocessed to obtain tag information; wherein the tag information indicates the corresponding relationship between each sensor and the sensor type. The generated tag information can accurately and quickly determine the sensor type of the sensor newly inserted into the intelligent device.
[0134] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the adaptive detection method of the sensor, the method comprising: when the sensor is connected to the data interface, generating a sensor tag indicating that the sensor and the data interface are connected, the sensor tag indicating the connection relationship between the data interface and the sensor; pre-processing the sensor tag and the preset sensor type to obtain tag information; wherein the tag information indicates the corresponding relationship between each of the sensors and the sensor type.
[0135] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0136] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the adaptive detection method of the sensor provided by the above-mentioned methods, and the method includes: when the sensor is connected to the data interface, generating a sensor mark that the sensor and the data interface are connected, and the sensor mark indicates the connection relationship between the data interface and the sensor; pre-processing the sensor mark and the preset sensor type to obtain mark information; wherein the mark information indicates the corresponding relationship between each of the sensors and the sensor type.
[0137] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the adaptive detection method of the sensor provided by the above-mentioned methods, the method comprising: when the sensor is connected to the data interface, generating a sensor mark indicating that the sensor and the data interface are connected, the sensor mark indicating the connection relationship between the data interface and the sensor; preprocessing the sensor mark and the preset sensor type to obtain mark information; wherein the mark information indicates the corresponding relationship between each of the sensors and the sensor type.
[0138] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0139] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A sensor adaptive detection method, characterized in that: The method is applied to a smart device, the smart device includes a plurality of sensors and a plurality of data interfaces, and the adaptive detection method of the sensor includes: When the sensor is connected to the data interface, a sensor mark indicating that the sensor and the data interface are connected is generated, wherein the sensor mark indicates a connection relationship between the data interface and the sensor; Preprocessing the sensor tag and the preset sensor type to obtain tag information; The tag information indicates the corresponding relationship between each of the sensors and the sensor type.
2. The adaptive detection method of the sensor according to claim 1, characterized in that: The preprocessing of the sensor tag and the preset sensor type to obtain tag information includes: Based on the connection relationship between the data interface and the sensor, using the sensor to collect environmental data to obtain a sensor value; The sensor value and the sensor type are matched to obtain the tag information.
3. The adaptive detection method of the sensor according to claim 2, characterized in that: The matching process of the sensor value and the sensor type to obtain the tag information includes: Sorting the plurality of sensor values in a preset order to obtain a sensor value sequence; The sensor value sequence and the sensor type are matched to obtain the tag information.
4. The adaptive detection method of the sensor according to claim 3, characterized in that: The sensor value sequence at least includes: an indoor value sequence and an outdoor value sequence; The step of sorting the plurality of sensor values in a preset order to obtain a sensor value sequence includes: Classifying multiple sensor values according to the location information of the sensors to obtain indoor sensor values and outdoor sensor values; Sorting the multiple indoor sensor values according to the preset order to obtain the indoor value sequence; Sorting the plurality of outdoor sensor values in the preset order to obtain the outdoor value sequence; The preset order is a positive order from large to small, or a reverse order from small to large.
5. The adaptive detection method of the sensor according to claim 4, characterized in that: The marking information at least includes: a first corresponding relationship and a second corresponding relationship; The sensor types include at least an indoor temperature sensor type and an indoor coil temperature sensor type; The matching process of the sensor value sequence and the sensor type to obtain the tag information includes: In the case where the sensor value sequence indicates the indoor value sequence, matching the indoor sensor value with the larger value in the indoor value sequence with the sensor type is performed to determine a first corresponding relationship between the sensor corresponding to the indoor sensor value with the larger value and the indoor temperature sensor type; According to matching the indoor sensor value with a smaller value in the indoor value sequence and the sensor type, a second corresponding relationship between the sensor corresponding to the indoor sensor value with a smaller value and the indoor coil temperature sensor type is determined.
6. The adaptive detection method of a sensor according to any one of claims 1 to 5, characterized in that: After the step of preprocessing the sensor tag and the preset sensor type to obtain tag information, the method further includes: Receiving a collection instruction for collecting a target value; Collecting the target value according to the collection instruction and the marking information; Determining whether the target value is within a preset value range; If so, determining that the correspondence between the sensor and the sensor type indicated by the tag information is correct; If not, it is determined that the correspondence between the sensor and the sensor type indicated by the tag information is abnormal.
7. The adaptive detection method of a sensor according to claim 6, characterized in that: After the step of determining that the corresponding relationship indicated by the mark information is abnormal, the method further includes: triggering a preset deletion mechanism and generating a deletion instruction, deleting the marking information according to the deletion instruction, and generating a warning information indicating that the corresponding relationship indicated by the marking information is abnormal; The warning information is sent to a preset display area to remind the user in the display area to re-plug the connection line between the sensor and the data interface.
8. An adaptive detection device for a sensor, characterized in that: The device is applied to a smart device, wherein the smart device comprises a plurality of sensors and a plurality of data interfaces, and the adaptive detection device of the sensor comprises: a generating module, configured to generate, when the sensor is connected to the data interface, a sensor mark indicating that the sensor and the data interface are connected, wherein the sensor mark indicates a connection relationship between the data interface and the sensor; A preprocessing module is used to preprocess the sensor tag and the preset sensor type to obtain tag information; wherein the tag information indicates the corresponding relationship between each of the sensors and the sensor type.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the adaptive detection method of the sensor according to any one of claims 1 to 7 are implemented.
10. An intelligent device, comprising a controller, a plurality of sensors and a plurality of data interfaces, characterized in that: The controller implements the steps of the adaptive detection method of the sensor according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Plug-and-play sensor module capable of supporting multiple interfaces
CN102608930A
Temperature sensor type identification method and system and air conditioner
CN107166659A
Sensor identification method, air conditioner, and computer readable storage medium
CN109028514A
Sensor data transmission device, sensor system and smart home system
CN217388740U
Cited By
Sensor management method, system, device, equipment, medium and product
CN120956755A