A reconfigurable secure transmission method and device

By processing the switching signals and reloading the transmission firmware, the problem of equipment function solidification in the prior art is solved, and the flexible demand for network isolation of one-way secure transmission and two-way transmission is realized, reducing production costs.

CN117640789BActive Publication Date: 2024-11-05SHENZHEN LIANRUI ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410007764.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-03
Publication Date
2024-11-05
Estimated Expiration
2044-01-03

AI Technical Summary

Technical Problem

When the existing network unidirectional import products realize unidirectional transmission, the equipment functions are solidified, and the network card function cannot be switched in real time according to requirements, and cannot meet the flexible needs of network isolation unidirectional secure transmission and bidirectional transmission.

Method used

The main control device obtains switching signals, processes control instructions, generates chip selection signals, reads configuration information in the memory chip, performs preloading, and reloads the transmission firmware after the microcontroller restarts, switches the transmission mode, and realizes one-way or two-way transmission. .

Benefits of technology

It improves the flexibility and configurability of the system, and can switch network card functions in real time according to user needs, meets one-way or two-way transmission needs, and reduces the manufacturer's stocking and R&D costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640789B_ABST
    Figure CN117640789B_ABST
Patent Text Reader

Abstract

The present invention relates to a reconfigurable secure transmission method and device, the reconfigurable secure transmission method includes a single chip microcomputer receiving a control instruction sent by a main control device; wherein the main control device obtains a switching signal through a serial interface, processes the switching signal, obtains a control instruction and sends it to the single chip microcomputer; processes the received control instruction to obtain a chip select signal; reads the corresponding storage chip according to the chip select signal, obtains the configuration information of the main control device stored in the storage chip, and preloads the obtained configuration information, the single chip microcomputer restarts, and resets the running state; after restarting, according to the preloaded configuration information, reloads the transmission firmware set in the storage chip through the storage chip, constructs a corresponding transmission mode and switches to the corresponding transmission mode. The present invention can switch the network card function in real time as needed, and at the same time meet the needs of flexible switching of unidirectional secure transmission and bidirectional transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reconfigurable secure transmission, and in particular to a reconfigurable secure transmission method and device. Background Art

[0002] The network unidirectional import product is generally composed of dual hosts plus unidirectional transmission components, namely, data sending processing unit, data receiving processing unit and unidirectional transmission component. The network unidirectional import product is deployed between two different security domains. Among them, the network interface of the data sending processing unit is connected to the information sender security domain A, and the network interface of the data receiving processing unit is connected to the information receiver security domain B. The information flow flows from the security domain A that sends data to the security domain B that receives data. The unidirectional transmission component uses the physical characteristics of unidirectional transmission to establish the only unidirectional transmission channel between the two security domains. In this channel, data can only be transmitted unidirectionally from the data sending processing unit to the data receiving processing unit. The unidirectional transmission component consists of a pair of unidirectional receiving components and a unidirectional sending component. The unidirectional sending component is installed in the data sending processing unit, and the receiving component is installed in the data receiving processing unit. The unidirectional physical transmission characteristics of the unidirectional transmission component are fixed and cannot be modified. Any software configuration, physical jumper, etc. cannot change the unidirectional transmission characteristics and transmission direction of its components, thereby achieving the reliability of unidirectional data import. Currently, one-way import components are generally completed using a fiber optic network card that physically shields the receiving or sending channel. A single device can only complete one-way transmission in one direction, and two-way transmission requires two devices. Summary of the invention

[0003] The main purpose of the present invention is to provide a reconfigurable secure transmission method and device, which can switch the network card function in real time according to needs, while meeting the needs of network isolation unidirectional secure transmission and bidirectional transmission, and can also meet the needs of unidirectional transmission or bidirectional transmission separately, and the application is more flexible.

[0004] To achieve the above object, the present invention provides a reconfigurable secure transmission method, comprising:

[0005] The main control device obtains the switching signal through the serial interface, processes the switching signal, obtains the control instruction, and sends the control instruction;

[0006] The single chip microcomputer receives the control instruction sent by the main control device;

[0007] Process the received control instructions to obtain a chip select signal;

[0008] Reading the corresponding memory chip according to the chip selection signal, obtaining the configuration information of the master control device stored in the memory chip, and preloading the obtained configuration information, restarting the single chip computer, and resetting the running state;

[0009] After restarting, the transmission firmware set in the storage chip is reloaded through the storage chip according to the preloaded configuration information, a corresponding transmission mode is constructed and switched to the corresponding transmission mode.

[0010] Furthermore, before the step of obtaining the switching signal based on the master control device through the serial interface, the method further comprises:

[0011] The host computer is connected to the main control device via a serial interface, and the main control device is connected to the single-chip microcomputer via a communication protocol, and controls the single-chip microcomputer to load a preset transmission firmware and run a preset transmission mode.

[0012] Further, the switching signal includes a unidirectional switching signal and a bidirectional switching signal, and the master control device obtains the switching signal through a serial interface and processes the switching signal to obtain a control instruction, including:

[0013] When the host computer switches the transmission mode and sends a switching signal, the main control device receives the switching signal through the serial interface, and the main control device detects the type of the switching signal;

[0014] When the switching signal is the unidirectional switching signal, the main control device configures the corresponding status register according to the unidirectional switching signal and obtains a unidirectional switching control instruction;

[0015] When the switching signal is the unidirectional switching signal, the main control device configures the corresponding status register according to the bidirectional switching signal and obtains a bidirectional switching control instruction.

[0016] Further, the main control device receives the switching signal through a serial interface, and the main control device detects the type of the switching signal, including:

[0017] The switching signal is converted into serial data through the serial interface and transmitted to the master control device. After the master control device receives the serial data, the receiving buffer of the master control device is detected through the polling mechanism of the master control device. When it is detected that the receiving buffer is carrying out a program flow, an interrupt operation is performed on the ongoing program flow through the interrupt mechanism of the master control device, and the master control device stores the serial data in the receiving buffer;

[0018] Based on a preset serial data conversion table, the master control device converts the serial data stored in the receiving buffer to obtain the switching signal, and the master control device parses the switching signal to obtain parsed data. The master control device identifies the parsed data by combining a preset data format and a preset numerical range to obtain a specific type of the switching signal.

[0019] Further, the master control device stores the serial data in a receiving buffer, including:

[0020] The check value of the serial data is obtained through the serial interface, and the main control device divides the received serial data into various field parameters according to a predetermined rule, calculates the field parameters, and obtains a calculated value;

[0021] The master control device compares the calculated value with the check value, and when the calculated value is consistent with the check value, stores the various field parameters of the serial data in a receiving buffer; when the calculated value is inconsistent with the check value, the master control device executes error handling measures, including re-requesting data, discarding erroneous data and sending error notifications.

[0022] Further, the processing of the received control instruction to obtain a chip select signal includes:

[0023] When the single-chip microcomputer receives the control instruction sent by the main control device through the communication protocol, the control instruction is parsed to obtain the operation code and operand of the control instruction, the operation code and operand of the control instruction are verified by a preset algorithm to obtain a verification result, and the single-chip microcomputer generates a chip select signal of a corresponding type according to the verification result;

[0024] The single-chip microcomputer generates a chip select signal of a corresponding type according to the verification result, including: when the control instruction is a unidirectional switching control instruction, the single-chip microcomputer generates a unidirectional switching chip select signal;

[0025] When the control instruction is a bidirectional switching control instruction, the single chip microcomputer generates a bidirectional switching chip select signal.

[0026] Furthermore, the operation code and operand of the control instruction are verified by a preset algorithm to obtain a verification result, including:

[0027] The single-chip microcomputer obtains the meaning of the operation code according to a preset meaning table, and verifies the logical relationship between the operation code and the operand through a preset logical relationship table. When the position of the operand in the logical relationship table is consistent with the position of the meaning of the operation code in the logical relationship table, the logical relationship between the operation code and the operand is established, and the operation code and the operand of the control instruction are verified;

[0028] When the position of the operand in the logic relationship table is inconsistent with the meaning of the operation code in the logic relationship table, the logic relationship between the operation code and the operand does not hold, and the operation code and the operand need to be reacquired.

[0029] Further, the storage chip includes a first storage chip and a second storage chip, and reading the corresponding storage chip according to the chip selection signal, obtaining the configuration information of the main control device stored in the storage chip, and preloading the obtained configuration information includes:

[0030] When the chip select signal is a unidirectional switching chip select signal, the single chip microcomputer reads the second storage chip;

[0031] Acquire the second configuration information of the master control device stored in the second storage chip, the single chip microcomputer performs preloading according to the acquired second configuration information, generates a second loading signal and sends it to the second storage chip;

[0032] When the chip select signal is a bidirectional switching chip select signal, the single chip microcomputer reads the first storage chip;

[0033] The first configuration information of the main control device stored in the first storage chip is obtained, the single chip microcomputer is preloaded according to the obtained first configuration information, and a first loading signal is generated and sent to the first storage chip.

[0034] Further, the transmission firmware includes a bidirectional transmission firmware set in the first storage chip and a unidirectional transmission firmware set in the second storage chip. According to the preloaded configuration information, the single chip microcomputer reloads the transmission firmware through the storage chip to construct a corresponding transmission mode, including:

[0035] When the second storage chip receives the second loading signal, the second loading signal is verified. When the verification is passed, the single-chip microcomputer loads the unidirectional transmission firmware through the second storage chip, and the main control device controls the unidirectional transmission firmware through the single-chip microcomputer to establish a unidirectional transmission mode;

[0036] When the first storage chip receives the first loading signal, the first loading signal is verified. When the verification is passed, the microcontroller loads the bidirectional transmission firmware through the first storage chip, and the main control device controls the bidirectional transmission firmware through the microcontroller to establish a bidirectional transmission mode.

[0037] The present invention also provides a reconfigurable secure transmission device, comprising:

[0038] Memory, used to store programs;

[0039] The processor is used to execute the program to implement each step of the reconfigurable secure transmission method described in any one of the above.

[0040] The reconfigurable secure transmission method and device provided by the present invention have the following beneficial effects:

[0041] The switching signal is obtained through the main control device, and the control instruction is obtained and sent according to the switching signal. The single-chip microcomputer processes the received control instruction to obtain the chip select signal, which can improve the overall flexibility. According to the chip select signal, the corresponding configuration information is read and preloaded. When the single-chip microcomputer is restarted, it can automatically work according to the predetermined transmission mode in the initial state, thereby completing the mode switching, and then can switch the network card function in real time according to the needs of the user, while meeting the needs of network isolation one-way secure transmission and two-way transmission, and can also meet the needs of one-way transmission or two-way transmission separately, so the application is more flexible, reducing the manufacturer's stocking cost and hardware research and development production cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of a reconfigurable secure transmission method provided by the present invention.

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0045] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.

[0046] Reference Figure 1 The present invention provides a reconfigurable secure transmission method, comprising:

[0047] Step S1: The main control device obtains a switching signal through a serial interface, processes the switching signal, obtains a control instruction, and sends the control instruction;

[0048] Step S2: The single chip microcomputer receives the control instruction sent by the main control device;

[0049] Step S3: Process the received control instruction to obtain a chip selection signal;

[0050] Step S4: reading the corresponding memory chip according to the chip selection signal, obtaining the configuration information of the master control device stored in the memory chip, and preloading the obtained configuration information, restarting the single chip computer, and resetting the running state;

[0051] Step S5: After restarting, according to the preloaded configuration information, the transmission firmware set in the storage chip is reloaded through the storage chip, a corresponding transmission mode is constructed and switched to the corresponding transmission mode.

[0052] As shown in the above steps, specifically, the detailed steps include:

[0053] Step S1: The main control device receives a switching signal through a serial interface, processes the received switching signal, converts it into a corresponding control instruction, and sends the control instruction to the single-chip microcomputer through the serial interface.

[0054] Step S2: The single-chip microcomputer receives the control instruction sent by the main control device through the serial interface, and the single-chip microcomputer stores the received control instruction in an appropriate memory or register for subsequent processing.

[0055] Step S3: The single chip microcomputer processes the received control instruction and extracts a chip select signal according to the definition and requirements of the instruction. The chip select signal is used to select the corresponding memory chip to read the configuration information of the master control device stored in the memory chip.

[0056] Step S4: the single-chip microcomputer selects the corresponding memory chip according to the chip selection signal, and the single-chip microcomputer reads the configuration information of the master control device from the memory chip. The single-chip microcomputer preloads the acquired configuration information, that is, sets the configuration information to the appropriate register or memory.

[0057] The microcontroller performs a reboot operation to reset its operating state and apply the new configuration information.

[0058] Step S5: After the single-chip microcomputer is restarted, the single-chip microcomputer reloads the transmission firmware set in the storage chip through the storage chip according to the preloaded configuration information. The single-chip microcomputer constructs a corresponding transmission mode according to the loaded transmission firmware, that is, sets corresponding parameters and working modes according to the configuration information. The single-chip microcomputer switches to the corresponding transmission mode and starts to transmit data in a predetermined manner.

[0059] The present invention provides a reconfigurable secure transmission method, which realizes the control and configuration switching of a single-chip microcomputer by acquiring and processing a switching signal through a main control device. At the same time, the flexibility and configurability of the overall system are realized, so that the system can adapt to different working modes or configuration requirements. When the single-chip microcomputer receives a control instruction, it can perform corresponding operations according to the information in the instruction. The remote control and configuration of the single-chip microcomputer are realized, and the controllability and manageability of the system are improved. By processing the control instruction, the single-chip microcomputer obtains the corresponding chip selection signal, and can select the corresponding storage chip according to the chip selection signal. Thereby, the reading and configuration of different storage chips are realized, and preparation is made for subsequent data transmission. By reading the configuration information and preloading it, the single-chip microcomputer can obtain the configuration information of the main control device, and apply the new configuration after restarting, so as to realize the dynamic configuration and update of the system, and improve the flexibility and maintainability of the system. Finally, the transmission firmware is reloaded and the transmission mode is switched according to the preloaded configuration information. Thereby, the real-time switching of the network card function is realized, and the requirements of network isolation unidirectional secure transmission and bidirectional transmission are met at the same time, and the requirements of unidirectional transmission or bidirectional transmission can also be met separately, so that the application is more flexible, and the stocking cost of the manufacturer and the hardware research and development production cost are reduced.

[0060] In one embodiment, before the step of obtaining the switching signal through the serial interface based on the master control device, the method includes:

[0061] The host computer is connected to the main control device through a serial interface, and the main control device is connected to the single-chip microcomputer through a communication protocol, and controls the single-chip microcomputer to load a preset transmission firmware and run a preset transmission mode.

[0062] Among them, the serial interface is the PCIE interface, the master control device is the FPGA master control, and the communication protocol is the UART protocol.

[0063] After the upper computer of this embodiment is powered on, it controls the single-chip microcomputer to run the preset transmission mode, so that the upper computer can directly run the default transmission mode after powering on, thereby improving work efficiency. At the same time, through the serial interface and communication protocol, the transmission mode of the upper computer can be directly obtained. When the upper computer switches the transmission mode, the main control device can control the single-chip microcomputer to switch the corresponding transmission mode in real time, thereby improving the operation and management efficiency of the equipment and enhancing the function and stability of the equipment.

[0064] In one embodiment, the switching signal includes a unidirectional switching signal and a bidirectional switching signal. The main control device obtains the switching signal through a serial interface and processes the switching signal to obtain a control instruction, including:

[0065] When the host computer switches the transmission mode and sends a switching signal, the master device receives the switching signal through the serial interface, and the master device detects the type of the switching signal;

[0066] When the switching signal is a unidirectional switching signal, the master control device configures the corresponding status register according to the unidirectional switching signal and obtains a unidirectional switching control instruction;

[0067] When the switching signal is a unidirectional switching signal, the main control device configures the corresponding status register according to the bidirectional switching signal and obtains a bidirectional switching control instruction.

[0068] In this embodiment, the master device quickly responds to the change of the switching signal according to the type of the switching signal, configures the corresponding status register, and generates the corresponding control instructions in real time to ensure the stability and reliability during the switching process. Through the configuration of the status register, the working state of the single-chip microcomputer can be accurately controlled, including the relevant parameters and settings of unidirectional switching and bidirectional switching. The master device can perform different configurations and processing according to the type of the switching signal, which can improve the overall flexibility.

[0069] In one embodiment, the master control device receives the switching signal through the serial interface, and the master control device detects the type of the switching signal, including:

[0070] The switching signal is converted into serial data through the serial interface and transmitted to the master control device. When the master control device receives the serial data, the receiving buffer of the master control device is detected through the polling mechanism of the master control device. When it is detected that the receiving buffer is in the process of program flow, the interruption operation is performed on the ongoing program flow through the interruption mechanism of the master control device, and the master control device stores the serial data in the receiving buffer;

[0071] Based on a preset serial data conversion table, the master control device converts and processes the serial data stored in the receiving buffer to obtain a switching signal. The master control device parses and processes the switching signal to obtain parsed data. The master control device identifies the parsed data by combining a preset data format and a preset numerical range to obtain a specific type of the switching signal.

[0072] In this embodiment, the main control device detects the receiving buffer through a polling mechanism. When the receiving buffer is in the process of program flow, the interruption operation is performed on the program flow through the interruption mechanism to ensure the real-time processing of the received serial data. Real-time parsing and processing of the switching signal is realized to ensure the stability and reliability of the system during the switching process. The main control device converts and processes the serial data stored in the receiving buffer according to the preset serial data conversion table to obtain the switching signal. And by combining the preset data format and the preset numerical range, the main control device identifies the parsed data to obtain the specific type of the switching signal, improves the flexibility and parsing ability of data conversion, and thus adapts to different types of switching signals. Through the preset data format and numerical range, the main control device can accurately identify the parsed data and determine the specific type of the switching signal. Improve the accuracy and reliability of the switching signal to avoid parsing errors and erroneous operations.

[0073] In one embodiment, the master device stores the serial data in a receiving buffer, including:

[0074] The check value of the serial data is obtained through the serial interface. The main control device divides the received serial data into various field parameters according to a predetermined rule, calculates the field parameters, and obtains a calculated value;

[0075] The master device compares the calculated value with the check value. When the calculated value is consistent with the check value, the master device stores the various field parameters of the serial data in the receiving buffer. When the calculated value is inconsistent with the check value, the master device performs error handling measures, including re-requesting data, discarding erroneous data, and sending error notifications.

[0076] Among them, re-requesting data means resending the request to obtain correct data; discarding erroneous data means discarding the erroneous data and waiting for the next correct data transmission; sending error notification means sending error notification to relevant parties for subsequent processing.

[0077] In this embodiment, the main control device obtains the check value of the serial data, and splits and calculates the received serial data according to a predetermined rule to obtain a calculated value. By comparing the calculated value with the check value, it can be verified whether an error or loss occurs during the data transmission process. Ensure the integrity of the data and avoid data damage or incompleteness caused by transmission errors. When the calculated value is inconsistent with the check value, the main control device executes error handling measures to handle errors in data transmission in a timely manner and ensure the stability and reliability of the system. When the calculated value is consistent with the check value, the main control device stores the parameters of each field of the serial data in the receiving buffer, which is convenient for subsequent processing and use of the data and realizes effective management and utilization of the data.

[0078] In one embodiment, the chip selection signal is obtained by processing the received control instruction, including:

[0079] When the single-chip microcomputer receives a control instruction sent by the master control device through the communication protocol, the control instruction is parsed to obtain the operation code and operand of the control instruction, and the operation code and operand of the control instruction are verified by a preset algorithm to obtain a verification result. The single-chip microcomputer generates a chip select signal of a corresponding type according to the verification result;

[0080] The single-chip microcomputer generates a chip select signal of a corresponding type according to the verification result, including: when the control instruction obtained is a unidirectional switching control instruction, the single-chip microcomputer generates a unidirectional switching chip select signal;

[0081] When the control instruction received is a bidirectional switching control instruction, the single chip microcomputer generates a bidirectional switching chip select signal.

[0082] In this embodiment, the single-chip microcomputer obtains the operation code and operand of the control instruction by parsing the received control instruction. Then, the operation code and operand are verified by a preset algorithm to obtain a verification result. Thereby, the legality and accuracy of the received control instruction are ensured, and bad operations caused by erroneous instructions are avoided. According to the verification result, the single-chip microcomputer can generate a chip select signal of the corresponding type. When the control instruction is a unidirectional switching control instruction, the single-chip microcomputer generates a unidirectional switching chip select signal; when the control instruction is a bidirectional switching control instruction, the single-chip microcomputer generates a bidirectional switching chip select signal. The single-chip microcomputer can generate a corresponding chip select signal according to the type of the control instruction, and realize accurate control of the switching operation. Through the preset algorithm and verification mechanism, different types of control instructions and switching operations can be flexibly supported, and the requirements of real-time switching transmission mode can be met, as well as various combinations that can simultaneously meet the requirements of safe unidirectional transmission and bidirectional transmission.

[0083] In one embodiment, the operation code and operand of the control instruction are verified by a preset algorithm to obtain a verification result, including:

[0084] The single-chip microcomputer obtains the meaning of the operation code according to the preset meaning table, and verifies the logical relationship between the operation code and the operand through the preset logical relationship table. When the position of the operand in the logical relationship table is consistent with the position of the meaning of the operation code in the logical relationship table, the logical relationship between the operation code and the operand is established, and the operation code and operand of the control instruction are verified.

[0085] When the position of the operand in the logic relationship table is inconsistent with the meaning of the operation code in the logic relationship table, the logic relationship between the operation code and the operand does not hold, and the operation code and the operand need to be re-acquired.

[0086] In this embodiment, the single-chip microcomputer can obtain the specific meaning of the operation code through the preset meaning table. It can enable the single-chip microcomputer to understand the operation type or function represented by the operation code, so as to perform corresponding verification and processing. The acquisition of the meaning of the operation code helps to ensure the correct interpretation and understanding of the control instruction. Through the preset logical relationship table, the single-chip microcomputer can verify the logical relationship between the operation code and the operand. When the position of the operand in the logical relationship table is consistent with the position of the meaning of the operation code in the logical relationship table, the logical relationship between the operation code and the operand is established, and the operation code and operand of the control instruction are verified. Thereby ensuring that the relationship between the operation code and the operand is in line with expectations, avoiding bad operations caused by logical relationship errors. When the position of the operand in the logical relationship table is inconsistent with the position of the meaning of the operation code in the logical relationship table, it indicates that the logical relationship between the operation code and the operand is not established. In this case, the single-chip microcomputer can take corresponding error handling measures, such as re-acquiring the operation code and the operand to ensure the correctness of the control instruction.

[0087] In one embodiment, the storage chip includes a first storage chip (FLASH A) and a second storage chip (FLASH B), and the corresponding storage chip is read according to a chip selection signal to obtain configuration information of the master control device stored in the storage chip, and the obtained configuration information is preloaded, including:

[0088] When the chip selection signal is a unidirectional switching chip selection signal, the single chip microcomputer reads the second storage chip;

[0089] Acquire the second configuration information of the master control device stored in the second storage chip, preload the single-chip microcomputer according to the acquired second configuration information, generate a second loading signal and send it to the second storage chip;

[0090] When the chip selection signal is a bidirectional switching chip selection signal, the single chip microcomputer reads the first storage chip;

[0091] The first configuration information of the main control device stored in the first storage chip is obtained, and the single chip microcomputer is preloaded according to the obtained first configuration information, and a first loading signal is generated and sent to the first storage chip.

[0092] In this embodiment, through the control of the chip select signal, the single chip microcomputer selects to read the first storage chip or the second storage chip, so that different storage chips can be selected to read as needed, thereby flexibly obtaining the corresponding configuration information. By reading the configuration information in the storage chip, the single chip microcomputer can obtain the first configuration information or the second configuration information of the main control device. Then, the single chip microcomputer performs preloading according to the acquired configuration information, generates a corresponding loading signal, and sends it to the corresponding storage chip. In this way, the corresponding configuration information can be loaded in advance during the startup or switching process of the single chip microcomputer, reducing the startup or switching time and improving the response speed and efficiency of the single chip microcomputer. By judging the type of the chip select signal, the single chip microcomputer can support unidirectional switching and bidirectional switching. When the chip select signal is a unidirectional switching chip select signal, the single chip microcomputer reads the configuration information in the second storage chip and preloads it. When the chip select signal is a bidirectional switching chip select signal, the single chip microcomputer reads the configuration information in the first storage chip and preloads it. In this way, according to different switching requirements, the corresponding storage chip and configuration information can be flexibly selected to be read. Thereby, various combinations of the two requirements of secure one-way transmission and two-way transmission can be met at the same time; and flexible configuration can be performed to realize time-sharing one-way transmission and two-way transmission, and improve the overall flexibility.

[0093] In one embodiment, the transmission firmware includes a bidirectional transmission firmware set in the first storage chip and a unidirectional transmission firmware set in the second storage chip. According to the preloaded configuration information, the single chip microcomputer reloads the transmission firmware through the storage chip to construct a corresponding transmission mode, including:

[0094] When the second storage chip receives the second loading signal, the second loading signal is verified. When the verification is passed, the single-chip microcomputer loads the unidirectional transmission firmware through the second storage chip, and the main control device controls the unidirectional transmission firmware through the single-chip microcomputer to establish a unidirectional transmission mode;

[0095] When the first storage chip receives the first loading signal, it verifies the first loading signal. When the verification is successful, the single chip microcomputer loads the bidirectional transmission firmware through the first storage chip, and the main control device controls the bidirectional transmission firmware through the single chip microcomputer to establish a bidirectional transmission mode.

[0096] In this embodiment, when the storage chip receives the loading signal, the single-chip microcomputer verifies the validity and legality of the loading signal to prevent illegal or erroneous transmission firmware from being loaded, ensure the correctness of the loaded transmission firmware and transmission mode, and improve the security and stability of the system. When the second storage chip receives the second loading signal that has been verified, the single-chip microcomputer loads the unidirectional transmission firmware through the second storage chip, and the main control device controls the unidirectional transmission firmware through the single-chip microcomputer to build a corresponding unidirectional transmission mode to achieve the unidirectional data transmission requirements of the main control device, while ensuring the security and reliability of the data. When the first storage chip receives the first loading signal that has been verified, the single-chip microcomputer loads the bidirectional transmission firmware through the first storage chip, and the main control device controls the bidirectional transmission firmware through the single-chip microcomputer to build a corresponding bidirectional transmission mode to achieve the bidirectional data transmission requirements of the main control device, and supports bidirectional communication and interaction of data. By constructing different transmission modes, various combinations of unidirectional transmission and bidirectional transmission requirements can be met at the same time, and unidirectional transmission or bidirectional transmission requirements can also be met separately, making the application more flexible, thereby reducing the manufacturer's stocking costs and hardware research and development production costs.

[0097] The present invention also provides a reconfigurable secure transmission device, comprising:

[0098] Memory, used to store programs;

[0099] The processor is used to execute the program to implement each step of any one of the above-mentioned reconfigurable secure transmission methods.

[0100] In this embodiment, the processor and the memory may be connected via a bus or other means. The memory may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk, or a solid-state drive. The processor may be a general-purpose processor, such as a central processing unit, a digital signal processor, an application-specific integrated circuit, or one or more integrated circuits configured to implement the embodiments of the present invention.

[0101] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A reconfigurable secure transmission method, characterized in that: include: The main control device obtains the switching signal through the serial interface, processes the switching signal, obtains the control instruction, and sends the control instruction; The single chip microcomputer receives the control instruction sent by the main control device; Process the received control instructions to obtain a chip select signal; Reading the corresponding memory chip according to the chip selection signal, obtaining the configuration information of the master control device stored in the memory chip, and preloading the obtained configuration information, restarting the single chip computer, and resetting the running state; After restarting, the transmission firmware set in the storage chip is reloaded through the storage chip according to the preloaded configuration information, a corresponding transmission mode is constructed and switched to the corresponding transmission mode; Before the step of obtaining the switching signal through the serial interface based on the master control device, the method includes: The host computer is connected to the main control device through a serial interface, and the main control device is connected to the single-chip microcomputer through a communication protocol, and controls the single-chip microcomputer to load a preset transmission firmware and run a preset transmission mode; The switching signal includes a unidirectional switching signal and a bidirectional switching signal. The master control device obtains the switching signal through a serial interface and processes the switching signal to obtain a control instruction, including: When the host computer switches the transmission mode and sends a switching signal, the main control device receives the switching signal through the serial interface, and the main control device detects the type of the switching signal; When the switching signal is the unidirectional switching signal, the main control device configures the corresponding status register according to the unidirectional switching signal and obtains a unidirectional switching control instruction; When the switching signal is the unidirectional switching signal, the main control device configures the corresponding status register according to the bidirectional switching signal and obtains a bidirectional switching control instruction; The step of processing the received control instruction to obtain a chip select signal includes: When the single-chip microcomputer receives the control instruction sent by the main control device through the communication protocol, the control instruction is parsed to obtain the operation code and operand of the control instruction, the operation code and operand of the control instruction are verified by a preset algorithm to obtain a verification result, and the single-chip microcomputer generates a chip select signal of a corresponding type according to the verification result; The single-chip microcomputer generates a chip select signal of a corresponding type according to the verification result, including: when the control instruction is a unidirectional switching control instruction, the single-chip microcomputer generates a unidirectional switching chip select signal; When the control instruction is a bidirectional switching control instruction, the single chip microcomputer generates a bidirectional switching chip select signal; The operation code and operand of the control instruction are verified by a preset algorithm to obtain a verification result, including: The single-chip microcomputer obtains the meaning of the operation code according to a preset meaning table, and verifies the logical relationship between the operation code and the operand through a preset logical relationship table. When the position of the operand in the logical relationship table is consistent with the position of the meaning of the operation code in the logical relationship table, the logical relationship between the operation code and the operand is established, and the operation code and the operand of the control instruction are verified; When the position of the operand in the logic relationship table is inconsistent with the meaning of the operation code in the logic relationship table, the logic relationship between the operation code and the operand is not established, and the operation code and the operand need to be re-acquired; The transmission firmware includes a bidirectional transmission firmware set in a first storage chip and a unidirectional transmission firmware set in a second storage chip. According to the preloaded configuration information, the single chip microcomputer reloads the transmission firmware through the storage chip to construct a corresponding transmission mode, including: When the second storage chip receives the second loading signal, the second loading signal is verified. When the verification is passed, the single-chip microcomputer loads the unidirectional transmission firmware through the second storage chip, and the main control device controls the unidirectional transmission firmware through the single-chip microcomputer to establish a unidirectional transmission mode; When the first storage chip receives the first loading signal, the first loading signal is verified. When the verification is passed, the microcontroller loads the bidirectional transmission firmware through the first storage chip, and the main control device controls the bidirectional transmission firmware through the microcontroller to establish a bidirectional transmission mode.

2. The reconfigurable secure transmission method according to claim 1, characterized in that: The main control device receives the switching signal through a serial interface, and the main control device detects the type of the switching signal, including: The switching signal is converted into serial data through the serial interface and transmitted to the master control device. After the master control device receives the serial data, the receiving buffer of the master control device is detected through the polling mechanism of the master control device. When it is detected that the receiving buffer is carrying out a program flow, an interrupt operation is performed on the ongoing program flow through the interrupt mechanism of the master control device, and the master control device stores the serial data in the receiving buffer; Based on a preset serial data conversion table, the master control device converts the serial data stored in the receiving buffer to obtain the switching signal, and the master control device parses the switching signal to obtain parsed data. The master control device identifies the parsed data by combining a preset data format and a preset numerical range to obtain a specific type of the switching signal.

3. The reconfigurable secure transmission method according to claim 2, characterized in that: The master control device stores the serial data in a receiving buffer, including: The check value of the serial data is obtained through the serial interface, and the main control device divides the received serial data into various field parameters according to a predetermined rule, calculates the field parameters, and obtains a calculated value; The master control device compares the calculated value with the check value, and when the calculated value is consistent with the check value, stores the various field parameters of the serial data in a receiving buffer; when the calculated value is inconsistent with the check value, the master control device executes error handling measures, including re-requesting data, discarding erroneous data and sending error notifications.

4. The reconfigurable secure transmission method according to claim 1, characterized in that: The storage chip includes a first storage chip and a second storage chip, and the corresponding storage chip is read according to the chip selection signal to obtain the configuration information of the main control device stored in the storage chip, and the obtained configuration information is preloaded, including: When the chip select signal is a unidirectional switching chip select signal, the single chip microcomputer reads the second storage chip; Acquire the second configuration information of the master control device stored in the second storage chip, the single chip microcomputer performs preloading according to the acquired second configuration information, generates a second loading signal and sends it to the second storage chip; When the chip select signal is a bidirectional switching chip select signal, the single chip microcomputer reads the first storage chip; The first configuration information of the main control device stored in the first storage chip is obtained, the single chip microcomputer is preloaded according to the obtained first configuration information, and a first loading signal is generated and sent to the first storage chip.

5. A reconfigurable secure transmission device, characterized in that: include: Memory, used to store programs; A processor is used to execute the program to implement each step of the reconfigurable secure transmission method as described in any one of claims 1 to 4.