CN118277351A - System log management method and system - Google Patents
System log management method and system Download PDFInfo
- Publication number
- CN118277351A CN118277351A CN202311094223.4A CN202311094223A CN118277351A CN 118277351 A CN118277351 A CN 118277351A CN 202311094223 A CN202311094223 A CN 202311094223A CN 118277351 A CN118277351 A CN 118277351A
- Authority
- CN
- China
- Prior art keywords
- system log
- message
- internet
- things platform
- log message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及汽车及计算机设备等领域,具体涉及系统日志管理方法和系统。The present invention relates to the fields of automobiles and computer equipment, and in particular to a system log management method and system.
背景技术Background technique
系统日志是记录计算设备的系统(例如,BIOS(基本输入输出系统))中硬件、软件和系统问题的信息,同时还可以用于监控系统中发生的事件。用户可以通过它来检查错误发生的原因,或者寻找系统受到攻击时攻击者留下的痕迹,因此需要对系统日志进行管理。System logs record information about hardware, software, and system problems in the computing device's system (e.g., BIOS (Basic Input Output System)). They can also be used to monitor events that occur in the system. Users can use them to check the cause of an error or find traces left by an attacker when the system is attacked, so system logs need to be managed.
一种管理系统日志的方法是:计算设备开机时,先初始化网卡,使网卡发送数据的功能可用;在网卡初始化成功之前,根据主板上硬件设备的状态以及操作,生成早期BIOS日志;在网卡初始化成功之后,根据主板上硬件设备的状态以及操作,生成后期BIOS日志;把该早期BIOS日志和后期BIOS日志传输给网卡;通过网卡向给定的IPV4地址发送上述日志。通过网络将BIOS日志信息发送至指定IPV4地址的网络服务器中,不依靠外部的嵌入式芯片支持就能通过互联网在另一计算机上直接远程查看BIOS日志。A method for managing system logs is as follows: when a computing device is turned on, a network card is first initialized to enable the function of the network card to send data; before the network card is successfully initialized, an early BIOS log is generated according to the status and operation of the hardware device on the motherboard; after the network card is successfully initialized, a later BIOS log is generated according to the status and operation of the hardware device on the motherboard; the early BIOS log and the later BIOS log are transmitted to the network card; and the above logs are sent to a given IPv4 address through the network card. The BIOS log information is sent to a network server at a specified IPv4 address through the network, and the BIOS log can be directly viewed remotely on another computer through the Internet without relying on external embedded chip support.
上述方法能够顺利实行的前提是内部网卡要能正常初始化、稳定工作,当内部网卡初始化失败,出现异常的情况下就无法正常工作,稳定性不够高。另外,上述方法是将BIOS日志上传到指定IPV4地址的网络服务器中,用户(例如,研发工程师)需要到指定的服务器才能查阅BIOS日志,分析日志问题。如果用户需要查看BIOS日志,还需要到指定的服务器手动拷贝或转发,操作比较繁琐。The premise for the above method to be successfully implemented is that the internal network card can be initialized normally and work stably. When the internal network card fails to initialize, it cannot work normally under abnormal conditions, and the stability is not high enough. In addition, the above method is to upload the BIOS log to a network server with a specified IPV4 address. Users (for example, R&D engineers) need to go to the specified server to view the BIOS log and analyze the log problem. If the user needs to view the BIOS log, he needs to manually copy or forward it to the specified server, which is cumbersome.
因此,需要一种新型的系统日志管理方法和系统,以解决上述技术问题。Therefore, a new system log management method and system are needed to solve the above technical problems.
发明内容Summary of the invention
在发明内容部分中引入了一系列简化形式的概念,这将在具体实施方式部分中进一步详细说明。本发明的发明内容部分并不意味着要试图限定出所要求保护的技术方案的关键特征和必要技术特征,更不意味着试图确定所要求保护的技术方案的保护范围。A series of simplified concepts are introduced in the Summary of the Invention, which will be further described in detail in the Detailed Description of the Invention. The Summary of the Invention does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the scope of protection of the claimed technical solution.
针对目前存在的问题,本发明的一方面提供了一种系统日志管理方法,所述方法包括:获取包含系统日志的系统日志消息,以及将所述系统日志消息传送至物联网平台,其中所述系统日志消息从所述物联网平台被转发至客户端设备以进行处理,得到所述系统日志消息中的系统日志,其中所述系统日志被上传至所述物联网平台以进行存储。In response to the current problems, one aspect of the present invention provides a system log management method, the method comprising: obtaining a system log message containing a system log, and transmitting the system log message to an Internet of Things platform, wherein the system log message is forwarded from the Internet of Things platform to a client device for processing, and the system log in the system log message is obtained, wherein the system log is uploaded to the Internet of Things platform for storage.
在一个实施例中,其中将所述系统日志消息传送至物联网平台,包括:将所述系统日志消息传送至无线通信模块;以及经由所述无线通信模块将所述系统日志消息传送至所述物联网平台。In one embodiment, transmitting the system log message to the Internet of Things platform includes: transmitting the system log message to a wireless communication module; and transmitting the system log message to the Internet of Things platform via the wireless communication module.
在一个实施例中,其中将所述系统日志消息传送至无线通信模块,包括:将所述系统日志消息传送至微控制器;以及经由所述微控制器将所述系统日志消息传送至所述无线通信模块。In one embodiment, transmitting the system log message to the wireless communication module comprises: transmitting the system log message to a microcontroller; and transmitting the system log message to the wireless communication module via the microcontroller.
在一个实施例中,所述方法还包括:所述无线通信模块在接收到所述系统日志消息后,对所述系统日志消息进行校验,将通过校验的系统日志消息传送至所述物联网平台。In one embodiment, the method further includes: after receiving the system log message, the wireless communication module verifies the system log message, and transmits the verified system log message to the Internet of Things platform.
在一个实施例中,其中所述系统日志消息从所述物联网平台被转发至客户端设备以进行处理包括:根据预先设置的过滤条件对所述系统日志消息进行过滤,得到经过滤的系统日志消息;以及对所述经过滤的所述系统日志消息进行日志提取,得到所述系统日志。In one embodiment, the system log message is forwarded from the Internet of Things platform to the client device for processing, including: filtering the system log message according to a preset filtering condition to obtain a filtered system log message; and performing log extraction on the filtered system log message to obtain the system log.
在一个实施例中,其中所述过滤条件包括所述系统日志消息是否是所述无线通信模块发送的、所述系统日志中是否包含乱码中的一者或两者。In one embodiment, the filtering condition includes one or both of whether the system log message is sent by the wireless communication module and whether the system log contains garbled characters.
在一个实施例中,其中对所述经过滤的所述系统日志消息进行日志提取,包括:截取所述系统日志消息中的仅包含所述系统日志而不包含冗余信息的一段,以提取所述系统日志。In one embodiment, performing log extraction on the filtered system log message includes: intercepting a section of the system log message that only contains the system log but does not contain redundant information, so as to extract the system log.
在一个实施例中,其中所述冗余信息包括系统日志的生成时间、日期、校验码中的一个或更多个。In one embodiment, the redundant information includes one or more of the generation time, date, and checksum of the system log.
在一个实施例中,所述方法还包括:利用所述客户端设备订阅系统日志消息的主题,并对所订阅主题的所述系统日志进行管理。In one embodiment, the method further includes: using the client device to subscribe to a topic of a system log message, and managing the system log of the subscribed topic.
在一个实施例中,其中所述管理包括:通过所述客户端设备的管理界面创建文件夹,以将所订阅主题的所述系统日志本地保存在所创建的文件夹中;通过所述管理界面预览保存在所创建的文件夹中的所述系统日志,以确定所述系统日志是否存在错误;在所述系统日志不存在错误时,通过所述管理界面将所述系统日志上传至所述物联网平台以进行存储;以及在所述系统日志存在错误时,通过所述管理界面清空本地保存的所述系统日志。In one embodiment, the management includes: creating a folder through the management interface of the client device to locally save the system log of the subscribed topic in the created folder; previewing the system log saved in the created folder through the management interface to determine whether there is an error in the system log; when there is no error in the system log, uploading the system log to the Internet of Things platform for storage through the management interface; and when there is an error in the system log, clearing the locally saved system log through the management interface.
在一个实施例中,其中所述管理还包括:通过所述客户端设备的查询界面查询保存在所述物联网平台上的所述系统日志;以及通过所述查询界面选择并下载所需的系统日志。In one embodiment, the management further includes: querying the system log stored on the Internet of Things platform through a query interface of the client device; and selecting and downloading the required system log through the query interface.
本发明的另一方面提供了一种系统日志管理方法,所述方法包括:从物联网平台接收包含系统日志的系统日志消息,其中所述系统日志消息是所述物联网平台从计算设备接收的;对所述系统日志消息进行处理,得到所述系统日志消息中的系统日志;以及将所述系统日志上传至所述物联网平台以进行存储。Another aspect of the present invention provides a system log management method, which includes: receiving a system log message containing a system log from an Internet of Things platform, wherein the system log message is received by the Internet of Things platform from a computing device; processing the system log message to obtain the system log in the system log message; and uploading the system log to the Internet of Things platform for storage.
在一个实施例中,其中所述对所述系统日志消息进行处理包括:对所述系统日志消息进行过滤,得到经过滤的系统日志消息;以及对所述经过滤的所述系统日志消息进行日志提取,得到所述系统日志。In one embodiment, the processing of the system log message includes: filtering the system log message to obtain filtered system log messages; and extracting logs from the filtered system log messages to obtain the system log.
在一个实施例中,所述方法还包括:订阅所述系统日志消息的主题,并对所订阅主题的所述系统日志进行管理。In one embodiment, the method further includes: subscribing to a topic of the system log message, and managing the system log of the subscribed topic.
在一个实施例中,其中所述管理包括:通过管理界面创建文件夹,以将所订阅主题的所述系统日志本地保存在所创建的文件夹中;通过所述管理界面预览保存在所创建的文件夹中的所述系统日志,以确定所述系统日志是否存在错误;在所述系统日志不存在错误时,通过所述管理界面将所述系统日志上传至所述物联网平台以进行存储;在所述系统日志存在错误时,通过所述管理界面清空本地保存的所述系统日志。In one embodiment, the management includes: creating a folder through a management interface to locally save the system log of the subscribed topic in the created folder; previewing the system log saved in the created folder through the management interface to determine whether there is an error in the system log; when there is no error in the system log, uploading the system log to the Internet of Things platform for storage through the management interface; when there is an error in the system log, clearing the locally saved system log through the management interface.
在一个实施例中,其中所述管理还包括:通过查询界面查询保存在所述物联网平台上的所述系统日志;以及通过所述查询界面选择并下载所需的系统日志。In one embodiment, the management further includes: querying the system log stored on the Internet of Things platform through a query interface; and selecting and downloading the required system log through the query interface.
本发明的又一方面提供了一种系统日志管理系统,所述系统包括:计算设备,所述计算设备生成包含系统日志的系统日志消息,并发送所述系统日志消息;物联网平台,所述物联网平台从所述计算设备接收所述系统日志消息,并转发所述系统日志消息;客户端设备,所述客户端设备接收从所述物联网平台转发的所述系统日志消息,并对所述系统日志消息进行处理,得到所述系统日志消息中的系统日志,以及将所述系统日志上传至所述物联网平台以进行存储。Another aspect of the present invention provides a system log management system, which includes: a computing device, which generates a system log message containing a system log and sends the system log message; an Internet of Things platform, which receives the system log message from the computing device and forwards the system log message; a client device, which receives the system log message forwarded from the Internet of Things platform, processes the system log message to obtain the system log in the system log message, and uploads the system log to the Internet of Things platform for storage.
在一个实施例中,其中所述对所述系统日志消息进行处理包括:对所述系统日志消息进行过滤,得到经过滤的系统日志消息;以及对所述经过滤的所述系统日志消息进行日志提取,得到所述系统日志。In one embodiment, the processing of the system log message includes: filtering the system log message to obtain filtered system log messages; and extracting logs from the filtered system log messages to obtain the system log.
在一个实施例中,其中所述系统日志能够利用所述客户端设备进行管理。In one embodiment, the system log can be managed using the client device.
在一个实施例中,其中所述管理包括:通过所述客户端设备的管理界面创建文件夹,以将所订阅主题的所述系统日志本地保存在所创建的文件夹中;通过所述管理界面预览保存在所创建的文件夹中的所述系统日志,以确定所述系统日志是否存在错误;在所述系统日志不存在错误时,通过所述管理界面将所述系统日志上传至所述物联网平台以进行存储;以及在所述系统日志存在错误时,通过所述管理界面清空本地保存的所述系统日志。In one embodiment, the management includes: creating a folder through the management interface of the client device to locally save the system log of the subscribed topic in the created folder; previewing the system log saved in the created folder through the management interface to determine whether there is an error in the system log; when there is no error in the system log, uploading the system log to the Internet of Things platform for storage through the management interface; and when there is an error in the system log, clearing the locally saved system log through the management interface.
在一个实施例中,其中所述管理还包括:通过所述客户端设备的查询界面查询保存在所述物联网平台上的所述系统日志;以及通过所述查询界面选择并下载所需的系统日志。In one embodiment, the management further includes: querying the system log stored on the Internet of Things platform through a query interface of the client device; and selecting and downloading the required system log through the query interface.
根据本发明的系统日志管理方法和系统,将计算设备的主板的系统日志上传到物联网平台,使得可以利用客户端设备随时随地来查阅、下载系统日志,无需去现场,不受地点约束,极大地方便了系统日志的管理,也方便研发阶段的问题分析工作。According to the system log management method and system of the present invention, the system log of the mainboard of the computing device is uploaded to the Internet of Things platform, so that the system log can be viewed and downloaded anytime and anywhere using a client device without going to the site and without being restricted by location, which greatly facilitates the management of the system log and also facilitates problem analysis work in the research and development stage.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
通过结合附图对本发明的实施例进行更详细的描述,本发明的上述以及其他目的、特征和优势将变得更加明显。附图用来提供对本发明的实施例的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本申请,并不构成对本发明的限制。在附图中,相同的参考标号通常代表相同部件或步骤。The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present application and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
附图中:In the attached figure:
图1示出了根据本发明的一个实施例的系统日志管理方法的步骤流程图。FIG. 1 shows a flow chart of the steps of a system log management method according to an embodiment of the present invention.
图2示出了根据本发明的一个实施例的客户端设备的示例管理界面的示意图。FIG. 2 is a schematic diagram showing an example management interface of a client device according to an embodiment of the present invention.
图3示出了根据本发明的一个实施例的客户端设备的示例查询界面的示意图。FIG. 3 is a schematic diagram showing an example query interface of a client device according to an embodiment of the present invention.
图4示出了根据本发明的另一实施例的系统日志管理方法的步骤流程图。以及FIG4 shows a flowchart of a system log management method according to another embodiment of the present invention.
图5示出了根据本发明的一个实施例的示例系统日志管理系统的示意性结构框图。FIG. 5 shows a schematic structural block diagram of an example system log management system according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使得本发明的目的、技术方案和优点更为明显,下面将参照附图详细描述根据本发明的示例实施例。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是本发明的全部实施例,应理解,本发明不受这里描述的示例实施例的限制。基于本发明中描述的本发明的实施例,本领域技术人员在没有付出创造性劳动的情况下所得到的所有其他实施例都应落入本发明的保护范围之内。In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.
在下文的描述中,给出了大量具体的细节以便提供对本发明更为彻底的理解。然而,对于本领域技术人员而言显而易见的是,本发明可以无需一个或多个这些细节而得以实施。在其他的例子中,为了避免与本发明发生混淆,对于本领域公知的一些技术特征未进行描述。In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is obvious to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features well known in the art are not described.
应当理解的是,本发明能够以不同形式实施,而不应当解释为局限于这里提出的实施例。相反地,提供这些实施例将使公开彻底和完全,并且将本发明的范围完全地传递给本领域技术人员。在附图中,为了清楚,层和区的尺寸以及相对尺寸可能被夸大。自始至终相同附图标记表示相同的元件。It should be understood that the present invention can be implemented in different forms and should not be construed as being limited to the embodiments presented herein. On the contrary, providing these embodiments will make the disclosure thorough and complete and fully convey the scope of the present invention to those skilled in the art. In the accompanying drawings, the sizes and relative sizes of layers and regions may be exaggerated for clarity. The same reference numerals throughout represent the same elements.
应当明白,当元件或层被称为“在...上”、“与...相邻”、“连接到”或“耦合到”其它元件或层时,其可以直接地在其它元件或层上、与之相邻、连接或耦合到其它元件或层,或者可以存在居间的元件或层。相反,当元件被称为“直接在...上”、“与...直接相邻”、“直接连接到”或“直接耦合到”其它元件或层时,则不存在居间的元件或层。应当明白,尽管可使用术语第一、第二、第三等描述各种元件、部件、区、层和/或部分,这些元件、部件、区、层和/或部分不应当被这些术语限制。这些术语仅仅用来区分一个元件、部件、区、层或部分与另一个元件、部件、区、层或部分。因此,在不脱离本发明教导之下,下面讨论的第一元件、部件、区、层或部分可表示为第二元件、部件、区、层或部分。It should be understood that when an element or layer is referred to as being "on, adjacent to, connected to or coupled to other elements or layers, it may be directly on, adjacent to, connected to or coupled to other elements or layers, or there may be intervening elements or layers. In contrast, when an element is referred to as being "directly on, directly adjacent to, directly connected to or directly coupled to other elements or layers, there may be no intervening elements or layers. It should be understood that, although the terms first, second, third, etc. may be used to describe various elements, components, regions, layers and/or parts, these elements, components, regions, layers and/or parts should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or part from another element, component, region, layer or part. Therefore, without departing from the teachings of the present invention, the first element, component, region, layer or part discussed below may be represented as a second element, component, region, layer or part.
空间关系术语例如“在...下”、“在...下面”、“下面的”、“在...之下”、“在...之上”、“上面的”等,在这里可为了方便描述而被使用从而描述图中所示的一个元件或特征与其它元件或特征的关系。应当明白,除了图中所示的取向以外,空间关系术语意图还包括使用和操作中的器件的不同取向。例如,如果附图中的器件翻转,然后,描述为“在其它元件下面”或“在其之下”或“在其下”元件或特征将取向为在其它元件或特征“上”。因此,示例性术语“在...下面”和“在...下”可包括上和下两个取向。器件可以另外地取向(旋转90度或其它取向)并且在此使用的空间描述语相应地被解释。Spatially relative terms such as "under," "beneath," "below," "under," "above," "above," and the like may be used herein for ease of description to describe the relationship of an element or feature shown in the figures to other elements or features. It should be understood that the spatially relative terms are intended to include different orientations of the device in use and operation in addition to the orientations shown in the figures. For example, if the device in the accompanying drawings is flipped, then the elements or features described as "under other elements" or "under" or "under" will be oriented as "on" the other elements or features. Thus, the exemplary terms "under" and "under" may include both upper and lower orientations. The device may be otherwise oriented (rotated 90 degrees or other orientations) and the spatial descriptors used herein are interpreted accordingly.
在此使用的术语的目的仅在于描述具体实施例并且不作为本发明的限制。在此使用时,单数形式的“一”、“一个”和“所述/该”也意图包括复数形式,除非上下文清楚指出另外的方式。还应明白术语“组成”和/或“包括”,当在该说明书中使用时,确定所述特征、整数、步骤、操作、元件和/或部件的存在,但不排除一个或更多其它的特征、整数、步骤、操作、元件、部件和/或组的存在或添加。在此使用时,术语“和/或”包括相关所列项目的任何及所有组合。The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present invention. When used herein, the singular forms "one", "an" and "said/the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and/or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and/or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and/or groups. When used herein, the term "and/or" includes any and all combinations of the relevant listed items.
为了彻底理解本发明,将在下列的描述中提出详细的步骤以及详细的结构,以便阐释本发明提出的技术方案。本发明的较佳实施例详细描述如下,然而除了这些详细描述外,本发明还可以具有其他实施方式。In order to fully understand the present invention, detailed steps and detailed structures will be presented in the following description to illustrate the technical solution proposed by the present invention. The preferred embodiments of the present invention are described in detail below, but in addition to these detailed descriptions, the present invention may also have other implementations.
下面结合附图,对本发明的一些实施方式的系统日志管理方法和系统作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。The following describes in detail the system log management method and system of some embodiments of the present invention in conjunction with the accompanying drawings. The following embodiments and features in the embodiments may be combined with each other if there is no conflict.
在本发明的一个实施例中,本发明提供一种系统日志管理方法。In one embodiment of the present invention, the present invention provides a system log management method.
参考图1,图1为根据本发明的一个实施例的系统日志管理方法100的步骤流程图。其中,本发明的系统是计算设备的系统。示例性地,本发明的计算设备可以是本领域公知的任何具有计算能力的电子设备,例如桌上型计算机、膝上型计算机、平板电脑、智能眼镜、智能手表、头戴式显示设备(例如,虚拟现实(VR)设备、增强现实(AR)设备、或混合现实设备)等,本发明对此不作限定。示例性地,计算设备可以是生产车间的计算机,例如车辆(例如,汽车)生产车间的计算机。示例性地,本发明的系统可以是计算设备的系统,例如,BIOS(基本输入输出系统)等,本发明对此不作限定。其中,BIOS是计算设备启动时加载的第一个软件,其作用是提供计算设备基本输入输出程序、开机自检程序及系统相关参数。如果计算设备启动过程中出现异常,可以通过分析BIOS日志了解异常出现的原因,因为BIOS日志记录了BIOS执行过程中各程序的运行状态和结果。Referring to FIG. 1 , FIG. 1 is a flow chart of the steps of a system log management method 100 according to an embodiment of the present invention. Among them, the system of the present invention is a system of a computing device. Exemplarily, the computing device of the present invention can be any electronic device with computing capabilities known in the art, such as a desktop computer, a laptop computer, a tablet computer, smart glasses, a smart watch, a head-mounted display device (e.g., a virtual reality (VR) device, an augmented reality (AR) device, or a mixed reality device), etc., and the present invention does not limit this. Exemplarily, the computing device can be a computer in a production workshop, such as a computer in a vehicle (e.g., a car) production workshop. Exemplarily, the system of the present invention can be a system of a computing device, such as a BIOS (basic input and output system), etc., and the present invention does not limit this. Among them, BIOS is the first software loaded when the computing device is started, and its function is to provide the computing device basic input and output program, the power-on self-test program and system-related parameters. If an exception occurs during the startup of the computing device, the cause of the exception can be understood by analyzing the BIOS log, because the BIOS log records the running status and results of each program during the execution of the BIOS.
如图1所示,系统日志管理方法100可以包括如下步骤:As shown in FIG. 1 , the system log management method 100 may include the following steps:
在步骤S110中,获取包含系统日志的系统日志消息。In step S110 , a system log message including a system log is obtained.
在计算设备开机时,计算设备的主板在开机过程中会完成上电自检的工作,CPU首先会执行BIOS代码,对主板的各个设备进行检测及初始化,并输出系统日志,该系统日志以系统日志消息的形式被发送。When a computing device is turned on, the motherboard of the computing device will complete the power-on self-test during the boot process. The CPU will first execute the BIOS code, detect and initialize each device on the motherboard, and output the system log, which is sent in the form of a system log message.
在步骤S120中,将系统日志消息传送至物联网平台,其中该系统日志消息从物联网平台被转发至客户端设备以进行处理,得到该系统日志消息中的系统日志,其中该系统日志被上传至物联网平台以进行存储。In step S120, the system log message is transmitted to the Internet of Things platform, wherein the system log message is forwarded from the Internet of Things platform to the client device for processing, and the system log in the system log message is obtained, wherein the system log is uploaded to the Internet of Things platform for storage.
由于该系统日志消息中可能包含不需要的消息,或者所需要的系统日志消息中可能包含不需要的信息,因此该系统日志消息在被传送至物联网平台后,需要从该物联网平台被转发至客户端设备以进行处理,得到该系统日志消息中的系统日志,然后再将该系统日志上传至物联网平台以进行存储。Since the system log message may contain unnecessary messages, or the required system log message may contain unnecessary information, after the system log message is transmitted to the IoT platform, it needs to be forwarded from the IoT platform to the client device for processing, so as to obtain the system log in the system log message, and then upload the system log to the IoT platform for storage.
在一个实施例中,物联网平台可以为云平台,例如阿里云、腾讯云等,这些云平台具有可用于存储系统日志的存储空间,例如阿里云的OSS(对象存储空间)等。应理解,物联网平台还可以为现在的以及将来的任何合适的物联网平台,本发明对此不作限定。In one embodiment, the IoT platform may be a cloud platform, such as Alibaba Cloud, Tencent Cloud, etc. These cloud platforms have storage space that can be used to store system logs, such as Alibaba Cloud's OSS (object storage space), etc. It should be understood that the IoT platform may also be any suitable IoT platform now or in the future, and the present invention is not limited thereto.
在一个实施例中,客户端设备可以包括但不限于任何一种车载或手持型电子产品(例如智能手机、平板电脑等),其可以包括一个或更多个程序,客户端设备可以通过这些程序中的一个或更多个程序对系统日志消息进行处理。示例性地,所述程序包括例如但不限于:本地运行的应用程序(App)、运行于网络浏览器上的功能(又称为Web App)、嵌入于电子邮件中的小程序、嵌入于即时通信的客户端软件中的小程序,以及嵌入在其他应用程序中的功能(如开发者或商家基于公众平台上申请的应用账号)等。In one embodiment, the client device may include but is not limited to any vehicle-mounted or handheld electronic product (such as a smart phone, a tablet computer, etc.), which may include one or more programs, and the client device may process the system log message through one or more of these programs. Exemplarily, the program includes, for example, but not limited to: a locally running application (App), a function running on a web browser (also known as a Web App), a small program embedded in an email, a small program embedded in an instant messaging client software, and a function embedded in other applications (such as an application account applied for by a developer or merchant on a public platform), etc.
在一个实施例中,小程序可以为任何公知的合适的小程序,例如微信小程序等,本发明对此不作限定。In one embodiment, the mini program may be any known suitable mini program, such as a WeChat mini program, etc., and the present invention is not limited to this.
在一个实施例中,客户端设备可以利用程序(例如小程序)通过订阅系统日志消息的相应主题(例如,MQTT(消息队列遥测传输)主题),来从物联网平台接收系统日志消息。In one embodiment, the client device may receive system log messages from the IoT platform by using a program (eg, a small program) to subscribe to a corresponding topic of the system log message (eg, an MQTT (Message Queue Telemetry Transport) topic).
在一个实施例中,将系统日志消息传送至物联网平台,可以包括如下步骤:将系统日志消息传送至无线通信模块;以及经由该无线通信模块将系统日志消息传送至物联网平台。In one embodiment, transmitting the system log message to the Internet of Things platform may include the following steps: transmitting the system log message to a wireless communication module; and transmitting the system log message to the Internet of Things platform via the wireless communication module.
示例性地,该无线通信模块可以为WiFi模块,还可以为其他内存足够大且支持WiFi接口的模块,本发明对此不作限定。示例性地,WiFi模块可以为ESP WIFI模块等,本发明对此不作限定。Exemplarily, the wireless communication module may be a WiFi module, or other modules with large enough memory and supporting WiFi interface, which is not limited in the present invention. Exemplarily, the WiFi module may be an ESP WIFI module, etc., which is not limited in the present invention.
示例性地,该无线通信模块还可以为移动通信模块,例如3G、4G、5G、6G模块等,本发明对此不作限定。Exemplarily, the wireless communication module may also be a mobile communication module, such as a 3G, 4G, 5G, 6G module, etc., which is not limited in the present invention.
由于系统日志消息通常较大,直接传输给无线通信模块会造成其内存不足,因此,在一个实施例中,将系统日志消息传送至无线通信模块,可以包括如下步骤:将系统日志消息传送至微控制器;以及经由该微控制器将系统日志消息传送至无线通信模块。其中,微控制器可以起到缓存和控制发送的作用。Since the system log message is usually large, directly transmitting it to the wireless communication module will cause insufficient memory. Therefore, in one embodiment, transmitting the system log message to the wireless communication module may include the following steps: transmitting the system log message to a microcontroller; and transmitting the system log message to the wireless communication module via the microcontroller. The microcontroller can play the role of caching and controlling the transmission.
示例性地,该微控制器可以为单片机(例如,STM32单片机等),其与计算设备的主板、无线通信模块(例如,WiFi模块)进行通信,确保系统日志消息传输的稳定性和准确性。应理解,本发明的微控制器还可以为具有缓存和控制发送作用的其他集成电路芯片,本发明对此不作限定。Exemplarily, the microcontroller can be a single-chip microcomputer (e.g., an STM32 single-chip microcomputer, etc.), which communicates with a mainboard and a wireless communication module (e.g., a WiFi module) of a computing device to ensure the stability and accuracy of system log message transmission. It should be understood that the microcontroller of the present invention can also be other integrated circuit chips with cache and control transmission functions, and the present invention is not limited to this.
示例性地,系统日志消息可以通过例如UART(通用异步接收器和发送器)被传输至微控制器。应理解,还可以通过本领域公知的任何其他合适的发送器、收发器等将系统日志消息传输至微控制器,本发明对此不作限定。Exemplarily, the system log message can be transmitted to the microcontroller via, for example, a UART (universal asynchronous receiver and transmitter). It should be understood that the system log message can also be transmitted to the microcontroller via any other suitable transmitter, transceiver, etc. known in the art, and the present invention is not limited to this.
示例性地,系统日志消息可以通过例如UART(通用异步接收器和发送器)从微控制器被传输至无线通信模块。应理解,还可以通过本领域公知的任何其他合适的发送器、收发器等将系统日志消息传输至无线通信模块,本发明对此不作限定。Exemplarily, the system log message can be transmitted from the microcontroller to the wireless communication module via, for example, a UART (universal asynchronous receiver and transmitter). It should be understood that the system log message can also be transmitted to the wireless communication module via any other suitable transmitter, transceiver, etc. known in the art, and the present invention is not limited to this.
示例性地,系统日志消息可以通过例如MQTT(消息队列遥测传输)接口从无线通信模块被传输至物联网平台。应理解,还可以通过本领域公知的任何其他合适的通信接口将系统日志消息传输至物联网平台,本发明对此不作限定。Exemplarily, the system log message can be transmitted from the wireless communication module to the Internet of Things platform via, for example, an MQTT (Message Queue Telemetry Transport) interface. It should be understood that the system log message can also be transmitted to the Internet of Things platform via any other suitable communication interface known in the art, and the present invention is not limited to this.
在一个实施例中,方法100还可以包括:该无线通信模块在接收到系统日志消息后,对该系统日志消息进行校验以确定数据是否出错,并向微控制器发送反馈数据,以反馈系统日志消息是否准确发送。若校验通过,则无线通信模块将通过校验的系统日志消息传送至物联网平台;若校验失败,则微控制器根据不同的反馈进行系统日志消息重发或发送下一段系统日志消息。In one embodiment, the method 100 may further include: after receiving the system log message, the wireless communication module verifies the system log message to determine whether the data is wrong, and sends feedback data to the microcontroller to feedback whether the system log message is accurately sent. If the verification is passed, the wireless communication module transmits the verified system log message to the Internet of Things platform; if the verification fails, the microcontroller resends the system log message or sends the next system log message according to different feedback.
示例性地,可以采用本领域公知的任何合适的校验码对该系统日志消息进行校验,例如奇偶校验码、CRC16校验码等,本发明对此不作限定。Exemplarily, the system log message may be verified by using any suitable verification code known in the art, such as a parity verification code, a CRC16 verification code, etc., which is not limited in the present invention.
在一个实施例中,方法100还可以包括:在物联网平台接收到系统日志消息后,该无线通信模块接收来自物联网平台的反馈数据,判断系统日志消息是否准确上传至物联网平台,并根据不同的反馈进行系统日志消息重发或发送下一段系统日志消息。In one embodiment, method 100 may further include: after the Internet of Things platform receives the system log message, the wireless communication module receives feedback data from the Internet of Things platform, determines whether the system log message is accurately uploaded to the Internet of Things platform, and resends the system log message or sends the next system log message according to different feedback.
在一个实施例中,物联网平台可以利用MQTT(消息队列遥测传输)接口来接收来自无线通信模块的系统日志消息。In one embodiment, the IoT platform may utilize an MQTT (Message Queuing Telemetry Transport) interface to receive system log messages from the wireless communication module.
在一个实施例中,客户端设备对系统日志消息进行处理可以包括如下步骤:In one embodiment, the client device may process the system log message by the following steps:
对该系统日志消息进行过滤,得到经过滤的系统日志消息;以及filtering the system log message to obtain a filtered system log message; and
对经过滤的系统日志消息进行日志提取,得到系统日志消息中的系统日志。Log extraction is performed on the filtered system log message to obtain the system log in the system log message.
示例性地,可以根据预先设置的过滤条件对系统日志消息进行过滤。示例性地,过滤条件可以包括该系统日志消息是否是无线通信模块发送过来的、日志数据中是否包含乱码等,本发明对此不作限定。Exemplarily, the system log message can be filtered according to the preset filtering conditions. Exemplarily, the filtering conditions can include whether the system log message is sent by the wireless communication module, whether the log data contains garbled characters, etc., which is not limited in the present invention.
由于系统日志消息除了系统日志外,还包括日志生成时间、日期、校验码等冗余信息(例如,系统日志的生成时间、日期、校验码等),用户不方便查看,因此可以去除掉系统日志消息中的这些冗余信息以进行存储。因此,在对系统日志消息进行过滤后,可以对经过滤的系统日志消息进行日志提取,截取系统日志消息中仅包含系统日志而不包含系统日志的生成时间、日期、校验码等冗余信息的一段,保存为文档(例如,文本文档),从而得到系统日志。Since the system log message includes redundant information such as log generation time, date, check code, etc. (for example, the generation time, date, check code, etc. of the system log) in addition to the system log, it is inconvenient for users to view, so these redundant information in the system log message can be removed for storage. Therefore, after filtering the system log message, the filtered system log message can be subjected to log extraction, and a section of the system log message that only contains the system log but does not contain redundant information such as the generation time, date, check code, etc. of the system log is intercepted and saved as a document (for example, a text document), thereby obtaining the system log.
在一个实施例中,该系统日志被存储在物联网平台的存储空间中,例如OSS中。In one embodiment, the system log is stored in a storage space of the IoT platform, such as OSS.
在一个实施例中,客户端设备可以利用MQTT(消息队列遥测传输)接口将系统日志上传至物联网平台以进行存储。In one embodiment, the client device can upload the system log to the IoT platform for storage using the MQTT (Message Queue Telemetry Transport) interface.
在一个实施例中,系统日志管理方法100还可以包括:利用客户端设备订阅系统日志消息的主题(例如,MQTT主题),并对所订阅主题的系统日志进行管理。In one embodiment, the system log management method 100 may further include: using a client device to subscribe to a topic (eg, an MQTT topic) of a system log message, and managing the system log of the subscribed topic.
参考图2,图2示出了根据本发明的一个实施例的客户端设备的示例管理界面(在图2下方以“文件管理”字样示出)的示意图。如图2所示,可以通过该管理界面可以创建文件、预览文件、上传文件、清空文件等。Referring to Figure 2, Figure 2 shows a schematic diagram of an example management interface of a client device according to an embodiment of the present invention (shown as "File Management" below Figure 2). As shown in Figure 2, files can be created, files can be previewed, files can be uploaded, files can be cleared, etc. through the management interface.
具体地,在进入管理界面后,可以点击管理界面上的“创建文件”按钮,以创建文件,例如可以输入自定义的文件名、保存原因等信息,并将所提取的所订阅主题的系统日志本地保存在所创建的文件中。Specifically, after entering the management interface, you can click the "Create File" button on the management interface to create a file. For example, you can enter a custom file name, saving reason and other information, and save the extracted system log of the subscribed topic locally in the created file.
此外,在创建并保存了系统日志后,在将其上传至物联网平台之前,可以点击管理界面上的“预览文件”按钮,以预览保存在所创建的文件中的系统日志,以便确定该系统日志是否存在错误,例如系统日志是否保存成功、所保存的系统日志是否存在乱码等错误等。In addition, after creating and saving the system log, before uploading it to the IoT platform, you can click the "Preview File" button on the management interface to preview the system log saved in the created file to determine whether there are any errors in the system log, such as whether the system log is saved successfully, whether the saved system log contains garbled characters and other errors, etc.
在所保存的系统日志不存在错误时,可点击管理界面上的“上传文件”按钮,以将该系统日志上传至物联网平台以进行存储。When there are no errors in the saved system log, you can click the "Upload File" button on the management interface to upload the system log to the IoT platform for storage.
在所保存的系统日志存在错误时,可点击管理界面上的“清空文件”按钮,以清空本地保存的该系统日志。在清空该系统日志后,如仍需存储系统日志,可重新启动计算设备以重新生成系统日志,从而存储重新生成的系统日志。When there are errors in the saved system log, you can click the "Clear File" button on the management interface to clear the locally saved system log. After clearing the system log, if you still need to store the system log, you can restart the computing device to regenerate the system log, so as to store the regenerated system log.
在将系统日志存储在物联网平台上后,如果用户需要查阅该系统日志,则可通过客户端设备的查询界面来实现。After the system log is stored on the IoT platform, if the user needs to view the system log, it can be achieved through the query interface of the client device.
参考图3,图3示出了根据本发明的一个实施例的客户端设备的示例查询界面(在图3下方以“云目录”字样示出)的示意图。如图3所示,通过该查询界面可以查询保存在物联网平台的存储空间(例如,OSS)中的系统日志,以及选择需要下载的系统日志并进行下载。Referring to FIG3 , FIG3 shows a schematic diagram of an example query interface (shown as “cloud directory” below FIG3 ) of a client device according to an embodiment of the present invention. As shown in FIG3 , through the query interface, system logs stored in the storage space (e.g., OSS) of the IoT platform can be queried, and system logs to be downloaded can be selected and downloaded.
具体地,当用户想要查阅物联网平台上存储的系统日志时,用户可点击“云目录”按钮,以进入查询界面,在该查询界面上可显示物联网平台上存储的系统日志的文件列表。用户还可以在该查询界面上输入想要查询的系统日志的文件名以选择想要下载的系统日志,并点击“下载文件”按钮,以将所需的系统日志下载到客户端设备本地以进行查阅。Specifically, when a user wants to view the system log stored on the IoT platform, the user can click the "Cloud Directory" button to enter the query interface, which displays a list of system log files stored on the IoT platform. The user can also enter the file name of the system log to be queried on the query interface to select the system log to be downloaded, and click the "Download File" button to download the required system log to the client device for local viewing.
本发明的系统日志管理方法,将计算设备的主板的系统日志上传到物联网平台,使得可以利用客户端设备随时随地来查阅、下载系统日志,无需去现场,不受地点约束,极大地方便了系统日志的管理,也方便研发阶段的问题分析工作。此外,本发明由外部无线通信模块上传数据,不依赖于内部网卡,即使内部网卡初始化失败,也可以将内部网卡相关异常日志上传到物联网平台,稳定性更高。The system log management method of the present invention uploads the system log of the mainboard of the computing device to the Internet of Things platform, so that the system log can be checked and downloaded anytime and anywhere by using the client device, without going to the site and without being restricted by the location, which greatly facilitates the management of the system log and the problem analysis work in the research and development stage. In addition, the present invention uploads data by an external wireless communication module, which does not rely on the internal network card. Even if the internal network card fails to initialize, the abnormal log related to the internal network card can be uploaded to the Internet of Things platform, which has higher stability.
在本发明的另一实施例中,本发明提供一种系统日志管理方法。In another embodiment of the present invention, the present invention provides a system log management method.
参考图4,图4为根据本发明的另一实施例的系统日志管理方法400的步骤流程图。其中,本发明的系统是计算设备的系统。示例性地,本发明的计算设备可以是本领域公知的任何具有计算能力的电子设备,例如桌上型计算机、膝上型计算机、平板电脑、智能眼镜、智能手表、头戴式显示设备(例如,虚拟现实(VR)设备、增强现实(AR)设备、或混合现实设备)等,本发明对此不作限定。示例性地,计算设备可以是生产车间的计算机,例如车辆(例如,汽车)生产车间的计算机。示例性地,本发明的系统可以是计算设备的系统,例如,BIOS(基本输入输出系统)等,本发明对此不作限定。其中,BIOS是计算设备启动时加载的第一个软件,其作用是提供计算设备基本输入输出程序、开机自检程序及系统相关参数。如果计算设备启动过程中出现异常,可以通过分析BIOS日志了解异常出现的原因,因为BIOS日志记录了BIOS执行过程中各程序的运行状态和结果。Referring to FIG. 4, FIG. 4 is a flow chart of the steps of a system log management method 400 according to another embodiment of the present invention. Among them, the system of the present invention is a system of a computing device. Exemplarily, the computing device of the present invention can be any electronic device with computing capabilities known in the art, such as a desktop computer, a laptop computer, a tablet computer, smart glasses, a smart watch, a head-mounted display device (e.g., a virtual reality (VR) device, an augmented reality (AR) device, or a mixed reality device), etc., and the present invention does not limit this. Exemplarily, the computing device can be a computer in a production workshop, such as a computer in a vehicle (e.g., a car) production workshop. Exemplarily, the system of the present invention can be a system of a computing device, such as a BIOS (basic input and output system), etc., and the present invention does not limit this. Among them, BIOS is the first software loaded when the computing device is started, and its function is to provide the computing device basic input and output program, the power-on self-test program and system-related parameters. If an exception occurs during the startup of the computing device, the cause of the exception can be understood by analyzing the BIOS log, because the BIOS log records the running status and results of each program during the execution of the BIOS.
如图4所示,系统日志管理方法400可以包括如下步骤:As shown in FIG. 4 , the system log management method 400 may include the following steps:
在步骤S410中,从物联网平台接收包含系统日志的系统日志消息,其中该系统日志消息是物联网平台从计算设备接收的。In step S410 , a system log message containing a system log is received from an Internet of Things platform, wherein the system log message is received by the Internet of Things platform from a computing device.
在步骤S420中,对该系统日志消息进行处理,得到该系统日志消息中的系统日志。In step S420, the system log message is processed to obtain the system log in the system log message.
在步骤S430中,将该系统日志上传至物联网平台以进行存储。In step S430, the system log is uploaded to the Internet of Things platform for storage.
在计算设备开机时,计算设备的主板在开机过程中会完成上电自检的工作,CPU首先会执行BIOS代码,对主板的各个设备进行检测及初始化,并输出系统日志,该系统日志以系统日志消息的形式被发送至物联网平台。When a computing device is turned on, the motherboard of the computing device will complete the power-on self-test during the boot process. The CPU will first execute the BIOS code, detect and initialize each device on the motherboard, and output the system log. The system log is sent to the IoT platform in the form of a system log message.
在一个实施例中,物联网平台可以为云平台,例如阿里云、腾讯云等,这些云平台具有可用于存储系统日志的存储空间,例如阿里云的OSS(对象存储空间)等。应理解,物联网平台还可以为现在的以及将来的任何合适的物联网平台,本发明对此不作限定。In one embodiment, the IoT platform may be a cloud platform, such as Alibaba Cloud, Tencent Cloud, etc. These cloud platforms have storage space that can be used to store system logs, such as Alibaba Cloud's OSS (object storage space), etc. It should be understood that the IoT platform may also be any suitable IoT platform now or in the future, and the present invention is not limited thereto.
示例性地,系统日志消息可以通过例如MQTT(消息队列遥测传输)接口从计算设备被传输至物联网平台。应理解,还可以通过本领域公知的任何其他合适的通信接口将系统日志消息传输至物联网平台,本发明对此不作限定。Exemplarily, the system log message can be transmitted from the computing device to the Internet of Things platform via, for example, an MQTT (Message Queue Telemetry Transport) interface. It should be understood that the system log message can also be transmitted to the Internet of Things platform via any other suitable communication interface known in the art, and the present invention is not limited to this.
在一个实施例中,所述处理可以包括如下步骤:In one embodiment, the process may include the following steps:
对该系统日志消息进行过滤,得到经过滤的系统日志消息;以及filtering the system log message to obtain a filtered system log message; and
对经过滤的系统日志消息进行日志提取,得到系统日志消息中的系统日志。Log extraction is performed on the filtered system log message to obtain the system log in the system log message.
示例性地,可以根据预先设置的过滤条件对系统日志消息进行过滤。示例性地,过滤条件可以包括该系统日志消息是否是无线通信模块发送过来的、日志数据中是否包含乱码等,本发明对此不作限定。Exemplarily, the system log message can be filtered according to the preset filtering conditions. Exemplarily, the filtering conditions can include whether the system log message is sent by the wireless communication module, whether the log data contains garbled characters, etc., which is not limited in the present invention.
由于系统日志消息除了系统日志外,还包括日志生成时间、日期、校验码等冗余信息(例如,系统日志的生成时间、日期、校验码等),用户不方便查看,因此可以去除掉系统日志消息中的这些冗余信息以进行存储。因此,在对系统日志消息进行过滤后,可以对经过滤的系统日志消息进行日志提取,截取系统日志消息中仅包含系统日志而不包含系统日志的生成时间、日期、校验码等冗余信息的一段,保存为文档(例如,文本文档),从而得到系统日志。Since the system log message includes redundant information such as log generation time, date, check code, etc. (for example, the generation time, date, check code, etc. of the system log) in addition to the system log, it is inconvenient for users to view, so these redundant information in the system log message can be removed for storage. Therefore, after filtering the system log message, the filtered system log message can be subjected to log extraction, and a section of the system log message that only contains the system log but does not contain redundant information such as the generation time, date, check code, etc. of the system log is intercepted and saved as a document (for example, a text document), thereby obtaining the system log.
在一个实施例中,系统日志管理方法100还可以包括:订阅系统日志消息的主题,并对所订阅主题的系统日志进行管理。示例性地,可以通过订阅系统日志消息的相应主题(例如,MQTT主题)来对系统日志进行管理。In one embodiment, the system log management method 100 may further include: subscribing to a topic of a system log message, and managing the system log of the subscribed topic. Exemplarily, the system log may be managed by subscribing to a corresponding topic (eg, an MQTT topic) of the system log message.
在一个实施例中,所述管理可以包括:利用管理界面对系统日志进行创建、预览、上传、清空等操作中的一个或更多个,本发明对此不作限定。In one embodiment, the management may include: using a management interface to perform one or more operations such as creating, previewing, uploading, and clearing the system log, which is not limited in the present invention.
在一个实施例中,所述管理还可以包括:利用查询界面查询保存在物联网平台的存储空间中的系统日志,以及选择需要下载的系统日志并进行下载。In one embodiment, the management may further include: using a query interface to query system logs stored in a storage space of the Internet of Things platform, and selecting system logs to be downloaded and downloading them.
本发明的系统日志管理方法,将计算设备的主板的系统日志上传到物联网平台,使得可以利用客户端设备随时随地来查阅、下载系统日志,无需去现场,不受地点约束,极大地方便了系统日志的管理,也方便研发阶段的问题分析工作。此外,本发明由外部无线通信模块上传数据,不依赖于内部网卡,即使内部网卡初始化失败,也可以将内部网卡相关异常日志上传到物联网平台,稳定性更高。The system log management method of the present invention uploads the system log of the mainboard of the computing device to the Internet of Things platform, so that the system log can be checked and downloaded anytime and anywhere by using the client device, without going to the site and without being restricted by the location, which greatly facilitates the management of the system log and the problem analysis work in the research and development stage. In addition, the present invention uploads data by an external wireless communication module, which does not rely on the internal network card. Even if the internal network card fails to initialize, the abnormal log related to the internal network card can be uploaded to the Internet of Things platform, which has higher stability.
在本发明的另一实施例中,本发明提供一种系统日志管理系统500。参考图5,图5示出了根据本发明的一个实施例的示例系统日志管理系统500的示意性结构框图。如图5所示,系统日志管理系统500可以包括计算设备510、物联网平台520和客户端设备530。In another embodiment of the present invention, the present invention provides a system log management system 500. Referring to FIG5 , FIG5 shows a schematic structural block diagram of an example system log management system 500 according to an embodiment of the present invention. As shown in FIG5 , the system log management system 500 may include a computing device 510, an Internet of Things platform 520, and a client device 530.
其中,计算设备510可以生成包含系统日志的系统日志消息,并发送该系统日志消息;物联网平台520可以从计算设备510接收系统日志消息,并转发该系统日志消息;客户端设备530可以接收从物联网平台520转发的系统日志消息,并对该系统日志消息进行处理,得到该系统日志消息中的系统日志,以及将该系统日志上传至物联网平台520以进行存储。Among them, the computing device 510 can generate a system log message containing a system log and send the system log message; the Internet of Things platform 520 can receive the system log message from the computing device 510 and forward the system log message; the client device 530 can receive the system log message forwarded from the Internet of Things platform 520, process the system log message, obtain the system log in the system log message, and upload the system log to the Internet of Things platform 520 for storage.
在一个实施例中,计算设备510可以是本领域公知的任何具有计算能力的电子设备,例如桌上型计算机、膝上型计算机、平板电脑、智能眼镜、智能手表、头戴式显示设备(例如,虚拟现实(VR)设备、增强现实(AR)设备、或混合现实设备)等,本发明对此不作限定。示例性地,计算设备可以是生产车间的计算机,例如车辆(例如,汽车)生产车间的计算机。In one embodiment, the computing device 510 may be any electronic device with computing capabilities known in the art, such as a desktop computer, a laptop computer, a tablet computer, smart glasses, a smart watch, a head-mounted display device (e.g., a virtual reality (VR) device, an augmented reality (AR) device, or a mixed reality device), etc., and the present invention is not limited thereto. Exemplarily, the computing device may be a computer in a production workshop, such as a computer in a vehicle (e.g., automobile) production workshop.
示例性地,本发明的系统可以是计算设备510的系统,例如,BIOS(基本输入输出系统)等,本发明对此不作限定。其中,BIOS是计算设备启动时加载的第一个软件,其作用是提供计算设备基本输入输出程序、开机自检程序及系统相关参数。如果计算设备启动过程中出现异常,可以通过分析BIOS日志了解异常出现的原因,因为BIOS日志记录了BIOS执行过程中各程序的运行状态和结果。Exemplarily, the system of the present invention may be a system of a computing device 510, such as a BIOS (Basic Input Output System), etc., which is not limited by the present invention. Among them, the BIOS is the first software loaded when the computing device is started, and its function is to provide the computing device with a basic input and output program, a power-on self-test program, and system-related parameters. If an abnormality occurs during the startup of the computing device, the cause of the abnormality can be understood by analyzing the BIOS log, because the BIOS log records the running status and results of each program during the execution of the BIOS.
在计算设备510开机时,计算设备的主板在开机过程中会完成上电自检的工作,CPU首先会执行BIOS代码,对主板的各个设备进行检测及初始化,并输出系统日志,该系统日志以系统日志消息的形式被发送至物联网平台520。When the computing device 510 is turned on, the motherboard of the computing device will complete the power-on self-test during the boot process. The CPU will first execute the BIOS code, detect and initialize each device on the motherboard, and output the system log. The system log is sent to the Internet of Things platform 520 in the form of a system log message.
在一个实施例中,物联网平台520可以为云平台,例如阿里云、腾讯云等,还可以为现在的以及将来的任何合适的物联网平台,本发明对此不作限定。In one embodiment, the Internet of Things platform 520 may be a cloud platform, such as Alibaba Cloud, Tencent Cloud, etc., or may be any suitable Internet of Things platform now or in the future, which is not limited in the present invention.
在一个实施例中,计算设备510还可以包括无线通信模块。其中,所输出的系统日志消息可以被传送至无线通信模块,经由该无线通信模块将系统日志消息传送至物联网平台。In one embodiment, the computing device 510 may further include a wireless communication module, wherein the outputted system log message may be transmitted to the wireless communication module, and the system log message may be transmitted to the Internet of Things platform via the wireless communication module.
示例性地,该无线通信模块可以为WiFi模块,还可以为其他内存足够大且支持WiFi接口的模块,本发明对此不作限定。示例性地,WiFi模块可以为ESP WIFI模块等,本发明对此不作限定。Exemplarily, the wireless communication module may be a WiFi module, or other modules with large enough memory and supporting WiFi interface, which is not limited in the present invention. Exemplarily, the WiFi module may be an ESP WIFI module, etc., which is not limited in the present invention.
示例性地,该无线通信模块还可以为移动通信模块,例如3G、4G、5G、6G模块等,本发明对此不作限定。Exemplarily, the wireless communication module may also be a mobile communication module, such as a 3G, 4G, 5G, 6G module, etc., which is not limited in the present invention.
在一个实施例中,计算设备510还可以包括微控制器。由于系统日志消息通常较大,直接传输给无线通信模块会造成其内存不足,因此,在一个实施例中,系统日志消息首先被传送至微控制器然后该微控制器将系统日志消息传送至无线通信模块。其中,微控制器可以起到缓存和控制发送的作用。In one embodiment, the computing device 510 may further include a microcontroller. Since the system log message is usually large, directly transmitting it to the wireless communication module will cause insufficient memory. Therefore, in one embodiment, the system log message is first transmitted to the microcontroller and then the microcontroller transmits the system log message to the wireless communication module. The microcontroller can play the role of caching and controlling transmission.
示例性地,该微控制器可以为单片机(例如,STM32单片机等),其与计算设备的主板、无线通信模块(例如,WiFi模块)进行通信,确保系统日志消息传输的稳定性和准确性。应理解,本发明的微控制器还可以为具有缓存和控制发送作用的其他集成电路芯片,本发明对此不作限定。Exemplarily, the microcontroller can be a single-chip microcomputer (e.g., an STM32 single-chip microcomputer, etc.), which communicates with a mainboard and a wireless communication module (e.g., a WiFi module) of a computing device to ensure the stability and accuracy of system log message transmission. It should be understood that the microcontroller of the present invention can also be other integrated circuit chips with cache and control transmission functions, and the present invention is not limited to this.
示例性地,无线通信模块在接收到系统日志消息后,对该系统日志消息进行校验以确定数据是否出错,并向微控制器发送反馈数据,以反馈系统日志消息是否准确发送。若校验通过,则无线通信模块将通过校验的系统日志消息传送至物联网平台;若校验失败,则微控制器根据不同的反馈进行系统日志消息重发或发送下一段系统日志消息。Exemplarily, after receiving the system log message, the wireless communication module verifies the system log message to determine whether the data is wrong, and sends feedback data to the microcontroller to feedback whether the system log message is sent accurately. If the verification passes, the wireless communication module transmits the verified system log message to the Internet of Things platform; if the verification fails, the microcontroller resends the system log message or sends the next system log message according to different feedback.
示例性地,可以采用本领域公知的任何合适的校验码对该系统日志消息进行校验,例如CRC16校验码,本发明对此不作限定。Exemplarily, the system log message may be verified using any suitable verification code known in the art, such as a CRC16 verification code, which is not limited in the present invention.
示例性地,系统日志消息可以通过例如UATR(通用异步接收器和发送器)被传输至微控制器。应理解,还可以通过本领域公知的任何其他合适的发送器、收发器等将系统日志消息传输至微控制器,本发明对此不作限定。Exemplarily, the system log message can be transmitted to the microcontroller via, for example, a UATR (universal asynchronous receiver and transmitter). It should be understood that the system log message can also be transmitted to the microcontroller via any other suitable transmitter, transceiver, etc. known in the art, and the present invention is not limited to this.
示例性地,系统日志消息可以通过例如UART(通用异步接收器和发送器)从微控制器被传输至无线通信模块。应理解,还可以通过本领域公知的任何其他合适的发送器、收发器等将系统日志消息传输至无线通信模块,本发明对此不作限定。Exemplarily, the system log message can be transmitted from the microcontroller to the wireless communication module via, for example, a UART (universal asynchronous receiver and transmitter). It should be understood that the system log message can also be transmitted to the wireless communication module via any other suitable transmitter, transceiver, etc. known in the art, and the present invention is not limited to this.
示例性地,系统日志消息可以通过例如MQTT(消息队列遥测传输)接口从无线通信模块被传输至物联网平台520。应理解,还可以通过本领域公知的任何其他合适的通信接口将系统日志消息传输至物联网平台,本发明对此不作限定。Exemplarily, the system log message can be transmitted from the wireless communication module to the Internet of Things platform 520 through, for example, an MQTT (Message Queue Telemetry Transport) interface. It should be understood that the system log message can also be transmitted to the Internet of Things platform through any other suitable communication interface known in the art, and the present invention is not limited to this.
示例性地,在物联网平台520接收到系统日志消息后,向无线通信模块发送反馈数据,该无线通信模块接收来自物联网平台520的反馈数据,判断系统日志消息是否准确上传至物联网平台520,并根据不同的反馈进行系统日志消息重发或发送下一段系统日志消息。Exemplarily, after the Internet of Things platform 520 receives the system log message, feedback data is sent to the wireless communication module. The wireless communication module receives the feedback data from the Internet of Things platform 520, determines whether the system log message is accurately uploaded to the Internet of Things platform 520, and resends the system log message or sends the next system log message based on different feedback.
在一个实施例中,物联网平台520可以利用MQTT(消息队列遥测传输)接口来接收来自无线通信模块的系统日志消息。In one embodiment, the IoT platform 520 may utilize an MQTT (Message Queuing Telemetry Transport) interface to receive system log messages from the wireless communication module.
在一个实施例中,客户端设备530可以包括但不限于任何一种车载或手持型电子产品(例如智能手机、平板电脑等),其可以包括一个或更多个程序,客户端设备可以通过这些程序中的一个或更多个程序对系统日志消息进行处理。示例性地,所述程序包括例如但不限于:本地运行的应用程序(App)、运行于网络浏览器上的功能(又称为Web App)、嵌入于电子邮件中的小程序、嵌入于即时通信的客户端软件中的小程序,以及嵌入在其他应用程序中的功能(如开发者或商家基于公众平台上申请的应用账号)等。In one embodiment, the client device 530 may include but is not limited to any vehicle-mounted or handheld electronic product (such as a smart phone, a tablet computer, etc.), which may include one or more programs, and the client device may process the system log message through one or more of these programs. Exemplarily, the program includes, for example, but is not limited to: a locally running application (App), a function running on a web browser (also known as a Web App), a small program embedded in an email, a small program embedded in an instant messaging client software, and a function embedded in other applications (such as an application account applied for by a developer or merchant on a public platform), etc.
在一个实施例中,小程序可以为任何公知的合适的小程序,例如微信小程序等,本发明对此不作限定。In one embodiment, the mini program may be any known suitable mini program, such as a WeChat mini program, etc., and the present invention is not limited to this.
在一个实施例中,客户端设备530对系统日志消息进行处理可以包括:In one embodiment, the client device 530 may process the system log message by:
对该系统日志消息进行过滤,得到经过滤的系统日志消息;以及filtering the system log message to obtain a filtered system log message; and
对经过滤的系统日志消息进行日志提取,得到系统日志消息中的系统日志。Log extraction is performed on the filtered system log message to obtain the system log in the system log message.
示例性地,可以根据预先设置的过滤条件对系统日志消息进行过滤。示例性地,过滤条件可以包括该系统日志消息是否是无线通信模块发送过来的、日志数据中是否包含乱码等,本发明对此不作限定。Exemplarily, the system log message can be filtered according to the preset filtering conditions. Exemplarily, the filtering conditions can include whether the system log message is sent by the wireless communication module, whether the log data contains garbled characters, etc., which is not limited in the present invention.
由于系统日志消息除了系统日志外,还包括日志生成时间、日期、校验码等冗余信息(例如,系统日志的生成时间、日期、校验码等),用户不方便查看,因此可以去除掉系统日志消息中的这些冗余信息以进行存储。因此,在对系统日志消息进行过滤后,可以对经过滤的系统日志消息进行日志提取,截取系统日志消息中仅包含系统日志而不包含系统日志的生成时间、日期、校验码等冗余信息的一段,保存为文档(例如,文本文档),从而得到系统日志。Since the system log message includes redundant information such as log generation time, date, check code, etc. (for example, the generation time, date, check code, etc. of the system log) in addition to the system log, it is inconvenient for users to view, so these redundant information in the system log message can be removed for storage. Therefore, after filtering the system log message, the filtered system log message can be subjected to log extraction, and a section of the system log message that only contains the system log but does not contain redundant information such as the generation time, date, check code, etc. of the system log is intercepted and saved as a document (for example, a text document), thereby obtaining the system log.
在一个实施例中,还可以利用客户端设备530对系统日志进行管理。示例性地,客户端设备可以通过订阅物联网的相应主题(例如,MQTT主题)来对系统日志进行管理。In one embodiment, the system log can also be managed by the client device 530. Exemplarily, the client device can manage the system log by subscribing to a corresponding topic (e.g., an MQTT topic) of the Internet of Things.
在一个实施例中,所述管理可以包括:利用客户端设备的管理界面对系统日志进行创建、预览、上传、清空等操作中的一个或更多个,本发明对此不作限定。In one embodiment, the management may include: using a management interface of a client device to perform one or more operations of creating, previewing, uploading, clearing, etc. on the system log, which is not limited in the present invention.
在一个实施例中,所述管理还可以包括:利用客户端设备的查询界面查询保存在物联网平台的存储空间中的系统日志,以及选择需要下载的系统日志并进行下载。In one embodiment, the management may further include: using a query interface of a client device to query system logs stored in a storage space of the Internet of Things platform, and selecting and downloading system logs that need to be downloaded.
本发明的系统日志管理系统,将计算设备的主板的系统日志上传到物联网平台,使得可以利用客户端设备随时随地来查阅、下载系统日志,无需去现场,不受地点约束,极大地方便了系统日志的管理,也方便研发阶段的问题分析工作。此外,本发明由外部无线通信模块上传数据,不依赖于内部网卡,即使内部网卡初始化失败,也可以将内部网卡相关异常日志上传到物联网平台,稳定性更高。The system log management system of the present invention uploads the system log of the mainboard of the computing device to the Internet of Things platform, so that the system log can be checked and downloaded anytime and anywhere by using the client device, without going to the site and without being restricted by the location, which greatly facilitates the management of the system log and the problem analysis work in the research and development stage. In addition, the present invention uploads data by an external wireless communication module, which does not rely on the internal network card. Even if the internal network card fails to initialize, the abnormal log related to the internal network card can be uploaded to the Internet of Things platform, which has higher stability.
本发明已经通过上述实施例进行了说明,但应当理解的是,上述实施例只是用于举例和说明的目的,而非意在将本发明限制于所描述的实施例范围内。此外本领域技术人员可以理解的是,本发明并不局限于上述实施例,根据本发明的教导还可以做出更多种的变型和修改,这些变型和修改均落在本发明所要求保护的范围以内。本发明的保护范围由附属的权利要求书及其等效范围所界定。The present invention has been described through the above embodiments, but it should be understood that the above embodiments are only for the purpose of example and description, and are not intended to limit the present invention to the scope of the described embodiments. In addition, it can be understood by those skilled in the art that the present invention is not limited to the above embodiments, and more variations and modifications can be made according to the teachings of the present invention, and these variations and modifications all fall within the scope of the protection claimed by the present invention. The protection scope of the present invention is defined by the attached claims and their equivalents.
Claims (21)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311094223.4A CN118277351A (en) | 2023-08-25 | 2023-08-25 | System log management method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311094223.4A CN118277351A (en) | 2023-08-25 | 2023-08-25 | System log management method and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118277351A true CN118277351A (en) | 2024-07-02 |
Family
ID=91649086
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311094223.4A Pending CN118277351A (en) | 2023-08-25 | 2023-08-25 | System log management method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118277351A (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106919495A (en) * | 2015-12-25 | 2017-07-04 | 比亚迪股份有限公司 | CAN journal file acquisition device, system and vehicle for vehicle |
| CN109060243A (en) * | 2018-08-29 | 2018-12-21 | 深圳市元征科技股份有限公司 | A kind of tire balancing equipment and its control method and associated component |
| CN109522391A (en) * | 2018-11-27 | 2019-03-26 | 兰州智华辰宇交通科技有限公司 | The vehicle-mounted log analysis of subway O&M and method for early warning |
| US20210051197A1 (en) * | 2019-08-15 | 2021-02-18 | Siemens Logistics Llc | System and method for remote technical support in an internet of things (iot) environment |
| CN113873000A (en) * | 2020-06-30 | 2021-12-31 | 上海博泰悦臻网络技术服务有限公司 | Method for transmitting vehicle system log through wireless terminal |
| CN115580608A (en) * | 2022-08-25 | 2023-01-06 | 国能朔黄铁路发展有限责任公司 | Locomotive log file transmission method, device, storage medium and electronic equipment |
| CN116094908A (en) * | 2023-01-17 | 2023-05-09 | 中国第一汽车股份有限公司 | Log file storage method, device, equipment and storage medium |
-
2023
- 2023-08-25 CN CN202311094223.4A patent/CN118277351A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106919495A (en) * | 2015-12-25 | 2017-07-04 | 比亚迪股份有限公司 | CAN journal file acquisition device, system and vehicle for vehicle |
| CN109060243A (en) * | 2018-08-29 | 2018-12-21 | 深圳市元征科技股份有限公司 | A kind of tire balancing equipment and its control method and associated component |
| CN109522391A (en) * | 2018-11-27 | 2019-03-26 | 兰州智华辰宇交通科技有限公司 | The vehicle-mounted log analysis of subway O&M and method for early warning |
| US20210051197A1 (en) * | 2019-08-15 | 2021-02-18 | Siemens Logistics Llc | System and method for remote technical support in an internet of things (iot) environment |
| CN113873000A (en) * | 2020-06-30 | 2021-12-31 | 上海博泰悦臻网络技术服务有限公司 | Method for transmitting vehicle system log through wireless terminal |
| CN115580608A (en) * | 2022-08-25 | 2023-01-06 | 国能朔黄铁路发展有限责任公司 | Locomotive log file transmission method, device, storage medium and electronic equipment |
| CN116094908A (en) * | 2023-01-17 | 2023-05-09 | 中国第一汽车股份有限公司 | Log file storage method, device, equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20240064058A1 (en) | Implementation of compliance settings by a mobile device for compliance with a configuration scenario | |
| US6976253B1 (en) | Method and apparatus for configuring a mobile device | |
| US7788349B2 (en) | Information processing system and method | |
| US7899959B2 (en) | Method of loading software in mobile and desktop environments | |
| CN110869907B (en) | A method and terminal for browsing application pages | |
| US20020174206A1 (en) | Web-based file manipulating system | |
| US7415539B2 (en) | Method and apparatus for detecting insufficient memory for data extraction processes | |
| CN113761412A (en) | Application page display method, device, electronic device, medium and application system | |
| CN1355981A (en) | Radio terminal for browsing internet | |
| JP2020009426A (en) | Method, system, and non-transitory computer-readable recording medium for providing copied message list | |
| CN115150392B (en) | Remote file copying method, system, computing equipment and storage medium | |
| US20070220008A1 (en) | System and method for single client remote access | |
| CN112463199A (en) | System upgrading method and terminal | |
| CN107274222B (en) | Advertisement putting method and device | |
| KR20090113372A (en) | How devices are identified in mobile and desktop environments | |
| US20080313287A1 (en) | E-mail publishing of photos to photo albums | |
| CN115658998A (en) | Log query method, device, equipment and storage medium | |
| CN114201234A (en) | A file processing method, device, system, device and storage medium | |
| CN118277351A (en) | System log management method and system | |
| CN118568743B (en) | Data encryption and decryption methods, devices, media, and equipment based on hardware encryption cards | |
| CN107015821B (en) | Incremental updating method and device | |
| CN115857967A (en) | Method, device, boot disk, electronic device and storage medium for installing operating system | |
| CN101399784A (en) | Communication system, communication method, communication control program and program recording medium | |
| CN119806660B (en) | A method for processing device information and an electronic device | |
| CN120091274B (en) | Method, device, equipment and storage medium for realizing unified management of terminal equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |