Data scrambling method, data descrambling method, device and storage medium

By identifying the types of service data in industrial wireless communication and adopting a hierarchical scrambling/descrambling strategy, the problems of insufficient adaptability and efficiency of existing methods are solved, and more efficient data scrambling/descrambling is achieved.

CN115988484BActive Publication Date: 2025-11-28SHENZHEN INOVANCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211562393.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-11-28
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

Existing data scrambling and descrambling methods are weak in terms of adaptability and efficiency, and cannot effectively cope with the differentiated needs of different types of data in industrial wireless communication.

Method used

By identifying the data type of business data, a layered scrambling/descrambling strategy is adopted to generate scrambling/descrambling sequences of different lengths and security levels, which are then used to process process data and non-process data respectively.

Benefits of technology

It improves the adaptability and efficiency of data scrambling/descrambling methods, ensuring the security and real-time requirements of different types of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988484B_ABST
    Figure CN115988484B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of industrial wireless communication, and discloses a data scrambling method, a data descrambling method, a device and a storage medium, the data scrambling method is applied to a data scrambling device, and the method comprises the following steps: obtaining service data, and extracting data characteristics of the service data; identifying the data type of the service data according to the data characteristics; the data type comprises process data and non-process data; obtaining a scrambling strategy of the service data according to the data type, generating a corresponding scrambling sequence according to the scrambling strategy; the scrambling strategy comprises a process data scrambling strategy and a non-process data scrambling strategy; scrambling the service data according to the scrambling sequence; and sending the scrambled service data. The present application solves the problems of weak adaptability and low efficiency of the data scrambling or descrambling method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial wireless communication, and in particular to a data scrambling method, a data descrambling method, a device and a storage medium. BACKGROUND

[0002] With the rapid development of industrial wireless communication technology, the complexity of industrial wireless networks is increasing,

[0003] Reliable, safe, efficient, and capacity regulations are increasingly stringent, and the demand for digital and intelligent industry is rapidly increasing, which leads to a large number of wireless intelligent devices accessing industrial wireless communication networks, resulting in great challenges in anti-interference and security in industrial wireless communication. Industrial wireless devices need to transmit business data in layers according to their communication needs, industrial device needs, regulatory requirements, etc. during communication. For example, programmable logic controllers (PLC, Programmable Logic Controller), servo control

[0004] Process data (PD, Process Data) and on-demand (OD, On-request Data) data from field-level devices such as sensors. Among them, process data has smaller data packets and real-time transmission requirements, etc. On-demand data has larger data packets and non-real-time transmission requirements, etc.

[0005] Scrambling is a process of XORing data with a pseudo-random scrambling sequence to randomize interference between industrial wireless devices, and using different scrambling initial values to prevent other devices from descrambling data,

[0006] so as to ensure data transmission security. The traditional data scrambling method and data descrambling method use a fixed-length scrambling sequence to scramble or descramble data (process data and on-demand data), and only use different scrambling initial values to scramble or descramble the business data of different terminals without distinction, which has weak adaptability and low efficiency of data scrambling or descrambling. SUMMARY

[0007] The main purpose of the present application is to provide a data scrambling method, a data descrambling method, a device and a storage medium, which aims to solve the problem of weak adaptability and low efficiency of the existing data scrambling or descrambling method.

[0008] To achieve the above purpose, the present application provides a data scrambling method, which is applied to a data scrambling device. The data scrambling method comprises the following steps:

[0009] Obtaining business data and extracting data features of the business data;

[0010] identify a data type of the service data according to the data feature; the data type comprises process data and non-process data;

[0011] obtain a scrambling strategy of the service data according to the data type, and generate a corresponding scrambling sequence according to the scrambling strategy; the scrambling strategy comprises a process data scrambling strategy and a non-process data scrambling strategy;

[0012] scramble the service data according to the scrambling sequence;

[0013] send the scrambled service data.

[0014] Optionally, a length of the scrambling sequence generated by the process data scrambling strategy is shorter than a length of the scrambling sequence generated by the non-process data scrambling strategy; and / or, a security level of the scrambling sequence generated by the process data scrambling strategy is higher than a security level of the scrambling sequence generated by the non-process data scrambling strategy.

[0015] Optionally, the data feature comprises a data type flag of the service data; and the identifying the data type of the service data according to the data feature comprises:

[0016] identifying the data type of the service data according to the data type flag of the service data.

[0017] Optionally, when the data type is process data, the generating the corresponding scrambling sequence according to the scrambling strategy comprises:

[0018] obtaining an encrypted scrambling initial value based on a preset encryption white list; when the data scrambling device is applied to a user terminal, the encryption white list comprises an encrypted scrambling initial value corresponding to the user terminal itself; when the data scrambling device is applied to a base station, the encryption white list comprises encrypted scrambling initial values corresponding to all user terminals in communication with the base station; the encrypted scrambling initial values corresponding to different user terminals are different;

[0019] obtaining a corresponding scrambling sequence according to the encrypted scrambling initial value.

[0020] Optionally, the preset encryption white list is a static encryption white list, and each user terminal in the static encryption white list corresponds to a unique encrypted scrambling initial value; the data scrambling device pre-stores a correspondence table of the encrypted scrambling initial value and the scrambling sequence, and the scrambling sequence in the correspondence table is generated in advance according to the encrypted scrambling initial value.

[0021] the obtaining the corresponding scrambling sequence according to the encrypted scrambling initial value comprises:

[0022] According to the encrypted scrambling initial value, the correspondence table is queried to obtain the scrambling sequence corresponding to the encrypted scrambling initial value.

[0023] Optionally, the preset encrypted white list is a dynamic encrypted white list or a semi-dynamic encrypted white list; the encrypted scrambling initial value corresponding to the user terminal in the dynamic encrypted white list changes dynamically; the encrypted scrambling initial value corresponding to the user terminal in the semi-dynamic encrypted white list remains unchanged within a preset period and changes dynamically outside the preset period.

[0024] The encrypted scrambling initial value is obtained based on the preset encrypted white list, including:

[0025] The encrypted scrambling initial value currently corresponding to the user terminal is obtained based on the dynamic encrypted white list or the semi-dynamic encrypted white list.

[0026] According to the encrypted scrambling initial value, the corresponding scrambling sequence is obtained, including:

[0027] The scrambling sequence is generated online by a preset first scrambling sequence generator based on the encrypted scrambling initial value.

[0028] Optionally, when the data type is non-process data, the corresponding scrambling sequence is generated according to the scrambling strategy, including:

[0029] When the data scrambling device is applied to a user terminal, the device identification number of the user terminal is obtained; when the data scrambling device is applied to a base station, the device identification number of the user terminal in communication with the base station is obtained.

[0030] According to the device identification number, a preset correspondence table of device identification numbers and encrypted cyclic shift parameter values is queried to obtain an encrypted cyclic shift parameter value corresponding to the device identification number.

[0031] According to the encrypted cyclic shift parameter value and the device identification number, a scrambling initial value is generated.

[0032] The scrambling sequence is generated by a preset second scrambling sequence generator based on the scrambling initial value.

[0033] In addition, to achieve the above-mentioned purpose, the application further provides a data descrambling method, which is applied to a data descrambling device, and the data descrambling method comprises the following steps:

[0034] Business data is obtained, and data features of the business data are extracted.

[0035] identify a data type of the service data according to the data feature; the data type comprises process data and non-process data;

[0036] obtain a descrambling strategy of the service data according to the data type, and obtain a corresponding descrambling sequence according to the descrambling strategy; the descrambling strategy comprises a process data descrambling strategy and a non-process data descrambling strategy;

[0037] descramble the service data according to the descrambling sequence;

[0038] send the descrambled service data.

[0039] Optionally, a length of the descrambling sequence generated by the process data descrambling strategy is smaller than a length of the descrambling sequence generated by the non-process data descrambling strategy; and / or, a security level of the descrambling sequence generated by the process data descrambling strategy is higher than a security level of the descrambling sequence generated by the non-process data descrambling strategy.

[0040] Optionally, the data feature comprises a data type flag of the service data; and the identifying the data type of the service data according to the data feature comprises:

[0041] identifying the data type of the service data according to the data type flag of the service data.

[0042] Optionally, when the data type is process data, the generating the corresponding descrambling sequence according to the descrambling strategy comprises:

[0043] obtaining an encrypted descrambling initial value based on a preset encryption whitelist; when the data scrambling device is applied to a user terminal, the encryption whitelist comprises an encrypted descrambling initial value corresponding to the user terminal itself; when the data scrambling device is applied to a base station, the encryption whitelist comprises encrypted descrambling initial values corresponding to all user terminals in communication with the base station; the encrypted descrambling initial values corresponding to different user terminals are different;

[0044] obtaining a corresponding descrambling sequence according to the encrypted descrambling initial value.

[0045] Optionally, the preset encryption whitelist is a static encryption whitelist, and each user terminal in the static encryption whitelist corresponds to a unique encrypted descrambling initial value; the data scrambling device pre-stores a correspondence table of the encrypted descrambling initial value and the descrambling sequence, and the descrambling sequence in the correspondence table is generated in advance according to the encrypted descrambling initial value.

[0046] the obtaining the corresponding descrambling sequence according to the encrypted descrambling initial value comprises:

[0047] According to the encrypted descrambling initial value, the corresponding descrambling sequence is obtained.

[0048] Optionally, the preset encrypted white list is a dynamic encrypted white list or a semi-dynamic encrypted white list; the encrypted descrambling initial value corresponding to the user terminal in the dynamic encrypted white list is dynamically changed; the encrypted descrambling initial value corresponding to the user terminal in the semi-dynamic encrypted white list remains unchanged within a preset period and is dynamically changed outside the preset period.

[0049] The encrypted descrambling initial value is obtained based on the preset encrypted white list, including:

[0050] The encrypted descrambling initial value currently corresponding to the user terminal is obtained based on the dynamic encrypted white list or the semi-dynamic encrypted white list.

[0051] According to the encrypted descrambling initial value, the corresponding descrambling sequence is obtained, including:

[0052] The descrambling sequence is generated online according to the encrypted descrambling initial value by using a preset first descrambling sequence generator.

[0053] Optionally, when the data type is non-process data, the corresponding descrambling sequence is generated according to the descrambling strategy, including:

[0054] When the data descrambling device is applied to a user terminal, the device identification number of the user terminal is obtained; when the data descrambling device is applied to a base station, the device identification number of the user terminal in communication with the base station is obtained.

[0055] According to the device identification number, a preset corresponding relationship table of device identification number and encrypted cyclic shift parameter value is queried to obtain the encrypted cyclic shift parameter value corresponding to the device identification number.

[0056] According to the encrypted cyclic shift parameter value and the device identification number, the corresponding descrambling initial value is obtained.

[0057] The descrambling sequence is generated according to the descrambling initial value by using a preset second descrambling sequence generator.

[0058] In addition, to achieve the above-mentioned purposes, the application further provides a data scrambling device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is used to realize the steps of the data scrambling method.

[0059] In addition, to achieve the above object, the application further provides a data descrambling device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program implements the steps of the data descrambling method when executed by the processor.

[0060] In addition, to achieve the above object, the application further provides a storage medium, which stores a computer program, and the computer program implements the steps of the data scrambling method when executed by the processor, or the computer program implements the steps of the data descrambling method when executed by the processor.

[0061] The application obtains service data in the data scrambling device, extracts data features of the service data, identifies the data type of the service data according to the data features, and obtains a scrambling strategy of the service data according to the data type, generates a corresponding scrambling sequence according to the scrambling strategy, scrambles the service data according to the scrambling sequence, and transmits the scrambled service data. The application obtains service data in the data descrambling device, extracts data features of the service data, identifies the data type of the service data according to the data features, and obtains a descrambling strategy of the service data according to the data type, generates a corresponding descrambling sequence according to the descrambling strategy, descrambles the service data according to the descrambling sequence, and transmits the descrambled service data.

[0062] Thus, the application improves the adaptability of the data scrambling / descrambling method by distinguishing the service data into process data and non-process data and performing hierarchical scrambling / descrambling on the process data and the non-process data. In addition, the hierarchical scrambling / descrambling is adopted, so that a data scrambling / descrambling strategy more suitable for the service data can be adopted according to the service features of the service data, thereby improving the efficiency of the data scrambling / descrambling. BRIEF DESCRIPTION OF DRAWINGS

[0063] Figure 1 FIG. 1 is a structure schematic diagram of a data scrambling / descrambling device of a hardware running environment related to an embodiment scheme of the application;

[0064] Figure 2 FIG. 2 is a flow schematic diagram of an embodiment of a data scrambling method of the application;

[0065] Figure 3 FIG. 3 is a scrambling flow schematic diagram of the data scrambling method of the application;

[0066] Figure 4 The schematic diagram of the scrambling device for the data scrambling method of the present application;

[0067] Figure 5 The flow chart for the data division process in the data scrambling method of the present application;

[0068] Figure 6 The device for the data division process in the data scrambling method of the present application;

[0069] Figure 7 The flow chart for the data selection process in the data scrambling method of the present application;

[0070] Figure 8 The device for the data selection process in the data scrambling method of the present application;

[0071] Figure 9 The structure diagram of the first scrambling sequence generator in the data scrambling method of the present application;

[0072] Figure 10 The structure diagram of the second scrambling sequence generator in the data scrambling method of the present application;

[0073] Figure 11 The flow chart for the process data off-line or on-line scrambling method in the data scrambling method of the present application;

[0074] Figure 12 The device for the process data off-line or on-line scrambling method in the data scrambling method of the present application;

[0075] Figure 13 The flow chart for the on-demand data scrambling method in the data scrambling method of the present application;

[0076] Figure 14 The device for the on-demand data scrambling method in the data scrambling method of the present application;

[0077] Figure 15 The flow chart for the process data high-security mechanism descrambling scheme in the data scrambling method of the present application;

[0078] Figure 16 The flow chart for the on-demand data scrambling method in the data scrambling method of the present application;

[0079] Figure 17 The flow chart for the on-demand data scrambling method in the data scrambling method of the present application;

[0080] The present application achieves the objectives, functional features and advantages by means of the above-mentioned technical solutions. The above-mentioned technical solutions and advantages of the present application will be further illustrated with reference to the accompanying drawings and embodiments. DETAILED DESCRIPTION

[0081] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application.

[0082] Referring to Figure 1 , Figure 1 The data scrambling / descrambling device structure schematic diagram of the hardware running environment involved in the embodiment of the present application.

[0083] As Figure 1 shown, the data scrambling / descrambling device can include a processor 0003, such as a central processing unit (CPU), a communication bus 0001, an acquisition interface 0002, a processing interface 0004, and a memory 0005. The communication bus 0001 is used to realize the connection communication between the components. The acquisition interface 0002 can include an information acquisition device, an acquisition unit such as a computer, and the optional acquisition interface 0002 can also include a standard wired interface and a wireless interface. The processing interface 0004 can optionally include a standard wired interface and a wireless interface. The memory 0005 can be a high-speed random access memory (RAM), and can also be a stable non-volatile memory (NVM), such as a disk memory. The memory 0005 can also be an independent storage device from the aforementioned processor 0003.

[0084] Those skilled in the art can understand that Figure 1 the structure shown in the above description does not constitute a limitation on the data scrambling / descrambling device, and can include more or fewer components than the diagram, or combine certain components, or different component arrangements.

[0085] As Figure 1 shown, the memory 0005 as a storage medium can include an operating system, an acquisition interface module, a processing interface module, and a data scrambling program and a data descrambling program.

[0086] In Figure 1 the data scrambling / descrambling device, the communication bus 0001 is mainly used to realize the connection communication between the components; the acquisition interface 0002 is mainly used to connect the background server and communicate data with the background server; the processing interface 0004 is mainly used to connect the deployment end (user end) and communicate data with the deployment end; the processor 0003 and the memory 0005 in the data scrambling / descrambling device of the present application can be arranged in the data scrambling / descrambling device, and the data scrambling / descrambling device calls the data scrambling program and the data descrambling program stored in the memory 0005 through the processor 0003, and executes the data scrambling method and the data descrambling method provided by the embodiment of the present application.

[0087] Based on the hardware structure, the data scrambling method embodiment of the present application is proposed.

[0088] The data scrambling method embodiment of the present application is provided. Figure 2 , Figure 2 The flowchart of the data scrambling method embodiment of the present application is shown.

[0089] In the embodiment, the data scrambling method is applied to a data scrambling device, and the data scrambling method comprises the following steps.

[0090] In step S10, service data is acquired, and data features of the service data are extracted.

[0091] In step S20, data types of the service data are identified according to the data features; the data types include process data and non-process data.

[0092] In step S30, scrambling strategies of the service data are acquired according to the data types, and corresponding scrambling sequences are generated according to the scrambling strategies; the scrambling strategies include process data scrambling strategies and non-process data scrambling strategies.

[0093] In step S40, the service data is scrambled according to the scrambling sequences.

[0094] In step S50, the scrambled service data is sent.

[0095] The present scheme is applicable to the existing developing industrial wireless communication network (industrial scene service layer is continuously enhanced, intelligent devices are increasingly increased, and service requirements are differentiated). In the communication process of the existing industrial wireless device, the service data needs to be transmitted in layers according to the communication requirements, industrial device requirements, regulatory requirements, etc. For example, PD data (process data) brought by PLC (Programmable Logic Controller, Programmable Logic Controller), servo (controller for controlling servo motor) and other controllers and non-PD data brought by sensor and other field-level devices, such as OD data (on-request data). Among them, the PD data has the characteristics of smaller data packet and real-time transmission requirement. The OD data has the characteristics of larger data packet and non-real-time transmission requirement. Specifically, refer to Table 1 below for the service feature table of process data and on-demand data in the data scrambling method:

[0096]

[0097] Table 1

[0098] The scheme is based on the characteristics of the PD data and the OD data for scrambling processing, and thus the flexibility, integrity, rigor and efficiency of the PD data and the OD data scrambling are improved.

[0099] In the embodiment, after the data scrambling device acquires the acquired service data, the acquired service data is scrambled. By extracting the data characteristics of the service data, the data type of the acquired service data can be identified according to the data characteristics, different scrambling strategies can be selected according to the different data types to scramble the service data, and the scrambled service data is sent. The service data refers to various data in the industrial scene to be scrambled, which at least includes PD data and non-PD data. The non-PD data includes OD data but is not limited to OD data, and can be other network or real-time data brought by sensor and other field-level devices. In the embodiment, the OD data is described. The data characteristics refer to the service characteristics of the PD data and the non-PD data in Table 1. The data type refers to the judgment of the service data as PD data or non-PD data. The corresponding scrambling strategy refers to the scrambling mode of different data, which includes the process data scrambling strategy and the non-process data scrambling strategy. The scrambling sequence refers to the numerical sequence of the scrambled service data. Finally, the data is scrambled according to the scrambling strategy corresponding to the data type, and then the scrambled service data is sent. It can be sent to other devices configured with a data descrambling device.

[0100] The scrambling process of the data scrambling device of the embodiment can refer to Figure 3 and Figure 4 , Figure 3 the implementation flowchart of the data scrambling method, Figure 4The schematic diagram of the implementation device of the data scrambling method, wherein the implementation process of the data scrambling method is realized by obtaining original industrial demand data as business data; the PD data business and the OD data business in the business data are processed in layers; the PD data scrambling generator initial value selection and the scrambling mode selection are selected to make the PD data offline or online scrambling; or the OD data scrambling generator initial value selection and the scrambling mode selection; and the OD data online scrambling. The original industrial demand data, i.e. the business data, wherein the original industrial data includes various industrial scene data, and the industrial scene data at least includes PD data and OD data, and the industrial scene includes but is not limited to an automated industrial manufacturing plant. The PD data includes PLC and servo control data; and the PD data also includes at least the characteristic data shown in Table 1 in the industrial scene. The OD data represents non-PD data, including sensor data and diagnostic data; and the OD data also includes at least the characteristic data shown in Table 1 in the industrial scene. In fact, in addition to the PD data, other data are all OD data types. The PD data business and the OD data business are processed in layers 102, and the data business characteristics are processed in layers based on Table 1. The corresponding data scrambling device 200 at least includes an original industrial data concentration module 201; a PD data and OD data business demand layering module 202; a PD data scrambling selection module 203; a PD data scrambling module 204; an OD data scrambling sequence selection module 205; and an OD data scrambling module 206. The original industrial data concentration module 201 is used to provide business data to be scrambled; the business data to be scrambled at least includes PD data and OD data. By dividing the business data into process data and non-process data, and processing the process data and the non-process data in layers, the adaptability of the data scrambling method is improved; in addition, since the layering scrambling is adopted, a data scrambling strategy more suitable for the business data can be adopted according to the business characteristics of the business data, so that the efficiency of the data scrambling is improved.

[0101] In an implementable manner, the length of the scrambling sequence generated by the process data scrambling strategy is smaller than the length of the scrambling sequence generated by the non-process data scrambling strategy; and / or, the security level of the scrambling sequence generated by the process data scrambling strategy is higher than the security level of the scrambling sequence generated by the non-process data scrambling strategy.

[0102] In the embodiment, due to the requirement of the scrambled data service characteristics, the scrambling strategies for different data type service data are also different. For example, due to the high security requirement of process data, the security level of the scrambling sequence generated by the process data scrambling strategy is higher than that of the scrambling sequence generated by the non-process data scrambling strategy. The scrambling sequence of the process data can be determined by the encryption white list, while the scrambling sequence of the non-process data is determined according to the device number and the encryption cyclic shift parameter value. Therefore, the security level of the scrambling sequence generated by the process data scrambling strategy is higher. Because the real-time requirement of the process data is higher than that of the non-process data, and the data length is shorter than that of the non-process data, the length of the scrambling sequence generated by the corresponding process data scrambling strategy is shorter than that of the scrambling sequence generated by the non-process data scrambling strategy. The real-time requirement of the process data can be improved by the shorter scrambling sequence. By determining the scrambling advantages of different service data scrambling strategies, the accuracy of the scrambling of different service data can be ensured.

[0103] In an implementable manner, the data characteristics include a data type flag of the service data; and the data type of the service data is identified according to the data characteristics, including:

[0104] Step A10, identifying the data type of the service data according to the data type flag of the service data.

[0105] In the embodiment, because different service data corresponds to different scrambling strategies, the scrambling strategy refers to the way of scrambling the PD data or the non-PD data by the data scrambling device or the base station, which can include the scrambling strategy of the process data high security mechanism and the scrambling strategy of the on-demand data interference randomization. The scrambling strategy of the process data high security mechanism refers to the scrambling strategy formulated according to the high security, the short data packet and the high real-time requirement in the characteristics of the process data in Table 1. The scrambling strategy of the on-demand data interference randomization refers to the scrambling strategy formulated according to the long data packet, the long data interference and the low real-time requirement in Table 1. By determining the data characteristics of the service data, the data type flag bit of the service data is included in the data characteristics, and then the data type of the service data can be identified according to the data type flag bit of the service data. For example, when the data type flag bit is 1, it indicates that the service data is process data, and when the data type flag bit is 0, it indicates that the service data is non-process data. The data type flag bit refers to a data flag bit, which can be 1 or 0, or other numerical values, as long as the mapping relationship of the numerical values is defined. The service data type can also be identified by other ways, for example: in other implementation examples, the length of the data can also be used for judgment, when the data length is greater than the preset process data length, it can be determined that the service data is non-process data; otherwise, when the data length is less than or equal to the preset process data length, it can be determined that the service data is process data. Or the interference situation in the data can also be used for judgment to determine the data type of the service data.

[0106] The flow of the hierarchical processing of the embodiment can refer to Figure 5 and Figure 6 , Figure 5 is a flowchart of the data division processing in the data scrambling method, Figure 6 is a data division processing device in the data scrambling method, Figure 5The data separation processing (i.e., separating the PD data and the OD data) flow in the data separation processing device 410 includes: inputting the original industrial data as business data into the data scrambling device; then performing feature extraction on the original data; then determining whether it is PD or OD data feature alignment through feature alignment (i.e., a process of matching and comparing the data features of the original industrial demand data with the features of the PD data and the OD data recorded in Table 1, or a process of determining the data type flag); if it is the data type flag of the PD data, it is divided into PD data; if it is not the data type flag of the PD data, it is divided into OD data. The corresponding data separation processing device 410 at least includes an original industrial data management and original data feature extraction module 411; a PD data business and OD data business feature alignment determination module 412; and a storage module 422 for temporarily storing the PD data or the OD data. By determining the data type corresponding to the business data, and then performing different scrambling strategies according to the data type flag or other features such as length, interference of different data types, the efficiency of data layer scrambling can be improved while protecting different data.

[0107] In an implementable manner, when the data type is process data, the generating a corresponding scrambling sequence according to the scrambling strategy comprises:

[0108] Step B10, obtaining an encrypted scrambling initial value based on a preset encryption whitelist; when the data scrambling device is applied to a user terminal, the encryption whitelist includes an encrypted scrambling initial value corresponding to the user terminal itself; when the data scrambling device is applied to a base station, the encryption whitelist includes encrypted scrambling initial values corresponding to all user terminals in communication with the base station; the encrypted scrambling initial values corresponding to different user terminals are different;

[0109] Step B20, obtaining a corresponding scrambling sequence according to the encrypted scrambling initial value.

[0110] In the embodiment, when the service data is process data, the preset encryption white list is determined based on a process data scrambling strategy. When the data scrambling device is applied to a user terminal, the encryption white list includes an encrypted scrambling initial value corresponding to the user terminal itself. When the data scrambling device is applied to a base station, the encryption white list includes encrypted scrambling initial values corresponding to all user terminals in communication with the base station, and the encrypted scrambling initial values corresponding to different user terminals are different. The encryption white list refers to a data list storing scrambling initial values. The scrambling initial value refers to an initial value for scrambling to obtain a scrambling sequence. That is, when the data scrambling device is in a terminal, the internal encryption white list at least stores an encrypted scrambling initial value corresponding to the terminal itself. When the data scrambling device is in a base station, the internal encryption white list at least stores encrypted scrambling initial values corresponding to all user terminals in communication with the base station, and the encrypted scrambling initial values corresponding to different user terminals are different. In this way, the security of process data scrambling of different user terminals can be ensured.

[0111] In an implementable manner, the preset encryption white list is a static encryption white list, and each user terminal in the static encryption white list corresponds to a unique encrypted scrambling initial value. The data scrambling device pre-stores a correspondence table between the encrypted scrambling initial value and the scrambling sequence, and the scrambling sequence in the correspondence table is generated in advance according to the encrypted scrambling initial value.

[0112] The correspondence between the encrypted scrambling initial value and the scrambling sequence includes:

[0113] Step C10: The correspondence table is queried according to the encrypted scrambling initial value to obtain the scrambling sequence corresponding to the encrypted scrambling initial value.

[0114] In the embodiment, when process data is scrambled, the preset encryption white list can be a static encryption white list, that is, each user terminal in the static encryption white list corresponds to a unique encrypted scrambling initial value. The data scrambling device pre-stores a correspondence table between the encrypted scrambling initial value and the scrambling sequence, and the scrambling sequence in the correspondence table is generated in advance according to the encrypted scrambling initial value. The static encryption white list refers to a list table corresponding to a unique scrambling initial value of a user terminal. The correspondence table refers to a mapping table between an initial value and a scrambling sequence. That is, there is a mapping relationship between the unique scrambling initial value and the scrambling sequence, and the scrambling sequence corresponding to the scrambling initial value can be obtained by directly querying the correspondence table.

[0115] The data scrambling selection process of the embodiment is described with reference to Figure 7 and Figure 8 , Figure 7A flowchart for data selection in a data scrambling method, Figure 8 A data selection device in a data scrambling method, the data selection device comprises at least a service data input module 511 for storing PD data and OD data, a service data judgment module 512 for distinguishing PD data and OD data, and a scrambling module 513 for executing scrambling of PD data or OD data.

[0116] Therefore, due to the security, timeliness and short data packet characteristics of process data, a dynamic encryption whitelist (high security and short data packet of process data, thus not requiring too much space) is used for encryption

[0117] The encryption whitelist can be a unique identification number after encryption, and the static encryption whitelist can be used to determine the scrambling sequence, so that the user terminal or base station can normally perform data scrambling when offline, thereby ensuring the functionality of data scrambling.

[0118] In an embodiment, the preset encryption whitelist is a dynamic encryption whitelist or a semi-dynamic encryption whitelist; the encrypted scrambling initial value corresponding to the user terminal in the dynamic encryption whitelist changes dynamically; the encrypted scrambling initial value corresponding to the user terminal in the semi-dynamic encryption whitelist remains unchanged within a preset period and changes dynamically outside the preset period.

[0119] The encrypted scrambling initial value based on the preset encryption whitelist comprises the following steps:

[0120] The encrypted scrambling initial value based on the preset encryption whitelist comprises the following steps:

[0121] Step D20, a preset first scrambling sequence generator is used to generate the scrambling sequence online based on the encrypted scrambling initial value.

[0122] In this embodiment, when the process data is scrambled, the preset encryption whitelist can also be a dynamic encryption whitelist or a semi-dynamic encryption whitelist, the encrypted scrambling initial value corresponding to the user terminal in the dynamic encryption whitelist changes dynamically, and the encrypted scrambling initial value corresponding to the user terminal in the semi-dynamic encryption whitelist remains unchanged within a preset period and changes dynamically outside the preset period.

[0123] The sequence can be scrambled by performing XOR operation with the PD data to be scrambled. When the preset encryption 0 whitelist is a dynamic encryption whitelist, the scrambling initial value corresponding to the terminal is dynamically changed, i.e., the terminal corresponds to different scrambling initial values at different time points; and the number of scrambling initial values in the dynamic specific encryption whitelist is greater than the number of identifiable terminals, because each terminal corresponds to multiple scrambling initial values. When the preset encryption whitelist is a semi-dynamic encryption whitelist, the period information in the scrambling strategy is determined, and the scrambling initial value is updated according to the period information, and the first scrambling sequence generator generates the scrambling sequence in the period. The period information refers to the period for obtaining the scrambling initial value. Based on the period, the scrambling initial value of the semi-dynamic encryption whitelist is selected from the encryption whitelist, and the scrambling sequence corresponding to one period is generated in the first sequence generator according to the scrambling initial value. That is, the scrambling sequence in the sequence storage corresponding to the semi-dynamic encryption whitelist is periodically cached online, and then the XOR operation is performed with the PD data to be scrambled. The periodic caching is that the sequence storage caches the entire length of the scrambling sequence during the update of the initial value, and the sequence storage is overwritten the next time the initial value is updated. When the XOR operation is performed with the PD data to be scrambled, the sequence storage is circularly shifted and scrambled when the length of the PD data is greater than the length of the scrambling sequence. Because each terminal corresponds to multiple scrambling initial values in the semi-dynamic encryption whitelist, the number of scrambling initial values in the semi-dynamic encryption whitelist is greater than the number of identifiable terminals. Because the process data has timeliness requirements, there can be three ways of scrambling by using the static encryption whitelist, the dynamic encryption whitelist and the semi-dynamic encryption whitelist. When two or three scrambling methods are configured at the same time, the scrambling strategy needs to be synchronized with the base station when the data scrambling is performed. Different encryption whitelists are used to realize different scrambling methods, so as to ensure the diversity and adaptability of the process data scrambling, and different scrambling methods can be used, which is not limited by the actual environment, so as to improve the efficiency of the process data scrambling.

[0124] In the embodiment, the scrambling process of the process data can refer to Figure 11 and Figure 12 , Figure 11 The flowchart of the process data offline or online scrambling method in the data scrambling method, Figure 12This document describes an offline or online scrambling device for process data in a data scrambling method. The implementation process of the offline or online scrambling method includes at least the following steps: selecting a specific terminal encryption field (i.e., the initial encrypted scrambling value) based on an encryption whitelist of the base station and the terminal; then matching (i.e., XOR process) the encrypted field to obtain a generated offline scrambling sequence for the specific terminal; and scrambling the PD data using the specific terminal scrambling sequence. The offline or online scrambling device 710 includes at least a specific encryption field selection module 711 for the terminal transmitting PD data; a matching module 712 for obtaining the offline or online scrambling sequence based on the specific terminal encryption field; and a module 713 for performing scrambling on the PD data based on the specific offline or online scrambling sequence. Thus, process data scrambling can be achieved through the above device. It is worth noting that the data scrambling device can simultaneously contain three types of whitelists: dynamic encryption whitelist, semi-dynamic encryption whitelist, and static encryption whitelist, or two or one of them. When two whitelists exist, the user can select one, or the data scrambling device can switch according to the actual situation, thereby ensuring strong adaptability of the data scrambling device and diversity of process data scrambling.

[0125] Furthermore, this embodiment also presents a structural diagram of the first scrambling sequence generator, see reference 5. Figure 9 , Figure 9 The diagram shows the structure of the first sequence generator in the data scrambling method. This generator has n contacts.

[0126] Generators D1, D2, D3, ..., Dn-2, Dn-1, Dn correspond to n tap coefficients gp1, gp2, gp3, ..., gp(n-2), gp(n-1), gpn. In the actual generation process, the coefficients gp1, gp2, gp3, ..., gp(n-2), gp(n-1), gpn are equal to the number of generators used to generate the maximum periodic pseudo-random sequence.

[0127] The coefficients of the term are set to either 0 or 1, and the second or third initial value selected according to the encryption whitelist is placed into n triggers D1-Dn. The actual triggers are also connected to their corresponding tap coefficients via an inter-trigger connection.

[0128] An OR gate (not shown in the diagram). It also contains two XOR gates, where XOR gate 603 performs a modulo-2 XOR operation on the values ​​of all flip-flops with a tap coefficient of 1. The final output will be assigned to D1, while the values ​​of the flip-flops in the generator are cyclically shifted left by 1 bit (the flip-flops are connected, not shown, to implement...).

[0129] (Left shift), the overflow value is the current output bit, until the number of output bits reaches the maximum number of cycles; the output sequence is stored in a sequence memory, which has permanent storage and cache overwrite functions.

[0130] The PD data to be scrambled (process data input) is subjected to bit-by-bit XOR with the binary sequence in the sequence memory through an XOR gate when scrambling is needed, and the scrambled PD data is finally obtained. The above is one of the structures of the first scrambling sequence generator, and does not limit the structure of the first scrambling sequence generator.

[0131] In an implementable manner, when the data type is non-process data, the generating of the corresponding scrambling sequence according to the scrambling strategy comprises:

[0132] Step E10, when the data scrambling device is applied to a user terminal, obtaining the equipment identification number of the user terminal; when the data scrambling device is applied to a base station, obtaining the equipment identification number of the user terminal in communication with the base station;

[0133] Step E20, querying a preset correspondence table of equipment identification number and encryption cyclic shift parameter value according to the equipment identification number, and obtaining the encryption cyclic shift parameter value corresponding to the equipment identification number;

[0134] Step E30, generating a scrambling initial value according to the encryption cyclic shift parameter value and the equipment identification number;

[0135] Step E40, generating the scrambling sequence according to the scrambling initial value by using a preset second scrambling sequence generator.

[0136] In the embodiment, when the service data is non-process data, the device identification number of the user terminal is determined based on the non-process data scrambling strategy. The determination of the device identification number of the user terminal can be divided into two cases. When the data scrambling device is applied to the user terminal, the device identification number of the user terminal is directly obtained in the user terminal. When the data scrambling device is applied to the base station, the device identification number of the user terminal communicating with the base station is obtained in the base station. The base station includes the device identification numbers of all the user terminals communicating with the base station. Then, the corresponding relationship table of the preset device identification number and the encryption cyclic shift parameter value is queried according to the obtained device identification number, and the encryption cyclic shift parameter value corresponding to the device identification number is obtained. Finally, the scrambling initial value is generated according to the encryption cyclic shift parameter value and the device identification number. The scrambling sequence can be generated by inputting the scrambling initial value into the second scrambling sequence generator. The device identification number refers to the unique identification number of each device, which can be a network code or a self-defined device code. The encryption cyclic shift parameter value refers to the inherent shift parameter value of the device identification number, which can be set or automatically generated. The scrambling initial value refers to the combination of the unique identity address identification number and the encrypted specific cyclic shift parameter value, or the combination of the virtual field identification number or value set by the communication network and the encrypted specific cyclic shift parameter value. The cyclic shift parameter value is a preset self-defined value, and the cyclic shift parameter value corresponding to each terminal is different. In a preferred implementation example, the cyclic shift parameter value is related to the proximity of the device identification number of the terminal. The closer the device identification numbers of two terminals, the greater the difference between the cyclic shift parameter values corresponding to the two terminals. In this way, the problem of signal interference caused by the proximity of the device identification numbers can be avoided, and the anti-interference performance between the communication signals can be improved. In the embodiment, in order to improve the security, the cyclic shift parameter value corresponding to each terminal is stored in the data scrambling device in an encrypted manner. That is, the data scrambling device stores the corresponding relationship table of the terminal and the encrypted cyclic shift parameter value. After the data scrambling device obtains the encrypted cyclic shift parameter value corresponding to the terminal, the encrypted cyclic shift parameter value needs to be decrypted according to the pre-agreed decryption strategy to obtain the decrypted shift parameter value, and then the scrambled initial value is obtained by combining the decrypted cyclic shift parameter value and the device identification number.

[0137] The scrambling method for non-process data of the embodiment can refer to Figure 13 and Figure 14 , Figure 13 The flowchart of the data scrambling method is implemented on demand, Figure 14The application discloses a data scrambling method and device. The data scrambling method comprises the following steps: determining the identification number of a base station and a device and a specific encryption cyclic shift parameter value; generating a scrambling sequence output value based on the identification number and the specific encryption cyclic shift parameter value; and scrambling OD data by using the scrambling bit output generated on line, and updating the scrambling sequence generator input combination value. The corresponding device 730 comprises a module 731 for initializing a scrambling sequence generator (herein referred to as a second scrambling sequence generator) to generate a scrambling sequence; a specific on-line scrambling sequence generation module 732 based on the scrambling sequence generator; and a module 733 for executing scrambling on OD data by using the specific on-line scrambling sequence. The embodiment can adaptively and hierarchically scramble process data and non-process data according to the service characteristics of service data, and improve the flexibility and efficiency of process data and non-process data descrambling.

[0138] Further, the application also provides a structure diagram of the second scrambling sequence generator. Figure 10 , Figure 10 The application also provides a structure diagram of the second sequence generator. The generator comprises m (m>n) flip-flops D1, D2, D3,..., Dm-2, Dm-1 and Dm, which correspond to m tap coefficients gd1, gd2, gd3,..., gd(m-2), gd(m-1) and gdm. In the actual generation process, the coefficients gd1, gd2, gd3,..., gd(m-2), gd(m-1) and gdm are equal to the coefficient values of the generation polynomial of the maximum period pseudo-random sequence, and the values are 0 or 1. A first initial value selected according to the device identification number is put into the m flip-flops D1-Dm, and the actual flip-flops and the corresponding tap coefficients are also connected to an exclusive OR gate (not shown in the figure). Meanwhile, the structure diagram also comprises two exclusive OR gates, wherein the exclusive OR gate 613 performs a modulo 2 exclusive OR operation on the values of all flip-flops with a tap coefficient of 1. Finally, the output is assigned to D1, and the generator is cyclically shifted to the left by 1 bit, and the overflow value is the current output bit. The output sequence is stored in a buffer, the buffer has a temporary storage function and can update the values in the buffer, and the buffer is updated by cyclically shifting to the right. When scrambling is needed, the OD data to be scrambled is subjected to bit-by-bit exclusive OR operation with the buffer updated in real time through the exclusive OR gate. Finally, the OD data after scrambling is obtained. The above is one of the structures of the second scrambling sequence generator, and the structure of the second scrambling sequence generator is not limited.

[0139] There are two setting schemes for the generation polynomials of the two sequence generators (the first scrambling sequence generator and the second scrambling sequence generator): one scheme is that the first generation polynomial represented by the tap coefficients gp1, gp2, gp3, …, gp(n-2), gp(n-1), gpn in the PD data sequence generator and the second generation polynomial represented by the tap coefficients gd1, gd2, gd3, …, gd(m-2), gd(m-1), gdm in the OD data sequence generator are two different generation polynomials (completely irrelevant to each other); the following example is used for detailed description:

[0140] Example 1: the OD data sequence generator has a stage number m of 17, and the PD data sequence generator has a stage number n of 10; the stage number of the scrambler is related to the number of base stations and terminals in an industrial scene, and the stage number of 10 can distinguish a maximum of 2 10 -1 types;

[0141] For the stage number m of 17, the second generation polynomial represented by the tap coefficients gp1, gp2, gp3, …, gp15, gp16, gp17 can be represented as D17+D3+1, and the corresponding tap coefficients are gp3, gp17 are 1, and gp1, gp2, gp4, …, gp15, gp16 are all 0; for the stage number n of 10, the first generation polynomial represented by the tap coefficients gd1, gd2, gd3, …, gd8, gd9, gd10 is D10+D4+D3+D+1, and the corresponding tap coefficients are gd1, gd3, gd4, gd10 are 1, and gp2, gp5, …, gp8, gp9 are all 0; the polynomials can be any primitive polynomial with the same stage number;

[0142] The corresponding PD data and OD data scrambling / descrambling sequences can be generated by the above generation polynomials, tap coefficients, and initial values.

[0143] In another scheme, the first generation polynomial represented by the tap coefficients gp1, gp2, gp3, …, gp(n-2), gp(n-1), gpn in the PD data sequence generator and the second generation polynomial represented by the tap coefficients gd1, gd2, gd3, …, gd(m-2), gd(m-1), gdm in the OD data sequence generator are two different generation polynomials, but have a certain relationship, and the relationship is that the roots of the first generation polynomial of the PD data sequence and the second generation polynomial of the OD data sequence in the binary field are equal (to be described later); the following example is used for detailed description:

[0144] Example 2: OD data sequence generator level m is 17, PD data sequence generator level n is 10; the scrambler level is related to the number of base stations and terminals in the industrial scene, wherein the level of 10 can distinguish at most 2 10 -1 type;

[0145] For the level m is 17, the second generating polynomial represented by the tap coefficients gp1, gp2, gp3, …, gp15, gp16, gp17 can be represented as: D17+D3+1, and the corresponding tap coefficients are: gp3, gp17 is 1, gp1, gp2, gp4, …, gp15, gp16 are all 0; for the level n is 10, the first generating polynomial represented by the tap coefficients gd1, gd2, gd3, …, gd8, gd9, gd10 is: D10+D3+1, and the corresponding tap coefficients are: gd3, gd10 is 1, gd1, gp2, gd4, …, gp8, gp9 are all 0; the polynomial with m and n as the level is different from the position of the highest bit tap coefficient gdm, gpn is 1, and the positions of other tap coefficients with value 1 are the same; the above generating polynomial, tap coefficient and initial value can generate corresponding PD data and OD data scrambling / descrambling sequence. For the more commonly used example 1 scheme, the example 2 scheme can save hardware cost, because there are only positions of the highest bit tap coefficient gdm, gpn is 1, and the positions of other tap coefficients with value 1 are the same, so two sequence generators can be combined to share one sequence generator. As long as m level is set, PD data sequence is output in n(m>n) level, and OD data sequence is output in m level, which greatly saves the cost.

[0146] Further, based on an embodiment of the data scrambling method of the present application, an embodiment of the data descrambling method of the present application is proposed, referring to Figure 17 , Figure 17 The flowchart of an embodiment of the data descrambling method is shown in the figure. The data descrambling method is applied to a data descrambling device, and the data descrambling method comprises:

[0147] Step M10, obtaining service data, extracting data characteristics of the service data;

[0148] Step M20, identifying the data type of the service data according to the data characteristics; the data type includes process data and non-process data;

[0149] Step M30, obtaining the descrambling strategy of the service data according to the data type, and obtaining the corresponding descrambling sequence according to the descrambling strategy; the descrambling strategy includes process data descrambling strategy and non-process data descrambling strategy;

[0150] Step M40, descrambling the service data according to the descrambling sequence;

[0151] Step M50, sending the descrambled service data.

[0152] In this embodiment, when the data descrambling device obtains the service data, the obtained service data is descrambled. By extracting the data characteristics of the service data, the data type of the obtained service data can be identified according to the data characteristics, different descrambling strategies can be selected according to the different data types to descramble the service data, and the descrambled service data is sent. The service data refers to various industrial scene data to be descrambled, which at least includes PD data and non-PD data, and the non-PD data includes OD data but is not limited to OD data, and can be other network or real-time data brought by sensor and other field-level devices. In this embodiment, OD data will be described. The data characteristics refer to the service characteristics of the PD data and the non-PD data in Table 1, the data type refers to judging the service data as PD data or non-PD data, the corresponding descrambling strategy refers to the descrambling mode of different data, which includes process data descrambling strategy and non-process data descrambling strategy, and the descrambling sequence refers to the numerical sequence of descrambling the service data. Finally, the data is descrambled according to the corresponding descrambling strategy of the data type, and then the descrambled service data is sent. It can be sent to other terminals or base stations configured with the data descrambling device. The descrambling process of the data descrambling device can be referred to Figure 3 and Figure 4 for corresponding description.

[0153] Further, refer to Figure 15 , Figure 15 for data descrambling method process data high security mechanism descrambling scheme implementation flowchart, PD data high security mechanism scrambling scheme implementation flowchart includes the following steps: the scrambling sequence generated based on the encryption white list is used to scramble the PD data at the sending end and transmit; the PD data scrambled by the scrambling sequence is received at the receiving end and descrambled; then it is judged whether the descrambling is correct (judged by detecting sequence); if yes, the selected scrambling and descrambling sequence is used to descramble the PD data; if not, the corresponding terminal is added to the black list, and access to the base station is prohibited. When the descrambled data is the scrambled data of the process data, because of the security requirement of the process data, the sending end will be added to the black list of the receiving end to protect the security of the process data. When the descrambled data is the scrambled data of the on-demand data, because of the characteristics of more interference of the on-demand data, the inter-signal interference is fully randomized by descrambling to reduce the problem of more interference of the on-demand data. Refer to Figure 16 , Figure 16The flow chart of the on-demand data interference randomization descrambling scheme in the data descrambling method, the OD data interference randomization descrambling scheme flow chart comprises the following steps: the sending end approximately performs large cyclic shift scrambling on the scrambling initial value (determined by the device identification number) through the encryption cyclic shift parameter (according to the encryption cyclic shift parameter, that is, the shift parameter value mentioned in the foregoing), and vice versa to perform small cyclic shift scrambling on the scrambling initial value; the OD data is scrambled based on the scrambling sequence generated by the identification number and the specific encryption cyclic shift parameter value; the receiving end receives the OD data scrambled by the scrambling sequence and performs descrambling; then it is judged whether the descrambling is correct; if yes, the OD data scrambled by the interference randomization is obtained; if not, the inter-signal interference is fully randomized by scrambling. Different data (different data service characteristics) are subjected to different descrambling processing, thereby ensuring the strong adaptability of the descrambling, avoiding the problem that the existing fixed scrambling code sequence cannot adapt to the development of the industrial wireless communication network, and selecting a suitable descrambling processing mode according to the data service characteristics, thereby reducing the problem of OD data interference and improving the security of the PD data. At the same time, different descrambling can ensure the efficiency of the descrambling of the OD data and the PD data.

[0154] In the embodiment, after the data descrambling device receives the scrambled data sent by the data scrambling device or the base station, the data descrambling device descrambles the scrambled data to obtain descrambled data. The data descrambling device can be a device for descrambling the scrambled data, such as a base station or a user terminal. The scrambling and descrambling of the same data can also use a common sequence generator. The steps of descrambling are consistent with the steps of scrambling, and both use different types of data corresponding to the descrambling strategy. The only difference is that the input of the descrambling is the scrambled data as the service data, and the input of the scrambling is the original industrial demand data as the service data (PD data or OD data). After the service data is descrambled to obtain the descrambled data, the descrambled service data is used as the descrambled data to determine the detection sequence in the descrambled data, and to detect whether the detection sequence matches the preset correct sequence. The detection sequence refers to the sequence for detecting whether the descrambling is correct, and the preset correct sequence refers to the output sequence of correct descrambling. When the detection sequence does not match the preset correct sequence, it is detected whether the descrambled data is the descrambled data of the process data. When the descrambled data is the descrambled data of the process data, the terminal corresponding to the descrambled data is added to the blacklist, and access to the base station is prohibited. Otherwise, when the descrambled data is the descrambled data of the non-process data, the scrambling fully randomizes the inter-signal interference, but does not need to be prohibited from accessing because of the low security requirement. Because the PD data and the OD data have different requirements for security and real-time performance, the processing methods for incorrect descrambling are different, so it is necessary to determine whether the descrambled data is the descrambled data of the process data or the descrambled data of the non-process data. Otherwise, when the detection sequence matches the preset correct sequence, it is determined that the descrambled data is the descrambled data of the process data, and the used descrambling sequence corresponding to the descrambled data is used to descramble the process data. When it is detected that the data is the descrambled data of the on-demand data, the descrambled data after the interference randomization is obtained, and the process of transmitting the scrambled data from the sending end to the receiving end to obtain the OD data or the PD data is realized. This method adapts to the continuous development of existing industrial communication technology, and can improve the OD data or PD data descrambling efficiency according to different data descrambling.

[0155] In an implementable manner, the length of the descrambling sequence generated by the process data descrambling strategy is less than the length of the descrambling sequence generated by the non-process data descrambling strategy; and / or, the security level of the descrambling sequence generated by the process data descrambling strategy is higher than the security level of the descrambling sequence generated by the non-process data descrambling strategy.

[0156] In the embodiment, due to the requirement of the data service characteristics after descrambling, the descrambling strategies for different data type service data are also different. For example, due to the high security requirement of process data, the security level of the descrambling sequence generated by the process data descrambling strategy is higher than that of the descrambling sequence generated by the non-process data descrambling strategy. The descrambling sequence of the process data can be determined by using the encryption white list, while the descrambling sequence of the non-process data is determined according to the equipment number and the encryption cyclic shift parameter value. Therefore, the security level of the descrambling sequence generated by the process data descrambling strategy is higher; because the real-time requirement of the process data is higher than that of the non-process data, and the data length is shorter than that of the non-process data, the length of the descrambling sequence generated by the corresponding process data descrambling strategy is smaller than that of the non-process data descrambling strategy, and the real-time requirement of the process data can be improved by the shorter length of the descrambling sequence. By determining the descrambling advantage of the descrambling strategy of different service data, the accuracy of the descrambling of different service data can be ensured.

[0157] In an implementable manner, the data characteristics include a data type flag of the service data; and the data type of the service data is identified according to the data characteristics, including:

[0158] Step G10, identifying the data type of the service data according to the data type flag of the service data.

[0159] In the embodiment, because different service data corresponds to different descrambling strategies, the descrambling strategy refers to a manner of descrambling PD data or non-PD data by a data descrambling device, which can include a high-security mechanism descrambling strategy of process data and a demand data interference randomization descrambling strategy. The high-security mechanism descrambling strategy of process data refers to a descrambling strategy formulated according to the high security, short data packet, and high real-time requirement in the characteristics of process data in Table 1. The demand data interference randomization descrambling strategy refers to a descrambling strategy formulated according to the demand data interference, long data packet, and low real-time requirement in Table 1. By determining the data characteristics of service data, the data type flag bit of service data is included in the data characteristics, and then the data type of service data can be identified according to the data type flag bit of service data. For example, when the data type flag bit is 1, it indicates that the service data is process data, and when the data type flag bit is 0, it indicates that the service data is non-process data. The data type flag bit refers to a data flag bit, which can be 1 or 0, or other numerical values, as long as the mapping relationship of the numerical values is defined. It can also be determined according to the length of the data. When the data length is greater than the preset process data length, it can be determined that the service data is non-process data. Conversely, when the data length is less than or equal to the preset process data length, it can be determined that the service data is process data. Or it can also be determined by judging the interference situation in the data and other ways to determine the data type of service data. The data descrambling method and the device can be referred to for the implementation flowchart and device of data division processing Figure 5 and Figure 6 The data type of service data is determined, and then different descrambling strategies are processed according to the data type flag bit or other length, interference, and other characteristics of different data types, so that different data can be protected while improving the efficiency of data hierarchical scrambling.

[0160] In an implementable manner, when the data type is process data, the generating of the corresponding descrambling sequence according to the descrambling strategy includes:

[0161] Step H10, obtaining an encrypted descrambling initial value based on a preset encryption whitelist; when the data scrambling device is applied to a user terminal, the encryption whitelist includes an encrypted descrambling initial value corresponding to the user terminal itself; when the data scrambling device is applied to a base station, the encryption whitelist includes encrypted descrambling initial values corresponding to all user terminals in communication with the base station; the encrypted descrambling initial values corresponding to different user terminals are different;

[0162] Step H20, obtaining a corresponding descrambling sequence according to the encrypted descrambling initial value.

[0163] In the embodiment, when the service data is process data, the initial descrambling value in the preset encryption white list is determined based on the process data descrambling strategy. When the data descrambling device is applied to a user terminal, the encryption white list includes the encrypted initial descrambling value corresponding to the user terminal itself. When the data descrambling device is applied to a base station, the encryption white list includes the encrypted initial descrambling values corresponding to all user terminals in communication with the base station, and the encrypted initial descrambling values corresponding to different user terminals are different. The encryption white list refers to a data list storing the initial descrambling value. The initial descrambling value refers to an initial value for descrambling to obtain a descrambling sequence. That is, when the data descrambling device is in the terminal, the internal encryption white list at least stores the encrypted initial descrambling value corresponding to the terminal itself. When the data descrambling device is in the base station, the internal encryption white list at least stores the encrypted initial descrambling values corresponding to all user terminals in communication with the base station, and the encrypted initial descrambling values corresponding to different user terminals are different. In this way, the security of process data descrambling of different user terminals can be ensured.

[0164] In an implementable manner, the preset encryption white list is a static encryption white list, and each user terminal in the static encryption white list corresponds to a unique encrypted initial descrambling value. The data scrambling device pre-stores a correspondence table between the encrypted initial descrambling value and the descrambling sequence, and the descrambling sequence in the correspondence table is generated in advance according to the encrypted initial descrambling value.

[0165] The correspondence table between the encrypted initial descrambling value and the descrambling sequence includes:

[0166] Step I10, querying the correspondence table according to the encrypted initial descrambling value to obtain the descrambling sequence corresponding to the encrypted initial descrambling value.

[0167] In the embodiment, when the process data is descrambled, the preset encryption whitelist can be a static encryption whitelist, that is, each user terminal in the static encryption whitelist corresponds to a unique encrypted descrambling initial value, and a correspondence table of the encrypted descrambling initial value and a descrambling sequence is pre-stored in the data descrambling device, and the descrambling sequence in the correspondence table is generated in advance according to the encrypted descrambling initial value. The static encryption whitelist refers to a list table of a unique descrambling initial value corresponding to a user terminal, and the correspondence table refers to a mapping table of the initial value and the descrambling sequence. That is, the unique descrambling initial value and the descrambling sequence have a mapping relationship, and the descrambling sequence corresponding to the descrambling initial value can be obtained by directly searching the correspondence table. The data scrambling selection process and device can be described with reference to the data selection implementation flowchart in the data scrambling method and the data selection device in the data scrambling method. Because of the security and timeliness of the process data and the short data packet, the encryption whitelist (high security and short data packet, which does not need to occupy too much space) needs to be used. The encryption whitelist can be an encrypted unique identity number, and the way of determining the descrambling sequence through the static encryption whitelist can ensure that the user terminal or the base station can normally perform data descrambling when offline, thereby ensuring the functionality of data descrambling.

[0168] In an implementable manner, the preset encryption whitelist is a dynamic encryption whitelist or a semi-dynamic encryption whitelist; the encrypted descrambling initial value corresponding to the user terminal in the dynamic encryption whitelist changes dynamically; and the encrypted descrambling initial value corresponding to the user terminal in the semi-dynamic encryption whitelist remains unchanged within a preset period and changes dynamically outside the preset period.

[0169] The encrypted descrambling initial value is obtained based on the preset encryption whitelist, and the method comprises the following steps:

[0170] Step J10, the encrypted descrambling initial value currently corresponding to the user terminal is obtained based on the dynamic encryption whitelist or the semi-dynamic encryption whitelist.

[0171] The corresponding descrambling sequence is obtained according to the encrypted descrambling initial value, and the method comprises the following steps:

[0172] Step J20, the descrambling sequence is generated online by using a preset first descrambling sequence generator according to the encrypted descrambling initial value.

[0173] In the embodiment, the preset encryption whitelist can also be a dynamic encryption whitelist or a semi-dynamic encryption whitelist when the process data is descrambled. In the dynamic encryption whitelist, the encrypted descrambling initial value corresponding to the user terminal dynamically changes. In the semi-dynamic encryption whitelist, the encrypted descrambling initial value corresponding to the user terminal remains unchanged within a preset period and dynamically changes outside the preset period. Descrambling according to the descrambling sequence can be XOR descrambling with the PD data to be descrambled by bit. When the preset encryption whitelist is a dynamic encryption whitelist, the scrambling initial value corresponding to the terminal dynamically changes, that is, the terminal corresponds to different descrambling initial values at different time points. The number of descrambling initial values in the dynamic encryption whitelist is greater than the number of identifiable terminals because each terminal corresponds to multiple descrambling initial values. When the preset encryption whitelist is a semi-dynamic encryption whitelist, the period information in the descrambling strategy is determined, and the descrambling initial value is updated according to the period information. The first descrambling sequence generator generates the descrambling sequence within the period. The period information refers to the period for obtaining the descrambling initial value. Based on the period, the descrambling initial value of the semi-dynamic encryption whitelist is selected in the encryption whitelist, and the corresponding descrambling sequence within a period is generated in the first sequence generator according to the descrambling initial value. That is, the descrambling sequence in the sequence storage corresponding to the semi-dynamic encryption whitelist is periodically cached online, and then XOR descrambling with the PD data to be descrambled by bit is performed. The periodic caching is that the sequence storage caches the entire length of the descrambling sequence during the initial value update, and then the sequence storage is overwritten the next time the initial value is updated. When performing XOR descrambling with the PD data to be descrambled by bit, the sequence storage is circularly shifted to perform descrambling when the PD data length is greater than the descrambling sequence length. Because each terminal corresponds to multiple descrambling initial values in the semi-dynamic encryption whitelist, the number of descrambling initial values in the semi-dynamic encryption whitelist is greater than the number of identifiable terminals. Because the process data has timeliness requirements, there can be three ways of descrambling by the static encryption whitelist, the dynamic encryption whitelist, and the semi-dynamic encryption whitelist. When two or three descrambling modes are configured at the same time, the descrambling strategy needs to be synchronized with the base station when performing data descrambling. Different encryption whitelists are used to realize different descrambling modes, thereby ensuring the diversity and adaptability of process data descrambling, and different descrambling modes can be used, thereby improving the efficiency of process data descrambling without being limited by the actual environment. The process data descrambling process can be referred to Figure 11 and Figure 12It is explained that the first descrambling sequence generator generating the descrambling sequence and the first scrambling sequence generator generating the scrambling sequence can actually be shared. It is worth noting that the dynamic encryption whitelist, the semi-dynamic encryption whitelist and the static encryption whitelist can exist simultaneously in the data scrambling device, or two or one of them can exist. When two whitelists exist, the user can select or the data scrambling device can switch according to the actual situation, thereby ensuring that the data scrambling device has strong adaptive ability and the diversity of process data scrambling.

[0174] In an implementable manner, when the data type is non-process data, the generating a corresponding descrambling sequence according to the descrambling strategy comprises:

[0175] Step K10, when the data descrambling device is applied to a user terminal, obtaining a device identification number of the user terminal; when the data descrambling device is applied to a base station, obtaining a device identification number of a user terminal in communication with the base station;

[0176] Step K20, querying a preset correspondence table of device identification numbers and encryption cyclic shift parameter values according to the device identification number to obtain an encryption cyclic shift parameter value corresponding to the device identification number;

[0177] Step K30, obtaining a corresponding descrambling initial value according to the encryption cyclic shift parameter value and the device identification number;

[0178] Step K40, generating the descrambling sequence according to the descrambling initial value by using a preset second descrambling sequence generator.

[0179] In the embodiment, when the service data is non-process data, the equipment identification number of the user terminal is determined based on the non-process data decryption strategy. The determination of the equipment identification number of the user terminal can be divided into two cases. When the data decryption device is applied to the user terminal, the equipment identification number of the user terminal is directly obtained in the user terminal. When the data decryption device is applied to the base station, the equipment identification number of the user terminal communicating with the base station is obtained in the base station. The equipment identification numbers of all the user terminals communicating with the base station are included in the base station. Then, the corresponding relationship table of the preset equipment identification number and the encrypted cyclic shift parameter value is queried according to the obtained equipment identification number. The encrypted cyclic shift parameter value corresponding to the equipment identification number is obtained. Finally, the decryption initial value is generated according to the encrypted cyclic shift parameter value and the equipment identification number. The decryption initial value is input into the second decryption sequence generator to generate the decryption sequence. The equipment identification number refers to the unique identification number of each equipment, which can be a network code or a self-defined equipment code. The encrypted cyclic shift parameter value refers to the inherent shift parameter value of the equipment identification number, which can be set or automatically generated. The decryption initial value refers to the combination of the unique identity address identification number and the encrypted specific cyclic shift parameter value or the combination of the virtual field identification number or value set by the communication network and the encrypted specific cyclic shift parameter value. The cyclic shift parameter value is a preset self-defined value, and the cyclic shift parameter value corresponding to each terminal is different. In a preferred implementation example, the cyclic shift parameter value is related to the proximity of the equipment identification number of the terminal. The closer the equipment identification numbers of two terminals, the greater the difference between the cyclic shift parameter values corresponding to the two terminals. In this way, the problem of signal interference caused by the proximity of the equipment identification numbers can be avoided, and the anti-interference performance between the communication signals can be improved. In the embodiment, after the data decryption device obtains the encrypted cyclic shift parameter value, the encrypted cyclic shift parameter value is decrypted according to the decryption strategy agreed with the data encryption device to obtain the cyclic shift parameter value. Then, the decryption initial value is obtained according to the cyclic shift parameter value and the equipment identification number.

[0180] The decryption method of the non-process data of the embodiment can be correspondingly explained with reference to Figure 13 and Figure 14 The second decryption sequence generator for generating the decryption sequence of the process data and the second scrambling sequence generator for generating the scrambling sequence can actually be shared. In the embodiment, the process data and the non-process data are adaptively and hierarchically decrypted according to the service characteristics of the service data, so that the flexibility and efficiency of the decryption of the process data and the non-process data are improved.

[0181] The application also provides a data scrambling device.

[0182] The data scrambling device of the application comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the data scrambling method described above are implemented.

[0183] The application further provides a data descrambling device.

[0184] The data descrambling device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is used to realize the steps of the data descrambling method.

[0185] The application further provides a storage medium.

[0186] The storage medium stores a computer program, and the computer program is used to realize the steps of the data scrambling method and the steps of the data descrambling method.

[0187] The computer program executable on the processor comprises a data scrambling program and a data descrambling program, and the methods realized by the data scrambling program and the data descrambling program executable on the processor can refer to the embodiments of the data scrambling method and the data descrambling method, and will not be described herein.

[0188] It should be noted that, in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that the processes, methods, articles or systems including a series of elements not only include those elements, but also include other elements not explicitly listed, or include the elements inherent to such processes, methods, articles or systems. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or system including the element.

[0189] The above-mentioned embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0190] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by software and a necessary general hardware platform, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the application or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, a computer, a server, or a network device) execute the methods described in the embodiments of the application.

[0191] The above merely describes the preferred embodiments of the present application, and is not intended to limit the patent scope of the present application, and any equivalent structure or equivalent process conversion, or direct or indirect application in other related technical fields, which are made by using the content of the present application specification and drawings, are also included in the patent protection scope of the present application.

Claims

1. A data scrambling method applied to a data scrambling device, characterized by, The method comprises: acquiring service data, and extracting data features of the service data; identifying a data type of the service data according to the data features; the data type comprises process data and non-process data; acquiring a scrambling strategy of the service data according to the data type, and generating a corresponding scrambling sequence according to the scrambling strategy; the scrambling strategy comprises a process data scrambling strategy and a non-process data scrambling strategy, when the data type is process data, the generating of the corresponding scrambling sequence according to the scrambling strategy comprises: acquiring an encrypted scrambling initial value based on a preset encryption whitelist; when the data scrambling device is applied to a user terminal, the encryption whitelist comprises an encrypted scrambling initial value corresponding to the user terminal itself; when the data scrambling device is applied to a base station, the encryption whitelist comprises encrypted scrambling initial values corresponding to all user terminals in communication with the base station; the encrypted scrambling initial values corresponding to different user terminals are different; and acquiring a corresponding scrambling sequence according to the encrypted scrambling initial value; when the data type is non-process data, the generating of the corresponding scrambling sequence according to the scrambling strategy comprises: when the data scrambling device is applied to a user terminal, acquiring a device identification number of the user terminal; when the data scrambling device is applied to a base station, acquiring a device identification number of a user terminal in communication with the base station; acquiring an encryption cyclic shift parameter value corresponding to the device identification number according to a preset correspondence table of device identification numbers and encryption cyclic shift parameter values; generating a scrambling initial value according to the encryption cyclic shift parameter value and the device identification number; and generating the scrambling sequence according to the scrambling initial value by using a preset second scrambling sequence generator; scrambling the service data according to the scrambling sequence; sending the scrambled service data.

2. The data scrambling method of claim 1, wherein, The length of the scrambling sequence generated by the process data scrambling strategy is smaller than the length of the scrambling sequence generated by the non-process data scrambling strategy; and / or the security level of the scrambling sequence generated by the process data scrambling strategy is higher than the security level of the scrambling sequence generated by the non-process data scrambling strategy.

3. The data scrambling method of claim 1, wherein, The data features comprise a data type flag of the service data; and the identifying of the data type of the service data according to the data features comprises: identifying the data type of the service data according to the data type flag of the service data.

4. The data scrambling method as claimed in claim 1, wherein, The preset encryption whitelist is a static encryption whitelist, each user terminal in the static encryption whitelist corresponds to a unique encrypted scrambling initial value; the data scrambling device pre-stores a correspondence table of the encrypted scrambling initial values and the scrambling sequences, and the scrambling sequences in the correspondence table are generated in advance according to the encrypted scrambling initial values; The acquiring of the corresponding scrambling sequence according to the encrypted scrambling initial value comprises: querying the correspondence table according to the encrypted scrambling initial value, and acquiring the scrambling sequence corresponding to the encrypted scrambling initial value.

5. The data scrambling method as claimed in claim 1, wherein, The preset encryption whitelist is a dynamic encryption whitelist or a semi-dynamic encryption whitelist; the encrypted scrambling initial value corresponding to the user terminal in the dynamic encryption whitelist is dynamically changed; the encrypted scrambling initial value corresponding to the user terminal in the semi-dynamic encryption whitelist remains unchanged within a preset period and is dynamically changed outside the preset period; The encrypted scrambling initial value is obtained based on the preset encryption whitelist, and the obtaining includes: The encrypted scrambling initial value currently corresponding to the user terminal is obtained based on the dynamic encryption whitelist or the semi-dynamic encryption whitelist; The scrambling sequence corresponding to the encrypted scrambling initial value is obtained, and the obtaining includes: The scrambling sequence is generated online by using a preset first scrambling sequence generator based on the encrypted scrambling initial value.

6. A data descrambling method applied to a data descrambling device, characterized by, It includes: Obtaining service data and extracting data features of the service data; According to the data features, the data type of the service data is identified; the data type includes process data and non-process data; According to the data type, the descrambling strategy of the service data is obtained, and the corresponding descrambling sequence is obtained according to the descrambling strategy; the descrambling strategy includes process data descrambling strategy and non-process data descrambling strategy; when the data type is process data, the corresponding descrambling sequence is generated according to the descrambling strategy, which includes: The encrypted descrambling initial value is obtained based on the preset encryption whitelist; when the data scrambling device is applied to a user terminal, the encryption whitelist includes the encrypted descrambling initial value corresponding to the user terminal itself; when the data scrambling device is applied to a base station, the encryption whitelist includes the encrypted descrambling initial value corresponding to all user terminals in communication with the base station; the encrypted descrambling initial value corresponding to different user terminals is different; the corresponding descrambling sequence is obtained according to the encrypted descrambling initial value; When the data type is non-process data, the corresponding descrambling sequence is generated according to the descrambling strategy, which includes: when the data descrambling device is applied to a user terminal, the equipment identification number of the user terminal is obtained; when the data descrambling device is applied to a base station, the equipment identification number of the user terminal in communication with the base station is obtained; the corresponding relationship table between the equipment identification number and the encrypted cyclic shift parameter value is queried based on the equipment identification number, and the encrypted cyclic shift parameter value corresponding to the equipment identification number is obtained; the corresponding descrambling initial value is obtained based on the encrypted cyclic shift parameter value and the equipment identification number; the descrambling sequence is generated based on the descrambling initial value by using a preset second descrambling sequence generator; The service data is descrambled according to the descrambling sequence; The descrambled service data is sent.

7. The data descrambling method of claim 6 wherein, The length of the descrambling sequence generated by the process data descrambling strategy is less than the length of the descrambling sequence generated by the non-process data descrambling strategy; and / or, the security level of the descrambling sequence generated by the process data descrambling strategy is higher than the security level of the descrambling sequence generated by the non-process data descrambling strategy.

8. The data descrambling method of claim 6 wherein, The data features include the data type flag of the service data; the data type of the service data is identified based on the data features, which includes: The data type of the service data is identified according to a data type flag of the service data.

9. The data descrambling method of claim 6 wherein, The preset encryption white list is a static encryption white list, and each user terminal in the static encryption white list corresponds to a unique encrypted descrambling initial value; the data scrambling device pre-stores a correspondence table of the encrypted descrambling initial value and the descrambling sequence, and the descrambling sequence in the correspondence table is generated in advance according to the encrypted descrambling initial value; The corresponding descrambling sequence is obtained according to the encrypted descrambling initial value, and the obtaining includes: The correspondence table is queried according to the encrypted descrambling initial value to obtain the descrambling sequence corresponding to the encrypted descrambling initial value.

10. The data descrambling method of claim 6 wherein, The preset encryption white list is a dynamic encryption white list or a semi-dynamic encryption white list; the encrypted descrambling initial value corresponding to the user terminal in the dynamic encryption white list changes dynamically; the encrypted descrambling initial value corresponding to the user terminal in the semi-dynamic encryption white list remains unchanged within a preset period and changes dynamically outside the preset period; The encrypted descrambling initial value is obtained based on the preset encryption white list, and the obtaining includes: The encrypted descrambling initial value currently corresponding to the user terminal is obtained based on the dynamic encryption white list or the semi-dynamic encryption white list. The corresponding descrambling sequence is obtained according to the encrypted descrambling initial value, and the obtaining includes: The descrambling sequence is generated online by a preset first descrambling sequence generator according to the encrypted descrambling initial value.

11. A data scrambling device, characterized in that, The data scrambling device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is executed by the processor to implement the steps of the data scrambling method in any one of claims 1 to 5.

12. A data descrambling apparatus, characterized by comprising: The data descrambling device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is executed by the processor to implement the steps of the data descrambling method in any one of claims 6 to 10.

13. A storage medium, characterized by The storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the data scrambling method in any one of claims 1 to 5; or the computer program is executed by the processor to implement the steps of the data descrambling method in any one of claims 6 to 10.

Citation Information

Patent Citations

  • DVB (Digital Video Broadcasting) conditional sending device integrating basic data and normal data scrambling

    CN103248918A

  • DVB (Digital Video Broadcasting) condition receiving device capable of descrambling integrated basic data and normal data

    CN103281572A