Data transmission method and device based on dual-mode communication, equipment and storage medium

By employing a dual-mode communication method in the power Internet of Things (IoT), utilizing power line carrier and wireless communication to transmit data generated by the de Bruin sequence, the data transmission security problem caused by insufficient computing power of end devices is solved, achieving low-cost and high-security data transmission.

CN118353495BActive Publication Date: 2025-11-18BEIJING HUASHENG ZHONGNENG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410409388.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-07
Publication Date
2025-11-18
Estimated Expiration
2044-04-07

AI Technical Summary

Technical Problem

In the Internet of Things for power, the computing power of end devices is limited, making it difficult to encrypt data. Furthermore, increasing the computing power of end devices will increase costs, and the existing data transmission security is poor.

Method used

A data transmission method based on dual-mode communication is adopted, in which first power data and second power data are transmitted through power line carrier communication and wireless communication respectively. The first power data and second power data generated by the de Bruin sequence can be used to restore the original data at the target device.

Benefits of technology

It improves the security of data transmission, reduces the processing requirements of end devices, and ensures the validity and accuracy of data in complex power environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118353495B_ABST
    Figure CN118353495B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data transmission, and discloses a data transmission method and device based on dual-mode communication, equipment and a storage medium, the method comprising the following steps: determining target power data which needs to be transmitted to a target device; performing dual-mode communication between an end device and the target device, wherein the dual-mode communication comprises power line carrier communication and wireless communication; generating first power data and second power data according to the target power data; wherein the target power data can be restored based on the first power data and the second power data; transmitting the first power data to the target device in the mode of power line carrier communication; and transmitting the second power data to the target device in the mode of wireless communication. The application transmits two kinds of data converted from the target power data to the target device based on power line carrier communication and wireless communication, the required processing amount is small, and the safety of data transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method and device based on dual-mode communication, equipment and a storage medium. BACKGROUND

[0002] With the rapid development of the Internet of Things technology, the power Internet of Things, as an important application, is gradually being widely used in the power industry. With the interconnection between devices, a large amount of data is generated and transmitted in the power Internet of Things. How to safely transmit data has gradually become one of the important problems to be solved in the power Internet of Things.

[0003] At present, data encryption or desensitization and other methods are generally used to improve the security of data, but this processing method requires the device to have strong computing power. The power Internet of Things generally adopts a "cloud-management-edge-end" architecture, and the computing power of the end device is limited, making it difficult to realize data encryption. If the computing power of the end device is enhanced, the cost will increase, and the number of end devices is massive, which is difficult to realize in reality. SUMMARY

[0004] Therefore, the present application provides a data transmission method and device based on dual-mode communication, equipment and a storage medium to solve the problem of poor data transmission security of the end device.

[0005] In a first aspect, the present application provides a data transmission method based on dual-mode communication, applied to an end device, comprising:

[0006] determining target power data to be sent to a target device; the end device and the target device are in dual-mode communication, and the dual-mode communication includes power line carrier communication and wireless communication;

[0007] generating first power data and second power data according to the target power data; wherein the target power data can be restored based on the first power data and the second power data;

[0008] sending the first power data to the target device in the form of power line carrier communication; and sending the second power data to the target device in the form of wireless communication.

[0009] In some optional embodiments, the first power data and the second power data are generated according to the target power data, comprising:

[0010] dividing the target power data into at least one n-bit sub-data;

[0011] for any sub-data, a first sequence of m bits is generated by cyclically expanding a de Bruijn sequence with a subsequence length of n; m>2^n;

[0012] cyclically shifting the first sequence by k bits to generate a second sequence; k is a number of the sub-data;

[0013] taking the first sequence as part data of the first power data related to the sub-data, and taking the second sequence as part data of the second power data related to the sub-data.

[0014] In a second aspect, the present application provides a data transmission method based on dual-mode communication, applied to a target device, the method comprising:

[0015] acquiring first power data transmitted by an end device in a power line carrier communication manner, and acquiring second power data transmitted by the end device in a wireless communication manner; the end device and the target device are in dual-mode communication, and the dual-mode communication comprises the power line carrier communication and the wireless communication;

[0016] restoring original target power data according to the first power data and the second power data.

[0017] In some optional embodiments, the restoring original target power data according to the first power data and the second power data comprises:

[0018] dividing the first power data into at least one m-bit sequence, and dividing the second power data into at least one m-bit sequence;

[0019] for a first sequence of m bits in the first power data, determining a second sequence of m bits in the second power data corresponding to a position of the first sequence;

[0020] determining a number k of cyclic shifts between the first sequence and the second sequence, and restoring a sub-data of n bits with the number k;

[0021] generating original target power data according to all the restored sub-data.

[0022] In some optional embodiments, the determining the number k of cyclic shifts between the first sequence and the second sequence comprises:

[0023] reading out a first sub-sequence in the first sequence; the first sub-sequence is a de Bruijn sequence with a length of 2^n bits;

[0024] reading out a second sub-sequence in the second sequence; the second sub-sequence is a de Bruijn sequence with a length of 2^n bits;

[0025] determining an offset of a position of the second subsequence in the second sequence relative to a position of the first subsequence in the first sequence;

[0026] determining a number of bits shift of a cyclic shift of the second subsequence relative to the first subsequence;

[0027] determining a number of bits k of a cyclic shift between the first sequence and the second sequence according to the offset and the number of bits shift;

[0028] wherein, in a case that the second sequence is generated by cyclically right shifting the first sequence, the number of bits shift is a number of bits of a cyclic right shift of the second subsequence relative to the first subsequence, and:

[0029]

[0030] in a case that the second sequence is generated by cyclically left shifting the first sequence, the number of bits shift is a number of bits of a cyclic left shift of the second subsequence relative to the first subsequence, and: wherein, is a floor function.

[0031] In some optional embodiments, the determining the number of bits k of a cyclic shift between the first sequence and the second sequence further comprises:

[0032] in a case that there is no De Bruijn sequence with a length of 2^n bits in the first sequence or the second sequence, determining a number of bits of a cyclic shift between a subsequence of n bits in the first sequence and a subsequence of n bits in the second sequence at a same position;

[0033] counting all the numbers of bits of cyclic shifts, and taking a number of bits of a cyclic shift with a largest quantity as the number of bits k of a cyclic shift between the first sequence and the second sequence.

[0034] In a third aspect, the present application provides a data transmission device based on dual-mode communication, applied to an end device, the device comprising:

[0035] a determining module configured to determine target power data to be transmitted to a target device; the end device and the target device perform dual-mode communication, and the dual-mode communication comprises power line carrier communication and wireless communication;

[0036] a generating module configured to generate first power data and second power data according to the target power data; wherein the target power data can be restored based on the first power data and the second power data;

[0037] The sending module is configured to send the first power data to the target device in the power line carrier communication mode, and send the second power data to the target device in the wireless communication mode.

[0038] In a fourth aspect, the present application provides a data transmission device based on dual-mode communication, which is applied to a target device, and the device comprises:

[0039] The acquisition module is configured to acquire first power data transmitted by an end device in a power line carrier communication mode, and acquire second power data transmitted by the end device in a wireless communication mode; the end device and the target device perform dual-mode communication, and the dual-mode communication comprises the power line carrier communication and the wireless communication.

[0040] The restoration module is configured to restore original target power data according to the first power data and the second power data.

[0041] In a fifth aspect, the present application provides an electronic device, which comprises a memory and a processor, the memory and the processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission method based on dual-mode communication of the first aspect or any of the corresponding embodiments.

[0042] In a sixth aspect, the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the data transmission method based on dual-mode communication of the first aspect or any of the corresponding embodiments.

[0043] The data transmission method based on dual-mode communication provided by the present application only needs to convert the target power data into the first power data and the second power data, and then transmit the converted data to the target device based on the power line carrier communication and the wireless communication, so that the processing amount of the end device is small; and if an illegal person only intercepts the first power data or the second power data, the original target power data cannot be restored, so that the security of data transmission can be improved. In addition, the first power data and the second power data are represented by De Bruijn sequence, the processing mode of the end device is simple, and the power data can be accurately transmitted in a complex power environment, so that the effectiveness of the power data is ensured.

[0044] After the target device obtains the first power data and the second power data sent by the end device, the original target power data can be restored, so as to realize the secure transmission of the target power data. The first power data and the second power data are generated based on the de Bruijn sequence, so that the target device only needs to extract the de Bruijn sequence with a length of 2^n bits from the first sequence and the second sequence to determine the corresponding bit number k, the anti-interference ability is strong, and the sensitive data can be accurately transmitted between the end device and the target device. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the specific embodiments or related art, the drawings needed to be used in the specific embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0046] Figure 1 is a flowchart of the data transmission method based on dual-mode communication provided by the embodiment of the present application;

[0047] Figure 2 is a schematic diagram of dual-mode communication provided by the embodiment of the present application;

[0048] Figure 3 is a schematic diagram of generating the second sequence provided by the embodiment of the present application;

[0049] Figure 4 is another flowchart of the data transmission method based on dual-mode communication provided by the embodiment of the present application;

[0050] Figure 5 is a schematic diagram of extracting the subsequence provided by the embodiment of the present application;

[0051] Figure 6 is a working flowchart of the dual-mode communication system provided by the embodiment of the present application;

[0052] Figure 7 is a structural block diagram of the data transmission device based on dual-mode communication provided by the embodiment of the present application;

[0053] Figure 8 is another structural block diagram of the data transmission device based on dual-mode communication provided by the embodiment of the present application;

[0054] Figure 9 is a hardware structure schematic diagram of the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] According to an embodiment of the present invention, a data transmission method based on dual-mode communication is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0057] This embodiment provides a data transmission method based on dual-mode communication, which can be used in the end device of the power Internet of Things. The end device is capable of dual-mode communication with the target device, and the dual-mode communication specifically includes power line carrier communication and wireless communication. Figure 1 This is a flowchart of a data transmission method based on dual-mode communication according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps.

[0058] Step S101: Determine the target power data to be sent to the target device; the terminal device and the target device communicate in a dual-mode manner, which includes power line carrier communication and wireless communication.

[0059] In this embodiment, the end device is an edge device of the power Internet of Things (IoT), which can collect power data at the edge and upload the power data to the corresponding target device, such as a aggregation node in the power IoT. After the end device collects the power data that needs to be sent to the target device, it uses this power data as the target power data to be sent.

[0060] Some of the end devices are capable of dual-mode communication with the target device, meaning they can communicate using both power line carrier communication and wireless communication. Accordingly, the end device can send the target power data to the target device using dual-mode communication.

[0061] Figure 2 This diagram illustrates a scenario where a terminal device and a target device engage in dual-mode communication. For example... Figure 2 As shown, the terminal device 201 includes a power line carrier communication module 2011 and a wireless communication module 2012. Based on the power line carrier communication module 2011 and the wireless communication module 2012, dual-mode communication can be realized between the terminal device 201 and the target device 202.

[0062] In step S102, the first power data and the second power data are generated according to the target power data; wherein the target power data can be restored based on the first power data and the second power data.

[0063] In this embodiment, the computing capability of the end device is generally limited, for example, the end device is a smart meter, etc.; after the end device collects the target power data, the first power data and the second power data are generated based on the target power data.

[0064] Specifically, the target power data is the difference data between the first power data and the second power data, for example, target power data = second power data - first power data, or the target power data is the exclusive or result of the second power data and the first power data, so that after the target device obtains the first power data and the second power data, the original target power data can be restored based on the first power data and the second power data.

[0065] In step S103, the first power data is transmitted to the target device in the form of power line carrier communication, and the second power data is transmitted to the target device in the form of wireless communication.

[0066] In this embodiment, after the end device generates the first power data and the second power data, the two kinds of data are transmitted to the target device based on different ways. Specifically, the end device transmits the first power data to the target device based on power line carrier communication, and transmits the second power data to the target device based on wireless communication.

[0067] For example, as shown in Figure 2 The end device 201 transmits the first power data to the target device 202 based on the power line carrier communication module 2011, and the end device 201 transmits the second power data to the target device 202 based on the wireless communication module 2022.

[0068] In some optional embodiments, due to the complex transmission environment of power Internet of Things, noise interference is easy to exist, which may cause the problem of data transmission error. In this embodiment, the above step S102 "generating the first power data and the second power data according to the target power data" can specifically include steps A1 to A4.

[0069] In step A1, the target power data is divided into at least one n-bit sub-data.

[0070] In this embodiment, when the terminal device uploads the target power data, it uploads it sequentially in units of n bits, that is, it divides the target power data into one or more n-bit sub-data. For example, if n=4 and the target power data is 12 bits, then the target power data can be divided into three 4-bit sub-data.

[0071] If the number of bits in the target power data is not divisible by n, then the sub-data corresponding to the highest bit of the target power data will have fewer than n bits, but this will not affect subsequent processing. Here, n ≥ 2; generally, n = 2, 3, or 4.

[0072] Step A2: For any sub-data, generate an m-bit first sequence by cyclically expanding the de Bruin sequence of length n; m>2^n.

[0073] In this embodiment, after the target power data is divided into one or more sub-data, for any sub-data, the same processing method is used, that is, the first sequence and the second sequence corresponding to the sub-data are generated according to the process of steps A2 to A4.

[0074] Specifically, for an n-bit sub-data, a De Bruijn sequence can be defined, where the subsequence length of the De Bruijn sequence is also n. That is, the De Bruijn sequence includes all arbitrary subsequences of length n. For example, if n = 2, the De Bruijn sequence can be 0011, which non-repeatingly contains subsequences of any length 2: 00, 01, 11, 10. Similarly, if n = 3, the De Bruijn sequence can be 00010111, which includes all subsequences of length 3: 000, 001, 010, 101, 011, 111, 110, 100.

[0075] Based on the properties of the de Bruin sequence, if the length of the Ricci subsequence is n, then the length of the de Bruin sequence is 2^n. For example, if n = 2, then the length of the de Bruin sequence is 2^2 = 4; if n = 3, then the length of the de Bruin sequence is 2^3 = 8, and so on.

[0076] In this embodiment, for an n-bit sub-data, an m-bit sequence, i.e., the first sequence, is generated; wherein, the first sequence is generated by cyclically expanding the de Bruin sequence. It can be understood that since the length of the de Bruin sequence is 2^n, the length m of the first sequence is greater than 2^n.

[0077] Since the de Bruin sequence is a cyclic sequence, cyclic expansion of the de Bruin sequence means that, based on the de Bruin sequence, the data in the de Bruin sequence is expanded sequentially. After expanding to a complete de Bruin sequence, the data in the de Bruin sequence is expanded again, so that the final generated first sequence includes at least one de Bruin sequence. Furthermore, based on the properties of the de Bruin sequence, any consecutive 2^n bit sequence in the first sequence is also a de Bruin sequence.

[0078] For example, if n = 2 and the de Brouin sequence used is 0011, then expanding the de Brouin sequence 0011 can generate a first sequence of the form 0011 0011 0011 0011. For example, if m = 12, then as follows... Figure 3 As shown, the first sequence is 0011 0011 0011; and any sequence of four consecutive bits is also a de Bruin sequence, such as 0011 (first 4 bits), 0110 (bits 2 to 5), 1100 (bits 3 to 6), 1001 (bits 4 to 7), etc.

[0079] Generally, in order to improve the anti-interference ability of data transmission, m≥2×2^n, that is, the first sequence is generated by extending a complete de Bruin sequence on the basis of at least one de Bruin sequence.

[0080] Step A3: Circularly shift the first sequence by k positions to generate the second sequence; k is the value of the sub-data.

[0081] In this embodiment, for an n-bit sub-data, the value k of the sub-data is determined; after generating the first sequence, the first sequence is cyclically shifted by k bits to generate the corresponding second sequence; wherein, the cyclic shift can be a cyclic left shift or a cyclic right shift. It can be understood that the length of the second sequence is also m, that is, both the second sequence and the first sequence are m-bit sequences.

[0082] For example, if n = 3, and the sub-data of the n bits is 101B (B represents binary), then the value of 101B can be determined as k = 5. After that, the first sequence is cyclically shifted by 5 bits to generate the second sequence.

[0083] See Figure 3 As shown, if n=2 and the sub-data is 11B, that is, its value k=3, then the second sequence can be obtained by cyclically shifting 3 bits to the right based on the first sequence 00110011 0011: 1001 1001 1001.

[0084] Step A4: The first sequence is taken as the part of the first power data related to the sub-data, and the second sequence is taken as the part of the second power data related to the sub-data.

[0085] In this embodiment, since the target power data can be divided into multiple n-bit sub-data, for each sub-data, a corresponding first sequence and second sequence can be determined. Therefore, the first power data can be generated based on multiple first sequences, that is, the first sequence is the part of the first power data related to a certain sub-data. Similarly, the second power data can be generated based on multiple second sequences, and the second sequence is also the part of the second power data related to a certain sub-data. Finally, the required first power data and second power data are generated.

[0086] The first and second sequences are generated based on the de Bruin sequence. The end device only needs to perform cyclic expansion on the preset de Bruin sequence and cyclic shift on the generated first sequence. The processing method is simple and the amount of processing is small. Furthermore, using the first and second sequences, the target device can also restore the original data even in the presence of interference. The restoration process will be described in detail later.

[0087] The data transmission method based on dual-mode communication provided in this embodiment only requires the end device to convert the target power data into first power data and second power data. Then, the converted two types of data are transmitted to the target device respectively via power line carrier communication and wireless communication. The processing load required by the end device is relatively small. Furthermore, if an attacker only intercepts the first or second power data, they cannot reconstruct the original target power data, thereby improving the security of data transmission. In addition, using de Bruin sequences to represent the first and second power data simplifies the processing performed by the end device and ensures accurate transmission of power data even in complex power environments, guaranteeing the validity of the power data.

[0088] This embodiment provides a data transmission method based on dual-mode communication, which can be used for target devices in the power Internet of Things. The target device is able to perform dual-mode communication with end devices, specifically including power line carrier communication and wireless communication. Figure 4 This is a flowchart of a data transmission method based on dual-mode communication according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps.

[0089] Step S401: Obtain first power data transmitted by the end device in the form of power line carrier communication, and obtain second power data transmitted by the end device in the form of wireless communication; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including power line carrier communication and wireless communication.

[0090] In this embodiment, as Figure 1 In the illustrated embodiment, after the terminal device collects the target power data, it converts the target power data into first power data and second power data, and transmits the first power data and second power data to the target device respectively using different communication methods, so that the target device can receive the first power data and second power data. For example, the process of the target device 202 acquiring the first power data and second power data can be found in [reference needed]. Figure 3 As shown.

[0091] Step S402: Reconstruct the original target power data based on the first power data and the second power data.

[0092] In this embodiment, after the target device obtains the first power data and the second power data, it can restore the original power data, i.e., the target power data, based on the two power data.

[0093] In some optional implementations, the first power data and the second power data are generated based on the de Bruin sequence, and the specific generation process can be found in steps A1 to A4 above; in this case, step S402 "restores the original target power data based on the first power data and the second power data" includes steps B1 to B4.

[0094] Step B1: Divide the first power data into a sequence of at least m bits, and divide the second power data into a sequence of at least m bits.

[0095] Step B2: For the first m-bit sequence in the first power data, determine the second m-bit sequence in the second power data corresponding to the position of the first sequence.

[0096] In this embodiment, since the sequence generated by the end device when generating the first power data and the second power data is m bits, the target device also divides the first power data and the second power data in units of m bits, dividing them into corresponding sequences, each sequence being m bits in length.

[0097] Furthermore, a certain m-bit sequence in the first power data is called the first sequence, and correspondingly, the m-bit sequence in the second power data corresponding to the position of the first sequence is called the second sequence. For example, if the first sequence is the first sequence in the first power data, then the first sequence is also the second sequence in the second power data, to ensure that the two are in corresponding positions.

[0098] Step B3: Determine the number of bits k that are cyclically shifted between the first sequence and the second sequence, and restore the n-bit sub-data with the value k.

[0099] In this embodiment, after determining the first m-bit sequence and the second m-bit sequence, the number of bits k cyclically shifted between them can be determined, thereby determining the binary sub-data corresponding to that number of bits k, i.e., the n-bit sub-data. It can be understood that 0 ≤ k ≤ 2^n - 1; for example, if n = 3, then 0 ≤ k ≤ 7.

[0100] For example, if the first sequence and the second sequence are as follows Figure 3 As shown, if the end device generates the second sequence using a circular right shift, then the number of bits shifted right between the first and second sequences is 3, i.e., k = 3; correspondingly, the 2-bit sub-data is 11B. Similarly, if the end device generates the second sequence using a circular left shift, then the number of bits shifted left between the first and second sequences is 1, i.e., k = 1; correspondingly, the 2-bit sub-data is 01B.

[0101] Optionally, step B3, "determining the number of bits k for the cyclic shift between the first sequence and the second sequence", may specifically include steps B31 to B35.

[0102] Step B31: Read out the first subsequence in the first sequence; the first subsequence is a de Bruin sequence of length 2^n bits.

[0103] Step B32: Read out the second subsequence in the second sequence; the second subsequence is a de Bruin sequence of length 2^n bits.

[0104] In this embodiment, if there is no interference during data transmission between the end device and the target device, i.e., the target device correctly receives the first power data and the second power data, then for the m-bit first sequence of the first power data, any 2^n bit sequence is a de Bruin sequence; similarly, for the m-bit second sequence of the second power data, any 2^n bit sequence is also a de Bruin sequence. However, if interference causes errors in some of the data received by the target device, then some 2^n bit sequences in the first or second sequence on the target device side will not be de Bruin sequences. In this embodiment, the first and second sequences are filtered to extract the de Bruin sequences.

[0105] Specifically, the target device extracts a de Brouin sequence of length 2^n bits from the first sequence, and calls this sequence the first subsequence; similarly, it also extracts a de Brouin sequence of length 2^n bits from the second sequence, and calls this sequence the second subsequence.

[0106] by Figure 3 Taking the first and second sequences shown as examples, a schematic diagram of the extracted first and second subsequences can be found in [reference needed]. Figure 5 As shown.Figure 5 As shown, n=2, the first subsequence extracted from the first sequence is 0011, and the second subsequence extracted from the second sequence is 1100.

[0107] Step B33: Determine the position of the second subsequence in the second sequence, and the offset relative to the position of the first subsequence in the first sequence.

[0108] In this embodiment, the 2^n-bit second subsequence is a portion of the m-bit second sequence, corresponding to a specific position within the second sequence. For example, the position of the first data point in the second subsequence within the second sequence represents the position of the second subsequence itself. Similarly, the position of the first subsequence within the first sequence can also be determined. The two positions may be the same or different; this embodiment requires determining the offset between the two positions.

[0109] like Figure 5 As shown, if we represent it by the position of the first data in the subsequence, then the first subsequence 0011 is the first position in the first sequence, and the second subsequence 1100 is the fourth position in the second sequence. Therefore, the offset between the two is 3, that is, offset = 3.

[0110] Specifically, the first subsequence and the second subsequence corresponding to the position can be extracted preferentially from the first sequence and the second sequence, that is, the offset is 0.

[0111] Step B34: Determine the number of bits shifted by the second subsequence relative to the first subsequence.

[0112] Based on the properties of the de Bruin sequence, it is known that for two sequences formed by cyclic expansion of the de Bruin sequence, the number of bits of cyclic shift between any 2^n bit first subsequence and second subsequence with a fixed offset is fixed.

[0113] like Figure 5 As shown, the second subsequence 1100 is obtained by cyclically shifting the first subsequence 0011 two bits to the right. The first subsequence consists of bits 2 to 5 of the first sequence, i.e., the first subsequence is 0110. The second subsequence consists of bits 5 to 8 of the second sequence (only then can we ensure that the offset is still 3), i.e., the second subsequence is 1001. This second subsequence 1001 is also obtained by cyclically shifting the first subsequence 0110 two bits to the right.

[0114] Therefore, after extracting the first and second subsequences with known positions, the number of bits for the cyclic shift between them can be determined. For example... Figure 5As shown, the number of bits shifted left by the second subsequence 1100 relative to the first subsequence 0011 is shift = 2, and the number of bits shifted right by the second subsequence is also shift = 2.

[0115] Step B35: Determine the number of bits k for the cyclic shift between the first and second sequences based on the offset and the number of bits shift.

[0116] In this embodiment, after obtaining the offset and shift values ​​between the second and first subsequences, the number of bits k cyclically shifted between the entire first and second sequences can be determined. That is, this number of bits k is independent of the data in the first sequence excluding the first subsequence, and also independent of the data in the second sequence excluding the second subsequence. In other words, even if some data in the first and second sequences is incorrect, as long as the consecutive 2^n bit data sequence in both sequences is a de Bruin sequence, the number of bits k can be calculated.

[0117] If the terminal device generates the second sequence by a circular right shift, meaning the second sequence is generated by a circular right shift based on the first sequence, then the number of bits shift determined by the target device is also the number of bits shifted circularly to the right relative to the first subsequence. Furthermore, the final determined number of bits k satisfies the following equation (1):

[0118]

[0119] In this embodiment, when shifting cyclically to the right, the offset between the first subsequence and the second subsequence will increase the number of bits shifted cyclically to the right between the two subsequences. That is, the larger the offset, the larger the number of bits shifted cyclically to the right. Therefore, when determining the number of bits k shifted cyclically to the right between the first and second sequences, it is necessary to determine the number of bits k based on the difference between the number of bits shifted cyclically to the right and the offset.

[0120] Furthermore, since 0 ≤ k ≤ 2^n - 1, and shift-offset may be negative, this embodiment constructs the above equation (1) based on the floor function. When shift-offset is negative, floor function can be used to obtain a smaller negative number (larger absolute value), thus ensuring that the determined k is between 0 and 2^n - 1. When shift-offset is positive, the above equation (1) calculates the remainder of shift-offset, which also ensures that 0 ≤ k ≤ 2^n - 1.

[0121] by Figure 5 For example, if n = 2, shift = 2, and offset = 3, then shift - offset = -1. At this point, That is, the second sequence is obtained by cyclically shifting the first sequence 3 bits to the right, and its corresponding sub-data is 11B.

[0122] Similarly, if the end device generates the second sequence by a circular left shift, i.e., the second sequence is generated by a circular left shift based on the first sequence, then the number of bits shift determined by the target device is also the number of bits of the second subsequence circularly shifted to the left relative to the first subsequence, and the final determined number of bits k satisfies the following equation (2):

[0123]

[0124] In this embodiment, when cyclically shifting left, the positional offset between the first subsequence and the second subsequence will reduce the number of bits shifted left between the two subsequences. That is, the larger the offset, the smaller the number of bits shifted left. Therefore, when determining the number of bits k cyclically shifted left between the first sequence and the second sequence, it is necessary to determine the number of bits k based on the sum of the number of bits shifted left and the offset, shift + offset.

[0125] Furthermore, since 0 ≤ k ≤ 2^n - 1, and shift + offset may be negative (the offset may be negative), this embodiment constructs the above equation (2) based on the floor function. When shift + offset is negative, it can be floored down to obtain a smaller negative number (larger absolute value), thus ensuring that the determined k is between 0 and 2^n - 1. When shift + offset is positive, the above equation (2) calculates the remainder of shift + offset, which also ensures that 0 ≤ k ≤ 2^n - 1.

[0126] by Figure 5 For example, if n = 2, shift = 2, and offset = 3, then shift + offset = 5. At this point, That is, the second sequence is obtained by cyclically shifting the first sequence left by 1 bit, and its corresponding sub-data is 01B.

[0127] Optionally, the premise for determining the number of bits k based on steps B1 to B3 above is that both the first sequence and the second sequence contain a de Bruin sequence; if one of the sequences does not contain a de Bruin sequence, then the number of bits k needs to be determined based on steps B36 to B37 below. Specifically, step B3 above, "determining the number of bits k of the cyclic shift between the first sequence and the second sequence", also includes steps B36 to B37.

[0128] Step B36: If there is no de Brouin sequence of length 2^n bits in the first sequence or the second sequence, determine the number of cyclic shifts between the n-bit subsequence in the first sequence and the n-bit subsequence at the same position in the second sequence.

[0129] In this embodiment, if either the first sequence or the second sequence does not have a de Bruin sequence of length 2^n bits, the de Bruin sequence that exists can be determined based on the other sequence. Furthermore, since the de Bruin sequence is a cyclic permutation of an n-bit subsequence, the cyclic shift number between the n-bit subsequence in the first sequence and the n-bit subsequence at the same position in the second sequence can be determined based on the determined de Bruin sequence.

[0130] For example, if n = 3, and the determined de Bruin sequence is 00010111, then based on this de Bruin sequence, the order of the eight subsequences of length 3 can be determined as: 000, 001, 010, 101, 011, 111, 110, 100. For the 3-bit subsequences in the first and second sequences, it must be one of the above eight. Based on the positions of the two n-bit subsequences extracted from the first and second sequences within 000, 001, 010, 101, 011, 111, 110, 100, the cyclic shift number between them can be determined.

[0131] For example, if the 3-bit subsequence extracted from the first sequence is 001, it is the second one in the above arrangement. If the 3-bit subsequence extracted from the same position in the second sequence is also 001, then the cyclic shift between the two is 0; if the 3-bit subsequence extracted from the same position in the second sequence is 010 (which is the third one in the above arrangement), then the cyclic right shift between the two is 1, or the cyclic left shift is 7.

[0132] Step B37: Count all the cyclic shift bits and take the cyclic shift bit with the largest number as the cyclic shift bit k between the first sequence and the second sequence.

[0133] For example, if m = 12, then 12 n-bit subsequences can be obtained from the 12-bit first sequence, and 12 n-bit subsequences can also be obtained from the 12-bit second sequence, thus ultimately yielding 12 cyclic shift positions. The cyclic shift position with the largest number of these 12 cyclic shift positions can be used as the number of cyclic shift positions k between the first and second sequences.

[0134] If neither the first nor the second sequence contains a de Brouin sequence of length 2^n bits, it indicates that the interference is too severe to accurately reconstruct the original target power data. In this case, the target device sends a retransmission command to the end device, allowing the end device to retransmit the first and second power data. Alternatively, to ensure data accuracy, if either the first or second sequence lacks a de Brouin sequence of length 2^n bits, a retransmission command can also be sent to the end device, depending on the specific circumstances.

[0135] Step B4: Generate the original target power data based on all the sub-data obtained from the restoration.

[0136] In this embodiment, for any sub-data, n bits of sub-data with a value of k can be obtained based on the above steps B1 to B3. By concatenating all the sub-data, the original target power data can be generated.

[0137] The data transmission method based on dual-mode communication provided in this embodiment allows the target device to reconstruct the original target power data after receiving the first and second power data sent by the end device, thereby achieving secure transmission of the target power data. The first and second power data are generated based on de Bruin sequences, enabling the target device to determine the corresponding bit depth k simply by extracting a 2^n-bit de Bruin sequence from the first and second sequences. This method exhibits strong anti-interference capabilities and ensures accurate transmission of sensitive data between the end device and the target device.

[0138] This embodiment provides a dual-mode communication system, including an end device and a target device. The end device is capable of dual-mode communication with the target device, specifically including power line carrier communication and wireless communication. The end device is capable of performing... Figure 1 The method of the illustrated embodiment can be executed by the target device. Figure 4 The method of the illustrated embodiment.

[0139] Figure 6 This is a schematic diagram of one working process of the dual-mode communication system, such as... Figure 6 As shown, the working process of the dual-mode communication system includes the following steps.

[0140] Step S601: The terminal device collects the target power data.

[0141] In step S602, the terminal device generates first power data and second power data based on the target power data.

[0142] In step S603, the terminal device sends the first power data to the target device using power line carrier communication.

[0143] In step S604, the terminal device transmits the second power data to the target device via wireless communication.

[0144] In step S605, the target device obtains the first power data and the second power data.

[0145] Step S606: The target device reconstructs the original target power data based on the first power data and the second power data.

[0146] In this embodiment, the end device of the dual-mode communication system only needs to convert the target power data into first power data and second power data. Then, based on power line carrier communication and wireless communication, the converted two types of data are transmitted to the target device respectively. The processing load required by the end device is relatively small. Furthermore, if an attacker only intercepts the first or second power data, they cannot reconstruct the original target power data, thereby improving the security of data transmission. After the target device receives the first and second power data sent by the end device, it can reconstruct the original target power data, thus achieving secure transmission of the target power data. The first and second power data are generated based on the de Bruin sequence, which has strong anti-interference capabilities, ensuring accurate transmission of sensitive data between the end device and the target device.

[0147] It should be noted that the method based on the first sequence and the second sequence can achieve anti-interference, but this will increase the amount of data transmitted, that is, it is necessary to use m bits of data to transmit n bits of data. This transmission method is more suitable for end devices that transmit a small amount of data, or end devices that only transmit data with high security requirements, while other data can still be transmitted using traditional methods.

[0148] This embodiment also provides a data transmission device based on dual-mode communication, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0149] This embodiment provides a data transmission device based on dual-mode communication, applied to end devices, such as... Figure 7 As shown, it includes:

[0150] The determination module 701 is used to determine the target power data that needs to be sent to the target device; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including power line carrier communication and wireless communication;

[0151] The generation module 702 is used to generate first power data and second power data based on the target power data; wherein the target power data can be reconstructed based on the first power data and the second power data.

[0152] The transmitting module 703 is used to transmit the first power data to the target device in the manner of power line carrier communication; and to transmit the second power data to the target device in the manner of wireless communication.

[0153] In some optional implementations, the generation module 702 generates first power data and second power data based on the target power data, including:

[0154] The target power data is divided into at least one n-bit sub-data.

[0155] For any of the sub-data, a first m-bit sequence is generated by cyclically expanding the de Brouin sequence of length n; m>2^n.

[0156] The first sequence is cyclically shifted by k positions to generate the second sequence; k is the value of the sub-data.

[0157] The first sequence is taken as the part of the first power data related to the sub-data, and the second sequence is taken as the part of the second power data related to the sub-data.

[0158] This embodiment provides a data transmission device based on dual-mode communication, applied to a target device, such as... Figure 8 As shown, it includes:

[0159] The acquisition module 801 is used to acquire first power data transmitted by the end device in the form of power line carrier communication, and to acquire second power data transmitted by the end device in the form of wireless communication; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including the power line carrier communication and the wireless communication;

[0160] The restoration module 802 is used to restore the original target power data based on the first power data and the second power data.

[0161] In some optional implementations, the restoration module 802 restores the original target power data based on the first power data and the second power data, including:

[0162] The first power data is divided into a sequence of at least m bits, and the second power data is divided into a sequence of at least m bits;

[0163] For a first m-bit sequence in the first power data, determine a second m-bit sequence in the second power data that corresponds to the position of the first sequence;

[0164] Determine the number of bits k that the first sequence and the second sequence are cyclically shifted, and restore the n-bit sub-data with a value of k.

[0165] Based on all the sub-data obtained from the restoration, the original target power data is generated.

[0166] In some optional implementations, the restoration module 802 determines the number of bits k of the cyclic shift between the first sequence and the second sequence, including:

[0167] Read out the first subsequence from the first sequence; the first subsequence is a de Bruin sequence of length 2^n bits;

[0168] Read out the second subsequence from the second sequence; the second subsequence is a de Brouin sequence of length 2^n bits;

[0169] Determine the position of the second subsequence in the second sequence, relative to the position of the first subsequence in the first sequence, by offset;

[0170] Determine the number of bits shifted by the second subsequence relative to the first subsequence;

[0171] The number of bits k for cyclic shift between the first sequence and the second sequence is determined based on the offset and the number of bits shift.

[0172] Wherein, in the case that the second sequence is generated by cyclically shifting the first sequence to the right, the number of bits shift is the number of bits by which the second subsequence is cyclically shifted to the right relative to the first subsequence, and:

[0173]

[0174] When the second sequence is generated by cyclically shifting left on the first sequence, the number of bits shifted is the number of bits by which the second subsequence is cyclically shifted left relative to the first subsequence, and: in, This is the floor function.

[0175] In some optional implementations, the restoration module 802 determines the number of bits k of the cyclic shift between the first sequence and the second sequence, and further includes:

[0176] If there is no de Brouin sequence of length 2^n bits in the first sequence or the second sequence, determine the number of cyclic shifts between the n-bit subsequence in the first sequence and the n-bit subsequence at the same position in the second sequence.

[0177] Count all the cyclic shift bits and take the cyclic shift bit with the largest number as the cyclic shift bit k between the first sequence and the second sequence.

[0178] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0179] In this embodiment, the data transmission device based on dual-mode communication is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0180] This invention also provides an electronic device, which may specifically be the aforementioned end device or target device.

[0181] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 9 As shown, the electronic device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.

[0182] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.

[0183] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0184] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0185] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0186] The electronic device also includes a communication interface 30 for communicating with other devices or communication networks.

[0187] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0188] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A data transmission method based on dual-mode communication, characterized in that, Applied to an end device, the method includes: Determine the target power data that needs to be sent to the target device; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including power line carrier communication and wireless communication; First power data and second power data are generated based on the target power data; wherein the target power data can be reconstructed based on the first power data and the second power data. The first power data is transmitted to the target device via power line carrier communication; the second power data is transmitted to the target device via wireless communication. The step of generating the first power data and the second power data based on the target power data includes: The target power data is divided into at least one n-bit sub-data. For any of the sub-data, a first m-bit sequence is generated by cyclically expanding the de Brouin sequence of length n; m>2^n. The first sequence is cyclically shifted by k positions to generate the second sequence; k is the value of the sub-data. The first sequence is taken as the part of the first power data related to the sub-data, and the second sequence is taken as the part of the second power data related to the sub-data.

2. A data transmission method based on dual-mode communication, characterized in that, Applied to a target device, the method includes: The device acquires first power data transmitted by the end device via power line carrier communication and second power data transmitted by the end device via wireless communication; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including the power line carrier communication and the wireless communication. The original target power data is obtained by reconstructing the first power data and the second power data. The step of restoring the original target power data based on the first power data and the second power data includes: The first power data is divided into a sequence of at least m bits, and the second power data is divided into a sequence of at least m bits; For a first m-bit sequence in the first power data, determine a second m-bit sequence in the second power data that corresponds to the position of the first sequence; Determine the number of bits k that the first sequence and the second sequence are cyclically shifted, and restore the n-bit sub-data with a value of k. Based on all the sub-data obtained from the restoration, the original target power data is generated; Wherein, determining the number of bits k for the cyclic shift between the first sequence and the second sequence includes: Read out the first subsequence from the first sequence; the first subsequence is a de Bruin sequence of length 2^n bits; Read out the second subsequence from the second sequence; the second subsequence is a de Brouin sequence of length 2^n bits; Determine the position of the second subsequence in the second sequence, relative to the position of the first subsequence in the first sequence, by offset; Determine the number of bits shifted by the second subsequence relative to the first subsequence; The number of bits k for cyclic shift between the first sequence and the second sequence is determined based on the offset and the number of bits shift. Wherein, in the case that the second sequence is generated by cyclically shifting the first sequence to the right, the number of bits shift is the number of bits by which the second subsequence is cyclically shifted to the right relative to the first subsequence, and: ; When the second sequence is generated by cyclically shifting left on the first sequence, the number of bits shifted is the number of bits by which the second subsequence is cyclically shifted left relative to the first subsequence, and: ;in, This is the floor function.

3. The method according to claim 2, characterized in that, Determining the number of bits k for the cyclic shift between the first sequence and the second sequence further includes: If there is no de Brouin sequence of length 2^n bits in the first sequence or the second sequence, determine the number of cyclic shifts between the n-bit subsequence in the first sequence and the n-bit subsequence at the same position in the second sequence. Count all the cyclic shift bits and take the cyclic shift bit with the largest number as the cyclic shift bit k between the first sequence and the second sequence.

4. A data transmission device based on dual-mode communication, characterized in that, Applied to end devices, the device includes: A determination module is used to determine the target power data that needs to be sent to the target device; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including power line carrier communication and wireless communication; A generation module is used to generate first power data and second power data based on the target power data; wherein the target power data can be reconstructed based on the first power data and the second power data. The transmitting module is configured to transmit the first power data to the target device via power line carrier communication and the second power data to the target device via wireless communication. The step of generating the first power data and the second power data based on the target power data includes: The target power data is divided into at least one n-bit sub-data. For any of the sub-data, a first m-bit sequence is generated by cyclically expanding the de Brouin sequence of length n; m>2^n. The first sequence is cyclically shifted by k positions to generate the second sequence; k is the value of the sub-data. The first sequence is taken as the part of the first power data related to the sub-data, and the second sequence is taken as the part of the second power data related to the sub-data.

5. A data transmission device based on dual-mode communication, characterized in that, Applied to a target device, the device includes: An acquisition module is used to acquire first power data transmitted by the end device in the form of power line carrier communication, and to acquire second power data transmitted by the end device in the form of wireless communication; the end device and the target device communicate in a dual-mode manner, the dual-mode communication including the power line carrier communication and the wireless communication; The restoration module is used to restore the original target power data based on the first power data and the second power data; The step of restoring the original target power data based on the first power data and the second power data includes: The first power data is divided into a sequence of at least m bits, and the second power data is divided into a sequence of at least m bits; For a first m-bit sequence in the first power data, determine a second m-bit sequence in the second power data that corresponds to the position of the first sequence; Determine the number of bits k that the first sequence and the second sequence are cyclically shifted, and restore the n-bit sub-data with a value of k. Based on all the sub-data obtained from the restoration, the original target power data is generated; Wherein, determining the number of bits k for the cyclic shift between the first sequence and the second sequence includes: Read out the first subsequence from the first sequence; the first subsequence is a de Bruin sequence of length 2^n bits; Read out the second subsequence from the second sequence; the second subsequence is a de Brouin sequence of length 2^n bits; Determine the position of the second subsequence in the second sequence, relative to the position of the first subsequence in the first sequence, by offset; Determine the number of bits shifted by the second subsequence relative to the first subsequence; The number of bits k for cyclic shift between the first sequence and the second sequence is determined based on the offset and the number of bits shift. Wherein, in the case that the second sequence is generated by cyclically shifting the first sequence to the right, the number of bits shift is the number of bits by which the second subsequence is cyclically shifted to the right relative to the first subsequence, and: ; When the second sequence is generated by cyclically shifting left on the first sequence, the number of bits shifted is the number of bits by which the second subsequence is cyclically shifted left relative to the first subsequence, and: ;in, This is the floor function.

6. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission method based on dual-mode communication as described in any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the data transmission method based on dual-mode communication as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Wireless communication module and method based on high-speed carrier technology, and dual-mode communication chip

    CN117612359A