Anti-interference measurement method, device, equipment and medium for an electronic device

By generating the sensor identification matrix and performing two-dimensional array transformation, combining real-time verification codes with standard verification codes, the measurement inaccurate problem caused by interference between sensors is solved, and the anti-interference ability of electronic devices is improved.

CN117606534BActive Publication Date: 2025-07-04SHENYANG XINGHUA HWA YICK RAIL-TRAFFIC-ELECTRICAL APPL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311576144.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-07-04
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

Multiple sensors in existing electronic devices interfere with each other due to close distances, resulting in inaccurate measurement data and interference with the bus, affecting the accuracy of measurement results.

Method used

By receiving the sensor measurement data, combining the sensor identification array to generate the sensor identification matrix, using the pre-configured two-dimensional array transformation matrix, a sensor real-time verification code is generated, and compared with the pre-stored standard verification code, ensuring that measurement data is output only when all sensors are not disturbed.

Benefits of technology

It effectively avoids mutual interference between sensors and interference to the bus, improves the accuracy and reliability of the measured data, and ensures that the output data is consistent with the actual value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117606534B_ABST
    Figure CN117606534B_ABST
Patent Text Reader

Abstract

The present application provides an anti-interference measurement method, device, equipment and medium for an electronic device; relating to the field of digital measurement technology; including: receiving measurement data of each sensor of the electronic device; combining the sensor identification number arrays of each sensor to obtain a sensor identification matrix; using a pre-configured two-dimensional array to transform the sensor identification matrix to obtain a transformed sensor identification matrix; generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix; if the sensor real-time verification code is consistent with the sensor standard verification code pre-stored in the electronic device, then output the measurement arrays of each sensor of the electronic device as the measurement value of the electronic device. The present application can avoid mutual interference between multiple sensors and also avoid interference of multiple sensors on the bus of the electronic device, improving the anti-interference ability of the electronic device equipped with sensors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital measurement technologies, and in particular, to an anti-interference measurement method, device, equipment, and medium for an electronic device. Background Art

[0002] Existing electronic devices with environmental monitoring or data measurement capabilities generally integrate multiple sensors, and the multiple sensors are connected to a single bus; however, today's electronic devices are relatively small in size, resulting in a short distance between the multiple sensors, causing interference among the sensors when performing measurement tasks; moreover, the bus to which all sensors are connected is also subject to interference, leading to sensor data drift and inaccurate monitoring or measurement data output by the electronic device. Summary of the Invention

[0003] The purpose of the embodiments of this application is to provide an anti-interference measurement method, device, equipment, and medium for an electronic device, which can solve problems in the prior art such as easy interference in measurement, inaccurate measurement results, and data drift, and can improve the anti-interference effect of the electronic device and the bus, and output accurate measurement data.

[0004] In a first aspect, an anti-interference measurement method for an electronic device is provided. The electronic device includes multiple sensors; the method may include:

[0005] Receiving measurement data from each sensor of the electronic device; wherein, the measurement data of each sensor includes a sensor identification array and a measurement array corresponding to the sensor;

[0006] Merging the sensor identification arrays of the respective sensors to obtain a sensor identification matrix;

[0007] Transforming the sensor identification matrix using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix;

[0008] Generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix;

[0009] If the sensor real-time verification code is consistent with the sensor standard verification code pre-stored in the electronic device, then output the measurement arrays of the respective sensors of the electronic device as the measurement values of the electronic device.

[0010] In an optional implementation, before merging the sensor identification arrays of the respective sensors, the method further includes:

[0011] Obtaining basic information of each sensor; wherein, the basic information includes the number of sensors, the sensor number, and the number of bits of the elements of the sensor identification array; the number of bits of the elements of the sensor identification arrays of the respective sensors are the same;

[0012] Merge the sensor identification number arrays of the respective sensors to obtain a sensor identification matrix, including:

[0013] If the number of sensors of the electronic device is less than the number of bits of the elements of the sensor identification number array, generate padding rows according to the difference between the number of sensors and the number of bits of the elements of the sensor identification number array; wherein, the number of padding rows is the same as the difference; the value of each element in the padding rows is 0;

[0014] Arrange the sensor identification number arrays of the respective sensors in rows based on the order of the sensor numbers;

[0015] Add the padding rows below the sensor identification number arrays of the respective sensors arranged in rows to obtain a sensor identification matrix.

[0016] In an alternative implementation, merging the sensor identification number arrays of the respective sensors to obtain a sensor identification matrix further includes:

[0017] If the number of sensors of the electronic device is greater than the number of bits of the elements of the sensor identification number array, generate padding columns according to the difference between the number of sensors and the number of bits of the elements of the sensor identification number array; wherein, the number of padding columns is the same as the difference; the value of each element in the padding columns is 0;

[0018] Arrange the sensor identification number arrays of the respective sensors in rows based on the order of the sensor numbers;

[0019] Add the padding columns to the right of the elements in the last column of the sensor identification number arrays of the respective sensors arranged in rows to obtain a sensor identification matrix.

[0020] In an alternative implementation, transform the sensor identification matrix using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix, including:

[0021] For any diagonal element in the sensor identification matrix, calculate the transformation value of the diagonal element;

[0022] Replace the corresponding diagonal element in the sensor identification matrix with the transformation value of the diagonal element to obtain a transformed sensor identification matrix.

[0023] In an alternative implementation, the calculation formula for the transformation value of the diagonal element is as follows:

[0024]

[0025] Wherein, a represents the row value of the diagonal element; b represents the column value of the diagonal element; x a,b represents the element at the a-th row and b-th column in the sensor identification matrix, where a = b; i represents the total number of rows of the sensor identification matrix, and i is a non-zero positive integer; j represents the total number of columns of the sensor identification matrix, and j is a non-zero positive integer; i = j; r represents the random number of the electronic device.

[0026] In an alternative implementation, generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix includes:

[0027] Extracting the transformed values of all diagonal elements in the transformed sensor identification matrix;

[0028] Adding up the extracted transformed values of all diagonal elements to obtain the sensor real-time verification code.

[0029] In an alternative implementation, after generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix, the method further includes:

[0030] If the sensor real-time verification code is inconsistent with the sensor standard verification code pre-stored in the electronic device, deleting the measurement arrays of each sensor of the electronic device.

[0031] In a second aspect, an anti-interference measurement device for an electronic device is provided, and the device may include:

[0032] A receiving unit, configured to receive the measurement data of each sensor of the electronic device; wherein, the electronic device includes a plurality of sensors; the measurement data of each sensor includes a sensor identification array and a measurement array of the corresponding sensor;

[0033] A matrix generation unit, configured to merge the sensor identification arrays of each sensor to obtain a sensor identification matrix;

[0034] A matrix conversion unit, configured to transform the sensor identification matrix by using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix;

[0035] A verification output unit, configured to generate a sensor real-time verification code according to the elements in the transformed sensor identification matrix; if the sensor real-time verification code is consistent with the sensor standard verification code pre-stored in the electronic device, outputting the measurement arrays of each sensor of the electronic device as the measurement value of the electronic device.

[0036] In a third aspect, an electronic device is provided, and the electronic device includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;

[0037] A memory for storing a computer program;

[0038] A processor, when executing the program stored in the memory, implements any of the method steps described in the first aspect above.

[0039] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any of the method steps described in the first aspect above.

[0040] This application can avoid mutual interference between multiple sensors and also avoid interference of multiple sensors with the bus of an electronic device, improving the anti-interference ability of the electronic device equipped with sensors; it avoids sensor data drift and improves the accuracy and reliability of measurement data. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 It is a flowchart of an anti-interference measurement method for an electronic device provided by an embodiment of the present application;

[0043] Figure 2 It is a schematic structural diagram of an anti-interference measurement device for an electronic device provided by an embodiment of the present application;

[0044] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of them. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0046] The anti-interference measurement method of the electronic device provided by the embodiment of the present application can be applied to a server or a terminal with strong computing power. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal can be a user equipment (UE) such as a mobile phone, a smart phone, a laptop computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing devices connected to a wireless modem, a mobile station (MS), a mobile terminal, etc. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present application does not limit this here.

[0047] The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. And without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0048] Figure 1 It is a schematic flowchart of an anti-interference measurement method of an electronic device provided by an embodiment of the present application. As Figure 1 shown, the method may include:

[0049] Step S110: Receive the measurement data of each sensor of the electronic device; combine the sensor identification numbers of each sensor to obtain a sensor identification matrix.

[0050] In the embodiment of the present application, the electronic device includes multiple sensors and at least one main control chip; the main control chip at least includes a data storage, which is used to store the measurement values of each sensor, the number of sensors, the numbers of each sensor, and the device addresses corresponding to each sensor; the multiple sensors are connected to a bus, and each sensor can be of the same type or different types; each sensor is a sensor that supports a digital bus such as a single bus or IIC; and each sensor has a unique device address and a unique number; wherein, the number of the sensor can be determined according to the distance value from the sensor to the main control chip, or can be determined according to other parameters, or the numbers of each sensor can be set in advance.

[0051] In practical applications, the process for the main control chip of an electronic device to obtain the measurement values of each sensor may include: the main control chip sequentially accesses each sensor according to a command sequence, communicates with the corresponding sensor according to the device address of the sensor, and defines a read signal or a write signal based on the communication protocol. Specifically, the steps for the main control chip of an electronic device to obtain the measurement values of each sensor include: First, the main control chip generates a start signal, addresses and writes to the sensor, and then writes the register address of one or more bytes. Second, the main control chip sends the start signal again, addresses and reads each sensor to obtain the measurement values of each sensor.

[0052] In the embodiment of the present application, the electronic device uses a single bus (1-wire), that is, a single signal line is adopted. The single bus can transmit clock signals and data signals bidirectionally; the single bus is generally configured as an open-drain output, and there is a pull-up resistor on the bus. The main control chip or the sensor pulls the data line low to represent data 0 and releases the data line to represent data 1. In the actual application process, when the main control chip of the electronic device reads the data of the sensor, it needs to pull the data line to a low level. The sensor transmits 1 and 0 by pulling the bus high or low, and the bus is released after the transmission ends.

[0053] In the embodiment of the present application, the measurement data of each sensor includes the sensor identification array and the measurement array of the corresponding sensor; the number of bits of the elements in the sensor identification arrays of each sensor in the same electronic device is the same, but the specific elements are different.

[0054] In the embodiment of the present application, the sensor targeted is a sensor in which there is fixed data in the measurement return data and the fixed data of different sensors is different.

[0055] In practical applications, the built MCU + sensor or digital sensor generally includes an analog sensor + a microcontroller that can read analog quantities and convert them into digital quantities. Generally, the AD conversion resolution of this controller is 12 bits; the data is stored in two single-byte registers, and the remaining 4 bits are not valid values but self-defined values, and the values of these 4 bits are fixed for each sensor but different for different sensors. Therefore, using these special 4 bits as the sensor identification array can not only distinguish different sensors and avoid the sensor verification passing due to accidental factors; but also does not require separately generating or assigning a corresponding identification array for the sensor, and does not require separately storing the identification array. Extracting the special values of the sensor as the basis for verification identification reduces the processing steps while improving the reliability of verification.

[0056] In the embodiment of the present application, merging the sensor identification arrays of each sensor to obtain a sensor identification matrix includes:

[0057] Determine whether the number of sensors of the electronic device is less than the number of bits of the elements of the sensor identification array;

[0058] If the number of sensors of the electronic device is less than the number of bits of the elements of the sensor identification array, generate a padding row according to the difference between the number of sensors and the number of bits of the elements of the sensor identification array; arrange the sensor identification arrays of each sensor in rows based on the order of the sensor numbers; add the padding row below the sensor identification arrays of each sensor arranged in rows to obtain a sensor identification matrix.

[0059] If the number of sensors of the electronic device is greater than the number of bits of the elements of the sensor identification array, generate a padding column according to the difference between the number of sensors and the number of bits of the elements of the sensor identification array; where the number of padding columns is the same as the difference; the value of each element in the padding column is 0; arrange the sensor identification arrays of each sensor in rows based on the order of the sensor numbers; add the padding column to the right of the elements in the last column of the sensor identification arrays of each sensor arranged in rows to obtain a sensor identification matrix.

[0060] In the embodiments of the present application, the difference between the number of sensors of the electronic device and the number of bits of the elements of the sensor identification array is made up by using a padding row or a padding column, so that the obtained sensor identification matrix is a square matrix with equal row and column values. Where the number of the padding row or the padding column is the same as the difference between the number of sensors and the number of bits of the elements of the sensor identification array; the value of each element in the padding row or the padding column is 0.

[0061] For example, the electronic device includes 5 sensors (numbered 1, 2, 3, 4, 5) respectively, and the sensor identification array of each sensor includes 8-bit elements; at this time, the number of sensors is less than the number of bits of the elements of the sensor identification array. First, arrange the 5 groups of sensor identification arrays according to the corresponding sensor numbers. The sensor identification array corresponding to the sensor numbered 1 is located in the first row, and the sensor identification arrays corresponding to the other numbered sensors are located in the 2nd row, 3rd row, 4th row and 5th row in sequence, obtaining a 5-row * 8-column matrix; generate a padding row according to the difference between the number of sensors and the number of bits of the elements of the sensor identification array (i.e., 3); add 3 rows of padding rows below the 5th row to obtain an 8-row * 8-column matrix (i.e., the sensor identification matrix); where the value of each element in each row of the padding row is 0.

[0062] For example, an electronic device includes 6 sensors (numbered 1, 2, 3, 4, 5, and 6 respectively), and the sensor identification array of each sensor contains 5 - bit elements; at this time, the number of sensors is greater than the number of bits of the sensor identification array. First, arrange the 6 groups of sensor identification arrays according to the numbers of the corresponding sensors. The sensor identification array corresponding to the sensor numbered 1 is located in the first row, and the sensor identification arrays corresponding to the sensors with other numbers are successively located in the 2nd row, 3rd row, 4th row, 5th row, and 6th row, obtaining a 6 - row * 5 - column matrix; according to the difference between the number of sensors and the number of bits of the sensor identification array (i.e., 1), a padding column is generated; add 1 column of padding column to the right of the 5th column, obtaining a 6 - row * 6 - column matrix (i.e., the sensor identification matrix); among them, each element value of each row of the padding column is 0.

[0063] Step S120: Use a pre - configured two - dimensional array to transform the sensor identification matrix to obtain a transformed sensor identification matrix; generate a sensor real - time verification code according to the elements in the transformed sensor identification matrix.

[0064] In the embodiment of the present application, using a pre - configured two - dimensional array to transform the sensor identification matrix to obtain a transformed sensor identification matrix includes:

[0065] For any diagonal element in the sensor identification matrix, calculate the transformation value of the diagonal element;

[0066] Use the transformation value of the diagonal element to replace the corresponding diagonal element in the sensor identification matrix to obtain a transformed sensor identification matrix.

[0067] In the embodiment of the present application, the sensor identification matrix is a square matrix with the same number of rows and columns. Therefore, the diagonal elements in the sensor identification matrix are the elements with the same row value and column value in the sensor identification matrix.

[0068] In the embodiment of the present application, the calculation formula for the transformation value of the diagonal element is as follows:

[0069]

[0070] Among them, f(x) represents the transformation value of the diagonal element; a represents the row value of the diagonal element; b represents the column value of the diagonal element; x a,b represents the element in the a - th row and b - th column of the sensor identification matrix, a = b; i represents the total number of rows of the sensor identification matrix, i is a non - zero positive integer; j represents the total number of columns of the sensor identification matrix, j is a non - zero positive integer; i = j; r represents the random number of the electronic device.

[0071] In the embodiment of the present application, the random number of each electronic device is fixed; the random numbers of different electronic devices are different.

[0072] In the embodiment of the present application, the transformation value of the last diagonal element (i.e., the element in the last row and the last column of the sensor identification matrix) is obtained by adding the last diagonal element and the random number of the electronic device.

[0073] For example, if the sensor identification matrix A has 8 rows and 8 columns; then the elements in the 1st row and 1st column (A11), 2nd row and 2nd column (A22), 3rd row and 3rd column (A33), 4th row and 4th column (A44), 5th row and 5th column (A55), 6th row and 6th column (A66), 7th row and 7th column (A77), and 8th row and 8th column (A88) are taken as diagonal elements.

[0074] Specifically, calculating the transformation values of all diagonal elements includes: A11’ = A11 + A88, A22’

[0075] = A22 + A77, A33’ = A33 + A66, A44’ = A44 + A55, A55’ = A55 + A44, A66’ = A66 + A33, A77’ = A77 + A22; A88’ = A88 + r; where, A11’, A22’, A33’, A44’, A55’, A66’, A77’ and A88’ respectively represent the transformation values of A11, A22, A33, A44, A55, A66, A77 and A88; r represents the random number of the electronic device.

[0076] In the embodiment of the present application, generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix includes:

[0077] Extracting the transformation values of all diagonal elements in the transformed sensor identification matrix; adding the extracted transformation values to obtain the sensor real-time verification code.

[0078] For example, adding the transformation values of A11, A22, A33, A44, A55, A66, A77 and A88 obtained above can obtain the sensor real-time verification code; that is, adding A11’, A22’, A33’, A44’, A55’, A66’, A77’ and A88’ to obtain the sensor real-time verification code.

[0079] Step S130, determining whether the sensor real-time verification code is consistent with the sensor standard verification code prestored in the electronic device; if they are consistent, outputting the measurement arrays of each sensor of the electronic device as the measurement value of the electronic device; otherwise, deleting the measurement arrays of each sensor of the electronic device.

[0080] In the actual application process, before the electronic device leaves the factory, the main control chip sequentially accesses each sensor and obtains the identification arrays of each sensor; secondly, sorts the obtained identification arrays of each sensor according to the numbers, and arranges the sorted identification arrays of each sensor in rows to obtain a sensor standard matrix; then, extracts the diagonal elements (i.e., the elements with the same row value and column value) in the sensor standard matrix; then, uses the transformation value calculation formula of the diagonal elements to obtain the transformation values of the diagonal elements in the sensor standard matrix; sums up the transformation values of the diagonal elements in the sensor standard matrix to obtain a sensor standard check code; finally, stores the obtained sensor standard check code in the program memory of the main control chip.

[0081] In the embodiment of the present application, after each sensor collects data, a real-time check code needs to be generated, and the generated real-time check code is compared with the standard check code to determine whether the measurement data of the sensor this time is retained and output.

[0082] In the embodiment of the present application, by determining whether the real-time check code of the sensor is consistent with the sensor standard check code pre-stored in the electronic device, it is determined whether to retain the measurement arrays of each sensor obtained this time. When the real-time check code is inconsistent with the standard check code, it means that the sensor is interfered during the measurement process or the transmission process of the measurement data, and its data may be inaccurate data, which is different from the actual measurement value. Outputting measurement data different from the actual measurement value is not beneficial to the operation of the electronic device. Therefore, the present application selects to delete the measurement data that fails the check (i.e., the real-time check code is inconsistent with the standard check code).

[0083] In the embodiment of the present application, before outputting the data of the sensor, it is verified using the real-time check code, and only after passing the verification is it output as a measurement value, which can ensure that the output measurement value is consistent and has no difference from the actual measurement value.

[0084] Existing electronic devices equipped with sensors generally use a single check code or verify whether a certain element in the verification matrix or a certain flag bit in the measurement data is accurate to determine whether the sensor measurement data is interfered during the process. However, only using one element or flag bit for judgment, even when the sensor is interfered, it may be successfully verified due to accidental factors, resulting in inaccurate verification results, and it is impossible to avoid the successful verification event caused by accidental factors, so that the sensor data passing the verification still contains interference data and does not conform to the actual measurement value.

[0085] In the embodiments of the present application, a method of generating a verification code for a sensor by combining element transformation and adding the transformed elements is adopted, which can avoid the situation in existing electronic devices where verification is successful due to accidental elements. For the electronic device implementing the method of the present application, verification is successful only when the measurement data of the sensor is correct, and it is impossible to have successful verification due to accidental events, ensuring that the output sensor measurement value does not contain interfering data and is the same as the actual measurement value.

[0086] In the embodiments of the present application, the sensor identification array corresponding to each sensor is used as a row of a matrix, and one element is selected from each row for transformation and verification, indicating that each sensor of the electronic device is verified, ensuring the comprehensiveness and accuracy of the verification; moreover, the sensor verification code is generated from the transformed values of special elements corresponding to each sensor. Therefore, the sensor verification code can pass the verification only when all sensors are not interfered, ensuring that the output measurement data must be data where all sensors are not interfered; at the same time, since electronic devices with multiple sensors interfere with each other during the measurement process, if one sensor is interfered, it means that other sensors may also be interfered. In the present application, when the sensor verification code fails to pass the verification, the entire set of data is selected to be discarded, improving the accuracy and reliability of the measurement data of the electronic device.

[0087] Corresponding to the above method, the embodiments of the present application further provide an anti-interference measurement device for an electronic device, as Figure 2 shown. The anti-interference measurement device for the electronic device includes:

[0088] A receiving unit 210, configured to receive the measurement data of each sensor of the electronic device; wherein, the electronic device includes multiple sensors; the measurement data of each sensor includes the sensor identification array and the measurement array of the corresponding sensor;

[0089] A matrix generation unit 220, configured to merge the sensor identification arrays of each sensor to obtain a sensor identification matrix;

[0090] A matrix conversion unit 230, configured to transform the sensor identification matrix by using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix;

[0091] A verification output unit 240, configured to generate a real-time sensor verification code according to the elements in the transformed sensor identification matrix; if the real-time sensor verification code is consistent with the pre-stored sensor standard verification code in the electronic device, the measurement arrays of each sensor of the electronic device are output as the measurement value of the electronic device.

[0092] The functions of the functional units of the anti-interference measurement device of the electronic device provided in the foregoing embodiments of the present application can be implemented by the foregoing method steps. Therefore, the specific working processes and beneficial effects of each unit in the anti-interference measurement device of the electronic device provided in the embodiments of the present application will not be repeated here.

[0093] An embodiment of the present application further provides an electronic device, as Figure 3 shown, including a processor 310, a communication interface 320, a memory 330, and a communication bus 340. Among them, the processor 310, the communication interface 320, and the memory 330 complete communication with each other through the communication bus 340.

[0094] The memory 330 is used to store a computer program;

[0095] When the processor 310 is used to execute the program stored on the memory 330, the following steps are implemented:

[0096] Receive the measurement data of each sensor of the electronic device; among them, the electronic device includes multiple sensors; the measurement data of each sensor includes the sensor identification array and the measurement array of the corresponding sensor;

[0097] Merge the sensor identification arrays of each sensor to obtain a sensor identification matrix;

[0098] Use a pre-configured two-dimensional array to transform the sensor identification matrix to obtain a transformed sensor identification matrix;

[0099] Generate a sensor real-time verification code according to the elements in the transformed sensor identification matrix; if the sensor real-time verification code is consistent with the sensor standard verification code pre-stored in the electronic device, output the measurement arrays of each sensor of the electronic device as the measurement value of the electronic device.

[0100] The above-mentioned communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0101] The communication interface is used for communication between the above-mentioned electronic device and other devices.

[0102] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0103] The aforementioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0104] Since the implementation manners and beneficial effects of the components of the electronic device in the above embodiments for solving problems can be realized by referring to the steps in the Figure 1 illustrated embodiments, therefore, the specific working process and beneficial effects of the electronic device provided in the embodiments of the present application will not be repeated here.

[0105] In another embodiment provided by the present application, there is also provided a computer-readable storage medium storing instructions, which, when running on a computer, cause the computer to execute the anti-interference measurement method of the electronic device in any of the above embodiments.

[0106] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which, when running on a computer, cause the computer to execute the anti-interference measurement method of the electronic device in any of the above embodiments.

[0107] Those skilled in the art should understand that the embodiments in the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the embodiments in the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments in the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0108] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate a means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0109] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or a means for implementing the functions specified in multiple blocks.

[0111] Although the preferred embodiments in the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0112] Obviously, those skilled in the art can make various changes and variations to the embodiments in the embodiments of the present application without departing from the spirit and scope of the embodiments in the embodiments of the present application. Thus, if these modifications and variations of the embodiments in the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalent technologies, the embodiments in the embodiments of the present application are also intended to include these changes and variations.

Claims

1. An anti-interference measurement method for an electronic device, characterized in that, The electronic device includes a plurality of sensors; the method includes: Receiving measurement data of each sensor of the electronic device; wherein, the measurement data of each sensor includes a sensor identification array and a measurement array of the corresponding sensor; Merging the sensor identification arrays of each sensor to obtain a sensor identification matrix; Transforming the sensor identification matrix by using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix; Generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix; If the sensor real-time verification code is consistent with the sensor standard verification code pre-stored in the electronic device, output the measurement arrays of each sensor of the electronic device as the measurement value of the electronic device.

2. The method according to claim 1, wherein Before merging the sensor identification arrays of each sensor, the method further includes: Obtaining basic information of each sensor; wherein, the basic information includes the number of sensors, the sensor numbers, and the number of bits of the elements of the sensor identification array; the number of bits of the elements of the sensor identification array of each sensor is the same; Merging the sensor identification arrays of each sensor to obtain a sensor identification matrix, including: If the number of sensors of the electronic device is less than the number of bits of the elements of the sensor identification array, generating a padding row according to the difference between the number of sensors and the number of bits of the elements of the sensor identification array; wherein, the number of padding rows is the same as the difference; the value of each element in the padding row is 0; Arranging the sensor identification arrays of each sensor in rows based on the order of the sensor numbers; Adding the padding row below the sensor identification arrays of each sensor arranged in rows to obtain a sensor identification matrix.

3. The method according to claim 2, characterized in that, Merging the sensor identification arrays of each sensor to obtain a sensor identification matrix, further including: If the number of sensors of the electronic device is greater than the number of bits of the elements of the sensor identification array, generating a padding column according to the difference between the number of sensors and the number of bits of the elements of the sensor identification array; wherein, the number of padding columns is the same as the difference; the value of each element in the padding column is 0; Arranging the sensor identification arrays of each sensor in rows based on the order of the sensor numbers; Adding the padding column to the right of the elements in the last column of the sensor identification arrays of each sensor arranged in rows to obtain a sensor identification matrix.

4. The method according to claim 1, characterized in that, Transforming the sensor identification matrix by using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix, including: Calculating the transformation value of any diagonal element in the sensor identification matrix; Replacing the corresponding diagonal element in the sensor identification matrix with the transformation value of the diagonal element to obtain a transformed sensor identification matrix.

5. The method according to claim 4, wherein The calculation formula for the transformation value of the diagonal element is as follows: Among them, a represents the row value of the diagonal element; b represents the column value of the diagonal element; x a,b represents the element in the a-th row and b-th column of the sensor identification matrix, where a = b; i represents the total number of rows of the sensor identification matrix, and i is a non-zero positive integer; j represents the total number of columns of the sensor identification matrix, and j is a non-zero positive integer; i = j; r represents the random number of the electronic device.

6. The method according to claim 4, wherein Generating a sensor real-time verification code according to the elements in the transformed sensor identification matrix, including: Extracting the transformation values of all diagonal elements in the transformed sensor identification matrix; The sum of the transformation values of all the diagonal elements extracted is used to obtain the real-time sensor verification code.

7. The method according to claim 1, wherein After generating the real-time sensor verification code according to the elements in the transformed sensor identification matrix, the method further includes: If the real-time sensor verification code is inconsistent with the pre-stored sensor standard verification code in the electronic device, the measurement arrays of each sensor of the electronic device are deleted.

8. An anti-interference measurement device for an electronic device, characterized in that, The anti-interference measurement device of the electronic device includes: A receiving unit, configured to receive the measurement data of each sensor of the electronic device; wherein, the electronic device includes a plurality of sensors; the measurement data of each sensor includes a sensor identification array and a measurement array of the corresponding sensor; A matrix generation unit, configured to merge the sensor identification arrays of each sensor to obtain a sensor identification matrix; A matrix transformation unit, configured to transform the sensor identification matrix by using a pre-configured two-dimensional array to obtain a transformed sensor identification matrix; A verification output unit, configured to generate a real-time sensor verification code according to the elements in the transformed sensor identification matrix; if the real-time sensor verification code is consistent with the pre-stored sensor standard verification code in the electronic device, the measurement arrays of each sensor of the electronic device are output as the measurement values of the electronic device.

9. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; The memory is used for storing computer programs; The processor is configured to implement the method according to any one of claims 1-7 when executing the programs stored on the memory.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Measurement signal transmission method, measurement signal reconstruction method, corresponding equipment and wireless sensor network

    CN103533000A

  • Merging intensities in PHD filter based on sensor track ID

    CN105321379A