技术领域technical field
本发明属于信息管理领域,尤其涉及一种调试信息处理方法及系统。The invention belongs to the field of information management, in particular to a debugging information processing method and system.
背景技术Background technique
浪潮K-UX操作系统是中国首款自主研发的,国内唯一通过国家信息安全等级保护三级标准认证的主机操作系统,实现了关键主机应用操作系统级安全可控,承载着金融、电信、能源、政府等关键行业的核心业务。Inspur K-UX operating system is the first self-developed host operating system in China, and the only domestic host operating system that has passed the national information security level protection three-level certification. , government and other key industries’ core business.
在操作系统开发阶段,启动过程的调试是必不可少的环节,目前,常用的K-UX操作系统内核调试的方法是将调试数据输出到串口后进行打印,根据打印信息确定问题的根源:具体实现方法是printk函数将数据输出到临时缓冲区里,在硬件平台初始化阶段完成之后,缓冲区里的数据才会输出到串口上。In the operating system development stage, the debugging of the startup process is an indispensable link. At present, the commonly used method for debugging the K-UX operating system kernel is to output the debugging data to the serial port and print it, and determine the root of the problem according to the printed information: specific The implementation method is that the printk function outputs the data to the temporary buffer, and the data in the buffer will be output to the serial port only after the hardware platform initialization phase is completed.
如果在硬件平台串口初始化好之前出现异常,临时缓冲区中的数据就无法输出到串口上,更无法进行打印,这会给定位问题带来困难。If an exception occurs before the hardware platform serial port is initialized, the data in the temporary buffer cannot be output to the serial port, let alone printed, which will bring difficulties to the positioning problem.
发明内容Contents of the invention
本发明提供一种调试信息处理方法及系统,以解决上述问题。The present invention provides a debugging information processing method and system to solve the above problems.
本发明提供一种调试信息处理方法,上述方法包括以下步骤:The present invention provides a method for processing debugging information. The method includes the following steps:
调试信息管理模块将获取的调试信息分别发送至输出打印模块、调试信息比对模块;The debug information management module sends the acquired debug information to the output printing module and the debug information comparison module respectively;
所述调试信息比对模块接收到调试信息后,从所述输出打印模块获取所述输出打印模块接收的调试信息并进行比对,若不一致,则向所述调试信息管理模块发送报警信息;After the debugging information comparison module receives the debugging information, it obtains the debugging information received by the output printing module from the output printing module and compares them, and if inconsistent, sends an alarm message to the debugging information management module;
所述调试信息管理模块接收所述报警信息后,按照预设算法选择策略,选择对应的算法对所述调试信息进行加密并将加密后的调试信息发送至所述输出打印模块。After receiving the alarm information, the debugging information management module selects a corresponding algorithm according to a preset algorithm selection strategy to encrypt the debugging information and sends the encrypted debugging information to the output printing module.
本发明还提供了一种调试信息处理系统,包括调试信息管理模块、输出打印模块、调试信息比对模块;其中,所述调试信息管理模块分别与所述输出打印模块、所述调试信息比对模块相连;所述调试信息比对模块与所述输出打印模块相连;The present invention also provides a debugging information processing system, including a debugging information management module, an output printing module, and a debugging information comparison module; wherein, the debugging information management module is compared with the output printing module and the debugging information respectively The modules are connected; the debugging information comparison module is connected with the output printing module;
调试信息管理模块,用于将获取的调试信息分别发送至所述输出打印模块、所述调试信息比对模块;A debugging information management module, configured to send the acquired debugging information to the output printing module and the debugging information comparison module respectively;
所述调试信息比对模块,用于接收到调试信息后,从所述输出打印模块获取所述输出打印模块接收的调试信息并进行比对,若不一致,则向所述调试信息管理模块发送报警信息;The debugging information comparison module is used to obtain and compare the debugging information received by the output printing module from the output printing module after receiving the debugging information, and if inconsistent, send an alarm to the debugging information management module information;
所述调试信息管理模块,用于接收所述报警信息后,按照预设算法选择策略,选择对应的算法对所述调试信息进行加密并将加密后的调试信息发送至所述输出打印模块。The debugging information management module is configured to, after receiving the alarm information, select a corresponding algorithm according to a preset algorithm selection strategy to encrypt the debugging information and send the encrypted debugging information to the output printing module.
相较于先前技术,根据本发明提供的一种调试信息处理方法及系统,能够准确、及时的对操作系统存在的问题进行定位的同时,还保证调试数据的安全传输。Compared with the prior art, according to the debugging information processing method and system provided by the present invention, it can accurately and timely locate the problems existing in the operating system, and at the same time ensure the safe transmission of debugging data.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:
图1所示为本发明实施例1的调试信息处理方法流程图;FIG. 1 is a flow chart of a debugging information processing method according to Embodiment 1 of the present invention;
图2所示为本发明实施例2的调试信息处理系统结构图。FIG. 2 is a structural diagram of a debugging information processing system according to Embodiment 2 of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
图1所示为本发明实施例1的调试信息处理方法流程图,包括以下步骤:FIG. 1 is a flow chart of a debugging information processing method according to Embodiment 1 of the present invention, which includes the following steps:
步骤101:调试信息管理模块将获取的调试信息分别发送至输出打印模块、调试信息比对模块;Step 101: The debugging information management module sends the acquired debugging information to the output printing module and the debugging information comparison module respectively;
步骤102:所述调试信息比对模块接收到调试信息后,从所述输出打印模块获取所述输出打印模块接收的调试信息并进行比对,若不一致,则向所述调试信息管理模块发送报警信息;Step 102: After the debugging information comparison module receives the debugging information, it obtains the debugging information received by the output printing module from the output printing module and compares them, and if inconsistent, sends an alarm to the debugging information management module information;
步骤103:所述调试信息管理模块接收所述报警信息后,按照预设算法选择策略,选择对应的算法对所述调试信息进行加密并将加密后的调试信息发送至所述输出打印模块。Step 103: After receiving the alarm information, the debugging information management module selects a corresponding algorithm according to a preset algorithm selection strategy to encrypt the debugging information and sends the encrypted debugging information to the output printing module.
详细而言,本发明具体包括以下步骤:In detail, the present invention specifically comprises the following steps:
步骤1:调试信息管理模块将获取的调试信息分别发送至输出打印模块、调试信息比对模块;Step 1: The debugging information management module sends the acquired debugging information to the output printing module and the debugging information comparison module respectively;
K-UX操作系统内核启动后,硬件平台串口初始化之前,触发调试信息管理模块获取调试信息。After the K-UX operating system kernel is started and before the hardware platform serial port is initialized, the debugging information management module is triggered to obtain debugging information.
步骤2:调试信息比对模块接收到所述调试信息管理模块发送的调试信息后,从所述输出打印模块获取所述输出打印模块接收的调试信息并进行比对,若一致,则向所述输出打印模块发送打印指令,转步骤3;若不一致,则向所述调试信息管理模块发送报警信息,还可以向所述输出打印模块发送禁止打印指令转步骤4;Step 2: After the debugging information comparison module receives the debugging information sent by the debugging information management module, it obtains the debugging information received by the output printing module from the output printing module and compares them. The output printing module sends a printing command, and then goes to step 3; if inconsistent, then sends an alarm message to the debugging information management module, and can also send a print prohibition command to the output printing module and go to step 4;
之所以进行调试信息比对,是因为防止调试信息管理模块向输出打印模块发送的调试信息被篡改(例如:病毒对调试信息进行篡改)或者调试数据部分丢失,保证调试数据安全传输。The reason why the debugging information is compared is to prevent the debugging information sent by the debugging information management module to the output printing module from being tampered (for example: a virus tampers with the debugging information) or part of the debugging data is lost, so as to ensure the safe transmission of the debugging data.
步骤3:所述输出打印模块执行所述打印指令,输出打印结果,转步骤6;Step 3: The output printing module executes the printing instruction, outputs the printing result, and turns to step 6;
步骤4:若调试信息比对模块向所述输出打印模块发送禁止打印指令,则所述输出打印模块执行所述调试信息比对模块发送的禁止打印指令后,丢弃接收的调试信息;Step 4: If the debugging information comparison module sends a print prohibition instruction to the output printing module, the output printing module discards the received debugging information after executing the print prohibition instruction sent by the debugging information comparison module;
所述调试信息管理模块接收所述调试信息比对模块发送的报警信息后,按照预设算法选择策略,选择对应的算法对所述调试信息进行加密并将加密后的调试信息发送至所述输出打印模块;After the debugging information management module receives the alarm information sent by the debugging information comparison module, according to the preset algorithm selection strategy, selects the corresponding algorithm to encrypt the debugging information and sends the encrypted debugging information to the output print module;
预设算法选择策略包括:随机选择算法库中的算法或者在算法库中选择复杂度最高的算法。例如:算法库包括算法1、算法2、算法3;对算法1、算法2、算法3进行随机选择。The preset algorithm selection strategy includes: randomly selecting an algorithm in the algorithm library or selecting the algorithm with the highest complexity in the algorithm library. For example: the algorithm library includes Algorithm 1, Algorithm 2, and Algorithm 3; Algorithm 1, Algorithm 2, and Algorithm 3 are randomly selected.
再例如:算法库包括算法A、算法B、算法C;算法A的复杂度最高、算法B的复杂度为中、算法C的复杂度最低,则选择复杂度最高的算法A。Another example: the algorithm library includes Algorithm A, Algorithm B, and Algorithm C; Algorithm A has the highest complexity, Algorithm B has medium complexity, and Algorithm C has the lowest complexity, then select Algorithm A with the highest complexity.
步骤5:所述输出打印模块对接收到的加密后的调试信息进行解密后,输出打印结果;Step 5: After the output printing module decrypts the received encrypted debugging information, output the printing result;
步骤6:结束。Step 6: End.
图2所示为本发明实施例2的调试信息处理系统结构图,包括调试信息管理模块、输出打印模块、调试信息比对模块;其中,所述调试信息管理模块分别与所述输出打印模块、所述调试信息比对模块相连;所述调试信息比对模块与所述输出打印模块相连;FIG. 2 is a structural diagram of a debugging information processing system according to Embodiment 2 of the present invention, including a debugging information management module, an output printing module, and a debugging information comparison module; wherein, the debugging information management module is respectively connected to the output printing module, The debugging information comparison module is connected; the debugging information comparison module is connected to the output printing module;
调试信息管理模块,用于将获取的调试信息分别发送至所述输出打印模块、所述调试信息比对模块;A debugging information management module, configured to send the acquired debugging information to the output printing module and the debugging information comparison module respectively;
所述调试信息比对模块,用于接收到调试信息后,从所述输出打印模块获取所述输出打印模块接收的调试信息并进行比对,若不一致,则向所述调试信息管理模块发送报警信息;The debugging information comparison module is used to obtain and compare the debugging information received by the output printing module from the output printing module after receiving the debugging information, and if inconsistent, send an alarm to the debugging information management module information;
所述调试信息管理模块,用于接收所述报警信息后,按照预设算法选择策略,选择对应的算法对所述调试信息进行加密并将加密后的调试信息发送至所述输出打印模块。The debugging information management module is configured to, after receiving the alarm information, select a corresponding algorithm according to a preset algorithm selection strategy to encrypt the debugging information and send the encrypted debugging information to the output printing module.
相较于先前技术,根据本发明提供的一种调试信息处理方法及系统,能够准确、及时的对操作系统存在的问题进行定位的同时,还保证调试数据的安全传输。Compared with the prior art, according to the debugging information processing method and system provided by the present invention, it can accurately and timely locate the problems existing in the operating system, and at the same time ensure the safe transmission of debugging data.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN201410664693.4ACN104461872B (en) | 2014-11-19 | 2014-11-19 | A kind of debugging information processing method and system | 
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN201410664693.4ACN104461872B (en) | 2014-11-19 | 2014-11-19 | A kind of debugging information processing method and system | 
| Publication Number | Publication Date | 
|---|---|
| CN104461872A CN104461872A (en) | 2015-03-25 | 
| CN104461872Btrue CN104461872B (en) | 2017-08-25 | 
| Application Number | Title | Priority Date | Filing Date | 
|---|---|---|---|
| CN201410664693.4AActiveCN104461872B (en) | 2014-11-19 | 2014-11-19 | A kind of debugging information processing method and system | 
| Country | Link | 
|---|---|
| CN (1) | CN104461872B (en) | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN106776303A (en)* | 2016-12-02 | 2017-05-31 | 北京奇虎科技有限公司 | The processing method and processing device of Debugging message | 
| CN113407434B (en)* | 2020-03-16 | 2024-06-14 | 腾讯科技(深圳)有限公司 | Method and device for processing debug file | 
| CN112269701A (en)* | 2020-11-11 | 2021-01-26 | 深圳创维-Rgb电子有限公司 | User side debugging method, user side and readable storage medium | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN101067794A (en)* | 2007-06-14 | 2007-11-07 | 中兴通讯股份有限公司 | Multi-core processor and its serial port multiplexing method | 
| CN102289368A (en)* | 2011-06-17 | 2011-12-21 | 中兴通讯股份有限公司 | Method and system for obtaining serial printing information | 
| CN102662844A (en)* | 2012-04-12 | 2012-09-12 | 深圳市共进电子股份有限公司 | Data tracking method at start time of linux inner core | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| JP2012059024A (en)* | 2010-09-09 | 2012-03-22 | Ricoh Co Ltd | Information processor, start-up control method, start-up control program and recording medium | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN101067794A (en)* | 2007-06-14 | 2007-11-07 | 中兴通讯股份有限公司 | Multi-core processor and its serial port multiplexing method | 
| CN102289368A (en)* | 2011-06-17 | 2011-12-21 | 中兴通讯股份有限公司 | Method and system for obtaining serial printing information | 
| CN102662844A (en)* | 2012-04-12 | 2012-09-12 | 深圳市共进电子股份有限公司 | Data tracking method at start time of linux inner core | 
| Publication number | Publication date | 
|---|---|
| CN104461872A (en) | 2015-03-25 | 
| Publication | Publication Date | Title | 
|---|---|---|
| KR102430042B1 (en) | Memory Behavior Encryption | |
| CN104838385B (en) | Device authentication using a physical unclonable function-based key generation system | |
| TWI519990B (en) | Method and apparatus of secure authentication for system-on-chip (soc) | |
| DE102019129622A1 (en) | EXTENDABLE INTEGRITY-PROTECTED CONNECTION FOR SECURE ACCELERATOR COMMUNICATION | |
| TWI428787B (en) | Theft management system and method | |
| US8831221B2 (en) | Unified architecture for crypto functional units | |
| JP2022528070A (en) | Verification of the ID of an emergency vehicle while driving | |
| CN109858265A (en) | A kind of encryption method, device and relevant device | |
| US8621202B2 (en) | Externally managed security and validation processing device | |
| US10146964B1 (en) | Security policy management for a plurality of dies in a system-on-chip | |
| US20180183574A1 (en) | Efficient cryptographically secure control flow integrity protection | |
| CN109948347A (en) | A data storage method and device, server and readable storage medium | |
| CN104461872B (en) | A kind of debugging information processing method and system | |
| CN106301793A (en) | A kind of PLC certification and the method for secure communication | |
| TWI493347B (en) | Authenticatabl drive carrier , authentication method and method for drive carrier authentication | |
| WO2019091071A1 (en) | Railway signal security encryption method and system | |
| Fu et al. | TPM-based remote attestation for Wireless Sensor Networks | |
| CN105162578B (en) | Encrypted circuit applied to nextport universal digital signal processor NextPort | |
| WO2016019670A1 (en) | Anti-attack encryption and decryption method and device of block cipher | |
| US10523418B2 (en) | Providing access to a hardware resource based on a canary value | |
| CN109075974B (en) | Binding authentication method of fingerprint algorithm library and fingerprint sensor and fingerprint identification system | |
| CN105933303B (en) | A kind of detection method and device that file is distorted | |
| CN105610568A (en) | Fault detection method and device for block cipher algorithm | |
| CN107220545A (en) | A kind of hardware encryption system, method and server | |
| CN106203100A (en) | A kind of integrity checking method and device | 
| Date | Code | Title | Description | 
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |