Data decoding method and device, equipment and storage medium
By sending radio frequency carriers in low-frequency readers and receiving echo encoded data, combining synchronous data heads and decoded data standard sequences, the problem of low-frequency readers failing to decode under long-distance interference is solved, and higher decoding accuracy and speed are achieved.
Patent Information
- Application Number
- CN202411742363.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In the case of interference in the long distance, the prior art medium and low frequency readers are prone to decoding failure due to interference, and data loss and incompleteness are problems.
By sending radio frequency carriers to the target detection area and receiving echo encoded data, generating to-process data, and determining the decoding start position based on the predefined synchronous data head, the to-process data is decoded using the pre-configured decoding standard sequence.
It significantly improves the decoding distance and decoding accuracy during decoding, saves storage space and decoding time, and has the advantages of fast decoding.
Smart Images

Figure CN119544809A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data decoding method, device, equipment and storage medium. Background Art
[0002] In the field of underground asset tracking and management, such as underground optical cable management, radio frequency identification (RFID) tags can be placed on the optical cables and scanned with special readers to identify and locate each optical cable, thereby simplifying the maintenance and management process.
[0003] In the prior art, when a low-frequency reader acquires data from an RFID tag, it usually decodes the acquired raw data by means of a timer and external interrupt rising and falling edges, thereby acquiring the data from the RFID tag.
[0004] However, this data decoding method is very likely to fail in decoding due to interference at long distances, resulting in data loss and incompleteness. Summary of the invention
[0005] The purpose of this application is to provide a data decoding method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problems of data loss and incompleteness in the prior art.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a data decoding method, the method comprising:
[0008] Sending a radio frequency carrier to the target detection area and receiving echo coded data from the target detection area;
[0009] Generate data to be processed corresponding to the echo coded data according to the echo coded data;
[0010] Determining a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header;
[0011] The data to be processed is decoded according to the decoding start position and a pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data.
[0012] In a possible implementation manner, before generating to-be-processed data corresponding to the echo coded data according to the echo coded data, the method further includes:
[0013] The echo coded data is preprocessed to generate preprocessed echo coded data.
[0014] In a possible implementation, determining a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header includes:
[0015] Generate binary data corresponding to the data to be processed according to the data to be processed;
[0016] A decoding start position in the data to be processed is determined according to the binarized data and a predefined synchronization data header.
[0017] In a possible implementation, generating binary data corresponding to the data to be processed according to the data to be processed includes:
[0018] Determining the average value of the data to be processed;
[0019] Binarized data corresponding to the data to be processed is generated according to the data to be processed and an average value of the data to be processed.
[0020] In a possible implementation, determining the decoding start position in the data to be processed according to the binarized data and a predefined synchronization data header includes:
[0021] Generate a sequence of data to be compared according to the binary data, wherein the sequence of data to be compared includes a plurality of data to be compared arranged in sequence, wherein the first data to be compared is the value of the first bit in the binary data, and, of two adjacent data to be compared, the latter data to be compared is a combination of the former data to be compared and the latter bit of the former data to be compared in the binary data;
[0022] Respectively calculating the correlation coefficients between each of the data to be compared and the synchronization data header to obtain a plurality of correlation coefficients;
[0023] The maximum correlation coefficient among the correlation coefficients is determined, and the position where the last bit of data in the to-be-compared data corresponding to the maximum correlation coefficient is located is incremented by one to serve as the decoding starting position.
[0024] In a possible implementation, decoding the data to be processed according to the decoding start position and a preconfigured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data includes:
[0025] Determining the data to be decoded in the data to be processed according to the decoding starting position;
[0026] The decoded data is obtained according to the data to be decoded and the standard sequence of the decoded data.
[0027] In a possible implementation manner, obtaining the decoded data according to the to-be-decoded data and the decoding data standard sequence includes:
[0028] Generate a sequence of data to be calculated according to the data to be decoded, wherein the sequence of data to be calculated includes a plurality of data to be calculated arranged in sequence, wherein the first data to be calculated is a value at the first position in the data to be decoded, and, of two adjacent data to be calculated, the latter data to be calculated is a combination of the former data to be calculated and the latter position of the former data to be calculated in the data to be decoded;
[0029] The similarity between each of the data to be calculated and the standard sequence of the decoded data is calculated respectively, and each of the similarities is judged. If the similarity is greater than a preset threshold, the decoded data corresponding to the similarity is assigned a first target value; if not, the decoded data corresponding to the similarity is assigned a second target value.
[0030] In a second aspect, another embodiment of the present application provides a data decoding device, the device comprising:
[0031] A receiving module, used to send a radio frequency carrier to a target detection area and receive echo coded data of the target detection area;
[0032] A generating module, used for generating to-be-processed data corresponding to the echo coded data according to the echo coded data;
[0033] A determination module, used to determine a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header;
[0034] The decoding module is used to decode the data to be processed according to the decoding starting position and a pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data.
[0035] In a possible implementation manner, before the generating module, it further includes: a preprocessing module, wherein the preprocessing module is used to preprocess the echo coded data to generate preprocessed echo coded data.
[0036] In a possible implementation, the determining module is specifically configured to:
[0037] Generate binary data corresponding to the data to be processed according to the data to be processed;
[0038] A decoding start position in the data to be processed is determined according to the binarized data and a predefined synchronization data header.
[0039] In a possible implementation, the determining module is specifically configured to:
[0040] Determining the average value of the data to be processed;
[0041] Binarized data corresponding to the data to be processed is generated according to the data to be processed and an average value of the data to be processed.
[0042] In a possible implementation, the determining module is specifically configured to:
[0043] Generate a sequence of data to be compared according to the binary data, wherein the sequence of data to be compared includes a plurality of data to be compared arranged in sequence, wherein the first data to be compared is the value of the first bit in the binary data, and, of two adjacent data to be compared, the latter data to be compared is a combination of the former data to be compared and the latter bit of the former data to be compared in the binary data;
[0044] Respectively calculating the correlation coefficients between each of the data to be compared and the synchronization data header to obtain a plurality of correlation coefficients;
[0045] The maximum correlation coefficient among the correlation coefficients is determined, and the position where the last bit of data in the to-be-compared data corresponding to the maximum correlation coefficient is located is incremented by one to serve as the decoding starting position.
[0046] In a possible implementation, the decoding module is specifically configured to:
[0047] Determining the data to be decoded in the data to be processed according to the decoding starting position;
[0048] The decoded data is obtained according to the data to be decoded and the standard sequence of the decoded data.
[0049] In a possible implementation, the decoding module is specifically configured to:
[0050] Generate a sequence of data to be calculated according to the data to be decoded, wherein the sequence of data to be calculated includes a plurality of data to be calculated arranged in sequence, wherein the first data to be calculated is a value at the first position in the data to be decoded, and, of two adjacent data to be calculated, the latter data to be calculated is a combination of the former data to be calculated and the latter position of the former data to be calculated in the data to be decoded;
[0051] The similarity between each of the data to be calculated and the standard sequence of the decoded data is calculated respectively, and each of the similarities is judged. If the similarity is greater than a preset threshold, the decoded data corresponding to the similarity is assigned a first target value; if not, the decoded data corresponding to the similarity is assigned a second target value.
[0052] In the third aspect, another embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.
[0053] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.
[0054] The beneficial effect of the present application is as follows: by sending a radio frequency carrier to the target detection area, and receiving the echo coded data of the target detection area, and generating the to-be-processed data corresponding to the echo coded data according to the echo coded data, it is possible to determine the decoding starting position in the to-be-processed data according to the to-be-processed data and a predefined synchronization data header, and then decode the to-be-processed data according to the decoding starting position and a preconfigured decoding data standard sequence to obtain decoded data corresponding to the echo coded data, thereby greatly improving the decoding distance and decoding accuracy during decoding. At the same time, since the decoding starting position is first determined by a predefined synchronization data header and then decoded by a preconfigured decoding data standard sequence, the present application also has the advantage of faster decoding speed, saving storage space and decoding time. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a scenario of a data decoding method provided in an embodiment of the present application;
[0057] Figure 2 A schematic diagram of a flow chart of a data decoding method provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of a flow chart for determining a decoding start position in data to be processed in a data decoding method provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of a flow chart for determining a decoding start position in data to be processed in a data decoding method provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a flow chart for determining a decoding start position in data to be processed in a data decoding method provided in an embodiment of the present application;
[0061] Figure 6 A schematic diagram of a flow chart for obtaining decoded data corresponding to echo coded data in the data decoding method provided in an embodiment of the present application;
[0062] Figure 7 A schematic diagram of a process for obtaining decoded data in a data decoding method provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of a data decoding device provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0066] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0067] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0068] In the prior art, when a low-frequency reader acquires data from an RFID tag, it usually decodes the acquired raw data through a timer and external interrupt edges, thereby acquiring the data from the RFID tag. However, this data decoding method is very likely to fail to decode due to interference at a long distance, resulting in data loss and incompleteness.
[0069] In the prior art, a method of searching for correlation peaks by collecting analog signal data through an analog-to-digital converter (ADC) is also available. This decoding method has strong anti-interference ability, but it has many problems such as large space occupation, long calculation time, and complex calculation. It cannot be implemented on a low-frequency reader with a low main frequency (less than or equal to 72Mhz main frequency, 2kRam).
[0070] Based on the above-mentioned problems, an embodiment of the present application proposes a data decoding method, which sends a radio frequency carrier to a target detection area, receives echo coded data of the target detection area, and generates to-be-processed data corresponding to the echo coded data according to the echo coded data, so that the decoding starting position in the to-be-processed data can be determined according to the to-be-processed data and a pre-defined synchronization data header, and then the to-be-processed data is decoded according to the decoding starting position and a pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data, which greatly improves the decoding distance and decoding accuracy during decoding, and at the same time, saves storage space and decoding time.
[0071] First, the relevant scenarios in which the data decoding method provided in the embodiments of the present application is applied are described.
[0072] Understandably, Figure 1 A schematic diagram of a data decoding method provided in an embodiment of the present application, referring to Figure 1 As shown, the data decoding method provided in the embodiment of the present application is applied to the data exchange process between the reader and the tag, wherein the tag can be a radio frequency identification tag (RFID for short), and the reader can be a reader-writer. The tag and the reader realize spatial coupling of radio frequency signals through coupling elements, thereby realizing data exchange.
[0073] For example, continue to refer to Figure 1 As shown, tags can be deployed on underground optical cables to store the properties of the underground optical cables and the surrounding environmental information. Users can hold a reader and obtain the property information and environmental information of the underground optical cables by executing the data decoding method provided in the embodiment of the present application.
[0074] The data decoding method provided in the embodiments of the present application is described in detail below in combination with multiple embodiments.
[0075] Figure 2 A schematic diagram of a data decoding method provided in an embodiment of the present application, referring to Figure 2 As shown, the execution subject of the method can be any electronic device with processing capability, such as the above-mentioned reader, and the method includes:
[0076] S201: Send a radio frequency carrier to a target detection area, and receive echo coding data of the target detection area.
[0077] Optionally, continue to refer to Figure 1 As shown, the reader can send a radio frequency carrier to the target detection area and receive the echo coded data of the target detection area under the operation of the user.
[0078] The target detection area can be understood as an area where a tag may exist, or as an area where any optical cable is located, the radio frequency carrier can be a radio wave, such as an electromagnetic wave, and the echo coded data can be the signal data sent by the tag after receiving the radio frequency carrier, specifically, the data processed by a specific coding method. Exemplarily, the echo coded data can include information such as an identification for indicating the tag, environmental temperature and humidity information, and user data of the optical cable.
[0079] S202: Generate data to be processed corresponding to the echo coded data according to the echo coded data.
[0080] It can be understood that after the echo coded data is obtained, since the echo coded data is analog signal data, before decoding the echo coded data, the analog signal data needs to be converted into digital signal data for decoding processing.
[0081] Optionally, the echo coded data may be converted from analog to digital to generate data to be processed corresponding to the echo coded data.
[0082] S203: Determine a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header.
[0083] It is understandable that after the data to be processed is obtained, the data to be processed may include additional unnecessary data. Therefore, it is necessary to first determine the decoding start position in the data to be processed so as to achieve accurate decoding.
[0084] Optionally, the data to be processed can be compared with a predefined synchronization data header to determine the decoding start position in the data to be processed. The predefined synchronization data header can be understood as a specific data sequence specially designed and placed at the beginning of the data stream in order to synchronize the data streams of the receiving end and the sending end.
[0085] S204 , decoding the data to be processed according to the decoding start position and the pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data.
[0086] Optionally, after determining the decoding start position, the data to be processed may be decoded starting from the decoding start position according to a preconfigured standard sequence of decoding data in the data to be processed, thereby obtaining decoded data corresponding to the echo coded data.
[0087] Among them, the pre-configured decoding data standard sequence can be understood as a set of standard data sequences for decoding that are pre-defined and configured according to specific encoding rules and protocols before data transmission or processing. This set of sequences usually contains a series of specific codewords or symbols for indicating the standard properties of the optical cable and standard environmental information, so that the reader can accurately obtain the decoded data by decoding the data standard sequence.
[0088] In this embodiment, by sending a radio frequency carrier to the target detection area, receiving echo coded data of the target detection area, and generating to-be-processed data corresponding to the echo coded data according to the echo coded data, it is possible to determine the decoding starting position in the to-be-processed data according to the to-be-processed data and a predefined synchronization data header, and then decode the to-be-processed data according to the decoding starting position and a preconfigured decoding data standard sequence to obtain decoded data corresponding to the echo coded data, thereby greatly improving the decoding distance and decoding accuracy during decoding. At the same time, since the decoding starting position is first determined by a predefined synchronization data header and then decoding is performed by a preconfigured decoding data standard sequence, the present application also has the advantage of faster decoding speed, saving storage space and decoding time.
[0089] In a possible implementation, before the above S202 generates to-be-processed data corresponding to the echo coded data according to the echo coded data, the step further includes:
[0090] The echo coded data is preprocessed to generate preprocessed echo coded data.
[0091] Optionally, before performing analog-to-digital conversion on the echo coded data, signal conditioning may be performed on the echo coded data, such as filtering and amplification, to improve the data quality of the echo coded data.
[0092] Figure 3 A schematic diagram of a flow chart for determining a decoding start position in data to be processed in a data decoding method provided in an embodiment of the present application.
[0093] In one possible implementation, referring to Figure 3As shown, the above S203 determines the decoding start position in the data to be processed according to the data to be processed and the predefined synchronization data header, which can be performed according to the following steps, specifically including:
[0094] S301 . Generate binary data corresponding to the data to be processed according to the data to be processed.
[0095] Optionally, after obtaining the data to be processed, the data to be processed may be binarized to generate binary data corresponding to the data to be processed, wherein the binary data is data in a data form containing only two values (such as 0 and 1).
[0096] Exemplarily, the data to be processed may be compared with a preset binarization threshold value to generate binarized data corresponding to the data to be processed.
[0097] S302: Determine a decoding start position in the data to be processed according to the binarized data and a predefined synchronization data header.
[0098] Optionally, after the binarized data is obtained, the binarized data may be compared with a predefined synchronization data header to determine a decoding start position in the data to be processed.
[0099] The binary data corresponding to the data to be processed is generated through the data to be processed, and the noise and redundant information in the data to be processed can be removed. According to the binary data and the pre-defined synchronization data header, the decoding starting position in the data to be processed is determined, which can simplify the complexity of the data processing process, so as to quickly locate the decoding starting position.
[0100] Figure 4 A schematic diagram of a flow chart for determining a decoding start position in data to be processed in a data decoding method provided in an embodiment of the present application.
[0101] In one possible implementation, referring to Figure 4 As shown, S301 generates binary data corresponding to the data to be processed according to the data to be processed, including:
[0102] S401, determining the average value of the data to be processed.
[0103] Optionally, after obtaining the data to be processed, the average value of the data to be processed may be calculated first.
[0104] Exemplarily, the data to be processed may include information such as label identification, ambient temperature and humidity information, and user data of the optical cable. The average values of the label identification, ambient temperature and humidity information, and user data of the optical cable in the data to be processed may be calculated respectively.
[0105] S402: Generate binary data corresponding to the data to be processed according to the data to be processed and the average value of the data to be processed.
[0106] Optionally, the label identification, ambient temperature and humidity information and user data of the optical cable in the data to be processed are compared with the average values of the label identification, ambient temperature and humidity information and user data of the optical cable in the data to be processed. If the current data to be processed is greater than the average value of the current data to be processed, the binary data corresponding to the current data to be processed is assigned a value of 1. If the current data to be processed is less than the average value of the current data to be processed, the binary data corresponding to the current data to be processed is assigned a value of 0. After all the data to be processed are compared, the binary data corresponding to the data to be processed is obtained.
[0107] By determining the average value of the data to be processed, binary data corresponding to the data to be processed is generated, which can simplify the data processing process, thereby improving the decoding speed, saving storage space and decoding time, and at the same time, it also has a strong interference ability.
[0108] Figure 5 A schematic diagram of a flow chart for determining a decoding start position in data to be processed in a data decoding method provided in an embodiment of the present application.
[0109] In one possible implementation, referring to Figure 5 As shown, the above S302 determines the decoding start position in the data to be processed according to the binarized data and the predefined synchronization data header, including:
[0110] S501. Generate a data sequence to be compared based on the binarized data.
[0111] Among them, the data sequence to be compared includes multiple data to be compared arranged in sequence, the first data to be compared is the value at the first position in the binary data, and, among two adjacent data to be compared, the latter data to be compared is a combination of the previous data to be compared and the latter position of the previous data to be compared in the binary data.
[0112] For example, taking the binary data "10010" as an example, the first data to be compared is "1", the second data to be compared is "10", the third data to be compared is "100", the fourth data to be compared is "1001", and the fifth data to be compared is "10010".
[0113] S502 , respectively calculating correlation coefficients between each data to be compared and the synchronization data header to obtain a plurality of correlation coefficients.
[0114] Optionally, after obtaining the sequence of data to be compared, correlation coefficients between each data to be compared and the synchronization data header may be calculated respectively to obtain a plurality of correlation coefficients corresponding to each data to be compared.
[0115] For example, the correlation coefficient R can be calculated using the following formula (1):
[0116]
[0117] Among them, n is the amount of data to be compared, x i is the data to be compared, y i It is the synchronization data header.
[0118] S503 , determining the maximum correlation coefficient among the correlation coefficients, and adding one to the position where the last bit of the data to be compared corresponding to the maximum correlation coefficient is located, as the decoding start position.
[0119] Optionally, after calculating multiple correlation coefficients, the multiple correlation coefficients can be sorted to determine the correlation coefficient with the largest value among the correlation coefficients as the maximum correlation coefficient, and the position of the last data in the data to be compared corresponding to the maximum correlation coefficient is increased by one as the decoding starting position.
[0120] Exemplarily, continuing to take the binary data "10010" as an example, if the maximum correlation coefficient is the correlation coefficient corresponding to the second data to be compared "10", the position after "10" is the starting position at this time.
[0121] By binarizing the data, a data sequence to be compared is generated, and the correlation coefficients of each data to be compared and the synchronization data header are calculated respectively to obtain multiple correlation coefficients, and the maximum correlation coefficient among the correlation coefficients is determined, and the position of the last data in the data to be compared corresponding to the maximum correlation coefficient is increased by one as the decoding starting position, which can quickly determine the decoding starting position. At the same time, since only addition and XOR operations are involved in calculating the correlation coefficient, a large amount of storage space can be saved, and it has a strong anti-interference ability.
[0122] Figure 6 A schematic diagram of a flow chart for obtaining decoded data corresponding to echo coded data in the data decoding method provided in an embodiment of the present application.
[0123] In one possible implementation, referring to Figure 6 As shown, in the above S204, the data to be processed is decoded according to the decoding starting position and the pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data, including:
[0124] S601. Determine data to be decoded in data to be processed according to a decoding start position.
[0125] Optionally, after the decoding start position is determined, the data to be decoded in the data to be processed may be determined starting from the decoding start position.
[0126] Exemplarily, the data to be decoded may include the identifier of the label in the data to be processed, the environmental temperature and humidity information, and the user data of the optical cable.
[0127] S602: Obtain decoded data according to the data to be decoded and a standard sequence of decoded data.
[0128] Optionally, the data to be decoded is compared with a standard sequence of decoded data to obtain decoded data.
[0129] Exemplarily, the standard sequence of decoding data may include the standard value of the label identification in the data to be processed, the standard value of the ambient temperature and humidity information, and the standard value of the user data of the optical cable. The data to be decoded may be compared with the standard sequence of decoding data. If the data to be decoded and the standard sequence of decoding data are different, the standard sequence of decoding data is used as the corresponding decoded data. If they are the same, the data to be decoded is used as the corresponding decoded data.
[0130] By decoding the starting position, the data to be decoded in the data to be processed is determined, and the decoded data is obtained through the data to be decoded and the standard sequence of the decoded data. This ensures that only the correct data segment is processed and avoids erroneous decoding of other irrelevant data. At the same time, decoding through the standard sequence of the decoded data can also reduce errors in the decoding process and improve data accuracy.
[0131] Figure 7 A schematic diagram of a flow chart for obtaining decoded data in a data decoding method provided in an embodiment of the present application.
[0132] In one possible implementation, referring to Figure 7 As shown, the above S602 obtains decoded data according to the data to be decoded and the standard sequence of the decoded data, including:
[0133] S701. Generate a data sequence to be calculated according to data to be decoded.
[0134] The sequence of data to be calculated includes a plurality of data to be calculated arranged in sequence.
[0135] The first data to be calculated is the value of the first bit in the data to be decoded, and the latter data to be calculated of two adjacent data to be calculated is a combination of the former data to be calculated and the latter bit of the former data to be calculated in the data to be decoded.
[0136] For example, taking the data to be decoded as "10010", the first data to be calculated generated is "1", the second data to be calculated is "10", the third data to be calculated is "100", the fourth data to be calculated is "1001", and the fifth data to be calculated is "10010".
[0137] S702, respectively calculating the similarity between each data to be calculated and the standard sequence of decoded data, and judging each similarity. If the similarity is greater than a preset threshold, the decoded data corresponding to the similarity is assigned a first target value; if not, the decoded data corresponding to the similarity is assigned a second target value.
[0138] Optionally, the similarity between each data to be calculated and the standard sequence of decoded data can be calculated respectively, and each similarity can be judged with a preset threshold value. If the similarity is greater than the preset threshold value, the decoded data corresponding to the similarity is assigned a first target value. If not, the decoded data corresponding to the similarity is assigned a second target value. The similarity calculation can use cosine similarity or correlation coefficient similarity shown in formula (1). The first target value can be 1, and the second target value can be 0.
[0139] Exemplarily, continuing to take the third data to be calculated as "100" as an example, if the similarity between the third data to be calculated and the third standard value in the decoded data standard sequence is greater than a preset threshold, the third bit in the decoded data is assigned a value of 1.
[0140] A data sequence to be calculated is generated through the data to be decoded, and the similarities between each data to be calculated and the standard sequence of decoded data are calculated respectively, and each similarity is judged. If the similarity is greater than a preset threshold, the decoded data corresponding to the similarity is assigned a first target value, if not, the decoded data corresponding to the similarity is assigned a second target value, which can quantify the difference between the data to be calculated and the standard sequence of decoded data, thereby improving the overall data processing accuracy, while reducing the computational complexity and time cost, and improving the efficiency of data processing.
[0141] Based on the same inventive concept, a data decoding device corresponding to the data decoding method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned data decoding method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0142] Figure 8 A schematic diagram of a data decoding device provided in an embodiment of the present application, referring to Figure 8 As shown, the device includes: a receiving module 801, a generating module 802, a determining module 803 and a decoding module 804; wherein,
[0143] The receiving module 801 is used to send a radio frequency carrier to the target detection area and receive the echo coding data of the target detection area;
[0144] A generating module 802, configured to generate to-be-processed data corresponding to the echo coded data according to the echo coded data;
[0145] A determination module 803 is used to determine a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header;
[0146] The decoding module 804 is used to decode the data to be processed according to the decoding start position and the pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data.
[0147] In a possible implementation, before the generating module 802, it further includes: a preprocessing module, the preprocessing module is used to preprocess the echo coded data to generate preprocessed echo coded data.
[0148] In a possible implementation, the determination module 803 is specifically configured to:
[0149] Generate binary data corresponding to the data to be processed according to the data to be processed;
[0150] The decoding start position in the data to be processed is determined according to the binarized data and a predefined synchronization data header.
[0151] In a possible implementation, the determination module 803 is specifically configured to:
[0152] Determine the average value of the data to be processed;
[0153] Binarized data corresponding to the data to be processed is generated according to the data to be processed and the average value of the data to be processed.
[0154] In a possible implementation, the determination module 803 is specifically configured to:
[0155] Generate a sequence of data to be compared according to the binary data, wherein the sequence of data to be compared includes a plurality of data to be compared arranged in sequence, wherein the first data to be compared is a value at the first position in the binary data, and, of two adjacent data to be compared, the latter data to be compared is a combination of the former data to be compared and the latter position of the former data to be compared in the binary data;
[0156] Calculate the correlation coefficients of each data to be compared and the synchronization data header respectively to obtain multiple correlation coefficients;
[0157] The maximum correlation coefficient among the correlation coefficients is determined, and the position where the last bit of the data to be compared corresponding to the maximum correlation coefficient is located is incremented by one to serve as the decoding start position.
[0158] In a possible implementation, the decoding module 804 is specifically configured to:
[0159] Determining the data to be decoded in the data to be processed according to the decoding starting position;
[0160] Decoded data is obtained according to the data to be decoded and the standard sequence of the decoded data.
[0161] In a possible implementation, the decoding module 804 is specifically configured to:
[0162] Generate a sequence of data to be calculated according to the data to be decoded, wherein the sequence of data to be calculated includes a plurality of data to be calculated arranged in sequence, wherein the first data to be calculated is a value at the first position in the data to be decoded, and, of two adjacent data to be calculated, the latter data to be calculated is a combination of the previous data to be calculated and the next position of the previous data to be calculated in the data to be decoded;
[0163] The similarity between each data to be calculated and the standard sequence of decoded data is calculated respectively, and each similarity is judged. If the similarity is greater than a preset threshold, the decoded data corresponding to the similarity is assigned to the first target value. If not, the decoded data corresponding to the similarity is assigned to the second target value.
[0164] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0165] The present application also provides an electronic device, such as Fig. 9 As shown, Fig. 9 The structural diagram of the electronic device provided in the embodiment of the present application includes: a processor 901, a memory 902, and optionally, a bus 903. The memory 902 stores machine-readable instructions executable by the processor 901 (for example, Figure 8 The receiving module 801, the generating module 802, the determining module 803 and the execution instructions corresponding to the decoding module 804 in the device, etc.), when the electronic device 900 is running, the processor 901 communicates with the memory 902 through the bus 903, and the steps of the above-mentioned data decoding method are executed by the processor 901.
[0166] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data decoding method are executed.
[0167] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0168] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially 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 to enable 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, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0169] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A data decoding method, characterized in that: include: Sending a radio frequency carrier to the target detection area and receiving echo coded data from the target detection area; Generate data to be processed corresponding to the echo coded data according to the echo coded data; Determining a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header; The data to be processed is decoded according to the decoding start position and a pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data.
2. The data decoding method according to claim 1, characterized in that: Before generating the to-be-processed data corresponding to the echo coded data according to the echo coded data, the method further includes: The echo coded data is preprocessed to generate preprocessed echo coded data.
3. The data decoding method according to claim 1, characterized in that: The step of determining a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header includes: Generate binary data corresponding to the data to be processed according to the data to be processed; A decoding start position in the data to be processed is determined according to the binarized data and a predefined synchronization data header.
4. The data decoding method according to claim 3, characterized in that: The step of generating binary data corresponding to the data to be processed according to the data to be processed includes: Determining the average value of the data to be processed; Binarized data corresponding to the data to be processed is generated according to the data to be processed and an average value of the data to be processed.
5. The data decoding method according to claim 3, characterized in that: The step of determining a decoding start position in the data to be processed according to the binarized data and a predefined synchronization data header includes: Generate a sequence of data to be compared according to the binary data, wherein the sequence of data to be compared includes a plurality of data to be compared arranged in sequence, wherein the first data to be compared is the value of the first bit in the binary data, and, of two adjacent data to be compared, the latter data to be compared is a combination of the former data to be compared and the latter bit of the former data to be compared in the binary data; Respectively calculating the correlation coefficients between each of the data to be compared and the synchronization data header to obtain a plurality of correlation coefficients; The maximum correlation coefficient among the correlation coefficients is determined, and the position where the last bit of data in the to-be-compared data corresponding to the maximum correlation coefficient is located is incremented by one to serve as the decoding starting position.
6. The data decoding method according to claim 1, characterized in that: The decoding of the data to be processed according to the decoding starting position and the pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data includes: Determining the data to be decoded in the data to be processed according to the decoding starting position; The decoded data is obtained according to the data to be decoded and the standard sequence of the decoded data.
7. The data decoding method according to claim 6, characterized in that: The step of obtaining the decoded data according to the to-be-decoded data and the decoding data standard sequence includes: Generate a sequence of data to be calculated according to the data to be decoded, wherein the sequence of data to be calculated includes a plurality of data to be calculated arranged in sequence, wherein the first data to be calculated is a value at the first position in the data to be decoded, and, of two adjacent data to be calculated, the latter data to be calculated is a combination of the former data to be calculated and the latter position of the former data to be calculated in the data to be decoded; The similarity between each of the data to be calculated and the standard sequence of the decoded data is calculated respectively, and each of the similarities is judged. If the similarity is greater than a preset threshold, the decoded data corresponding to the similarity is assigned a first target value; if not, the decoded data corresponding to the similarity is assigned a second target value.
8. A data decoding device, characterized in that: include: A receiving module, used to send a radio frequency carrier to a target detection area and receive echo coded data of the target detection area; A generating module, used for generating to-be-processed data corresponding to the echo coded data according to the echo coded data; A determination module, used to determine a decoding start position in the data to be processed according to the data to be processed and a predefined synchronization data header; The decoding module is used to decode the data to be processed according to the decoding starting position and a pre-configured standard sequence of decoding data to obtain decoded data corresponding to the echo coded data.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the data decoding method as described in any one of claims 1 to 7.
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 a processor, the steps of the data decoding method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Near field communication system and near field communication method
CN103187998A
Signal processing device and reader
CN110830086A
Signal processing method and device, electronic equipment and storage medium
CN114205054A
Manchester decoding method and device and readable storage medium
CN114826276A
Data decoding method and device, chip, communication equipment and storage medium
CN118337322A