WO2021139355A1 - Method and apparatus for starting ram os for data collection - Google Patents

Method and apparatus for starting ram os for data collection Download PDF

Info

Publication number
WO2021139355A1
WO2021139355A1 PCT/CN2020/125062 CN2020125062W WO2021139355A1 WO 2021139355 A1 WO2021139355 A1 WO 2021139355A1 CN 2020125062 W CN2020125062 W CN 2020125062W WO 2021139355 A1 WO2021139355 A1 WO 2021139355A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
preset
operating system
memory operating
file
Prior art date
Application number
PCT/CN2020/125062
Other languages
French (fr)
Chinese (zh)
Inventor
田玉凯
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139355A1 publication Critical patent/WO2021139355A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application belongs to the technical field of memory operating systems, and in particular relates to a method, device, computer equipment, and computer-readable storage medium for starting a memory operating system for data collection.
  • RAM OS is an operating system that does not depend on the hard disk after startup. After startup, it loads all files into the memory to run. It runs fast, and the core files of the system are not easily damaged.
  • the memory operating system is suitable for users who have higher requirements for speed and performance. It can be used to replace shadow systems and virtual machines. It is easy to do various tests. It can be used like normal systems. It has good compatibility and is also suitable for gigabit networks.
  • Disk RAMOS after the diskless RAMOS client is started, it does not rely on the support of the server, the network between the client and the server does not need to exchange data, and the operation of the client is not affected after the server is closed.
  • the memory operating system enters the kernel of the memory operating system according to the startup mode of the basic input output system (BIOS, Basic Input Output System) during the startup process.
  • BIOS Basic Input Output System
  • the boot mode of the BIOS includes the Legacy boot mode and the UEFI (Unified Extensible Firmware Interface) boot mode.
  • the inventor realizes that the memory operating system in the prior art is performed in a single startup mode, and the kernel of the memory operating system is also single, so that the memory operating system cannot automatically enter the corresponding OS kernel according to the startup mode of the server. As a result, the memory operating system cannot be started normally.
  • the embodiments of the present application provide a method, device, computer equipment, and computer-readable storage medium for starting a memory operating system for data collection, which solves the problem that the memory operating system for data collection can operate in different startup modes. Automatically load the kernel files corresponding to different startup modes to start the memory operating system normally.
  • an embodiment of the present application provides a method for starting a memory operating system for data collection, which includes:
  • startup mode is the Legacy startup mode
  • the boot mode is the UEFI boot mode
  • an embodiment of the present application provides a device for starting a memory operating system for data collection, which includes:
  • a receiving unit configured to receive a start request for starting the memory operating system
  • the judging unit is used to judge the startup mode of the preset basic input output system
  • the first running unit is configured to, if the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run all The memory operating system;
  • the second running unit is configured to, if the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run all The memory operating system.
  • an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the Perform the following steps in the computer program:
  • startup mode is the Legacy startup mode
  • the boot mode is the UEFI boot mode
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps :
  • startup mode is the Legacy startup mode
  • the boot mode is the UEFI boot mode
  • the boot file and kernel file corresponding to the BIOS in the server are configured for the memory operating system to solve the problem of The problem that the memory operating system cannot be started normally due to the boot mode of the BIOS in the server, there is no need to select a server with a specific BIOS boot mode when replacing the server.
  • FIG. 1 is a schematic flowchart of a method for starting a memory operating system for data collection according to an embodiment of the application
  • FIG. 2 is a schematic diagram of a sub-flow of a method for starting a memory operating system for data collection according to an embodiment of the application;
  • FIG. 3 is a schematic diagram of another sub-flow of a method for starting a memory operating system for data collection according to an embodiment of the application;
  • FIG. 4 is a schematic diagram of another sub-flow of a method for starting a memory operating system for data collection according to an embodiment of the application;
  • FIG. 5 is a schematic block diagram of a device for starting a memory operating system for data collection according to an embodiment of the application
  • FIG. 6 is a schematic block diagram of a subunit of a device for starting a memory operating system for data collection according to an embodiment of the application;
  • FIG. 7 is a schematic block diagram of another subunit of the device for starting a memory operating system for data collection according to an embodiment of the application;
  • FIG. 8 is a schematic block diagram of another subunit of the device for starting a memory operating system for data collection according to an embodiment of the application;
  • FIG. 9 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • FIG. 1 is a schematic flowchart of a method for starting a memory operating system for data collection according to an embodiment of the application.
  • the method for starting the memory operating system is applied to a server, and when the memory operating system is started, a kernel file corresponding to the memory operating system is loaded into the memory for operation.
  • the memory operating system described in the implementation of this application is similar to the Windows PE (Windows Preinstallation Environment) system. It is a memory operating system that does not depend on the hard disk during the startup process, and is mainly used to collect software that interacts with the memory operating system.
  • Windows PE Windows Preinstallation Environment
  • the data of the hardware system and the software and hardware interacting with the memory operating system include not only the server during the startup of the memory operating system, but also the third-party systems, clients, and devices connected to the memory operating system.
  • the memory operating system is used to collect data during the operation of the switch to determine whether a data failure occurs during the operation of the switch, and if a data failure occurs to the switch, The switch can be repaired through the data collected by the memory operating system.
  • the method includes steps S110 to S140.
  • the startup request is startup instruction information used to start the memory operating system
  • the startup instruction information is instruction information used to enter the BIOS of the server and run the memory operating system according to the BIOS.
  • step S110 before step S110, it further includes: mounting a preset ISO image file, wherein the ISO image file includes the first kernel file, the second kernel file, the first boot file, and The second boot file.
  • the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file.
  • the ISO image file is an image file that is compressed into a single file and stored on an optical disc in the IOS format.
  • the ISO image file includes a kernel file and a boot file for starting the memory operating system, wherein the kernel
  • the file is the most basic part of the memory operating system, that is, the core part of the memory operating system, provides the most basic functions of the memory operating system, is the basis of the work of the memory operating system, and is responsible for managing the
  • the process, memory, kernel architecture device driver, file and network system of the memory operating system determine the performance and stability of the system;
  • the boot file is a system file with hidden and read-only attributes that is used to load the kernel file to make
  • the file of the memory operating system can be started normally.
  • the kernel file of the memory operating system can be stored in a storage device in the server or in a device externally connected to the server.
  • the device externally connected to the server can connect to the server through the network, or through USB, VGA, DVI, HDMI, DP Wait for the interface to connect.
  • the BIOS in the server obtains a boot file and a kernel file corresponding to the memory operating system, and then loads the kernel file through the boot file to start the memory operating system. Since the boot mode of the BIOS in the server can be either the traditional Legacy boot mode or the UEFI boot mode, in this embodiment, the ISO image file contains the first boot mode corresponding to the traditional Legacy boot mode.
  • the first boot file and the first kernel file also include the second boot file and the second kernel file corresponding to the UEFI boot mode.
  • the mounting method includes using a virtual machine to mount the ISO image file and remotely mounting the ISO image file to a preset
  • the ISO image file can be directly selected and mounted in the virtual machine settings when using a virtual machine to mount the ISO image file, without uploading to the virtual machine server, usually during testing
  • a virtual machine is used to mount the ISO image file.
  • the image file needs to be uploaded to a preset server for remote mounting of the ISO image file. Therefore, in this embodiment, remote mounting is used.
  • the ISO image file can be mounted remotely through tools provided by various manufacturers, such as the ipmitool tool.
  • BIOS Basic Input Output System
  • CMOS Complementary Metal Oxide, RAM chip that can be read and written
  • the main function of BIOS is to provide the computer with the lowest and most direct hardware settings and control.
  • the boot mode of the BIOS includes both the traditional Legacy boot mode and the UEFI boot mode, that is, when the BIOS boot mode is the Legacy boot mode, the memory operating system can only be entered in the Legacy boot mode; when the BIOS boot mode When it is the Legacy boot mode, the memory operating system can only be entered in the Legacy boot mode. Therefore, the memory operating system pre-determines the startup mode of the BIOS in the server before starting, so that the memory operating system can be normally started in the server.
  • startup mode is the Legacy startup mode
  • obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system.
  • the startup mode is the Legacy startup mode
  • the server determines that the boot mode of the BIOS in the server is the Legacy boot mode
  • it obtains the first boot file and the first kernel file corresponding to the memory operating system according to the Legacy boot mode, and passes the The first boot file loads the first kernel file to run the memory operating system.
  • the first boot file is the SYSLINUX.CFG boot file
  • the first kernel file is the CentOS6 series kernel file.
  • the BOIS in the server can be run by loading the CentOS6 series kernel file through the SYSLINUX.CFG boot file.
  • the memory operating system is the SYSLINUX.CFG boot file.
  • boot mode is the UEFI boot mode
  • the boot mode is the UEFI boot mode
  • the server determines that the boot mode of the BIOS in the server is the UEFI boot mode, it obtains the second boot file and the second kernel file corresponding to the memory operating system according to the UEFI boot mode, and passes all the boot files.
  • the second boot file loads the second kernel file to run the memory operating system.
  • the second boot file is the GRUB.CFG boot file
  • the first kernel file is the CentOS7 series kernel file
  • the BOIS in the server can be run by loading the CentOS7 series kernel file through the GRUB.CFG boot file.
  • the memory operating system is the GRUB.CFG boot file.
  • the method further includes: collecting data interacting with the memory operating system in the memory operating system according to a preset collection tool and storing the collected data in a preset database.
  • the collection tool is used to collect data when interacting with the memory operating system.
  • the collected data includes not only the software and hardware data of the server where the memory operating system is running, but also the communication with the server. Perform data transmission and receive data. Since the memory operating system cannot save the data collected by the detection tool after the memory operating system is closed, after the collection tool collects the data after interacting with the memory operating system, the The collected data is saved in a preset database to prevent the loss of the collected data after the memory operating system is shut down.
  • the Agent service can be automatically started, and data after interaction with the memory operating system is collected through a python script.
  • the Python script collects the collected data
  • the The memory operating system uploads the collected data to a preset database.
  • the collected data interacting with the memory operating system is collected in the memory operating system according to the preset collection tool and the collected data is stored in a preset database Including: steps S151 and S152.
  • the blockchain is used to store the collected data
  • the blockchain is a new application mode of computer technology such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc., which is essentially It is a decentralized database. It is a series of data blocks that are generated using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity (anti-counterfeiting) and generation of the information. The next block can effectively prevent data leakage or illegal tampering. Therefore, the collected data in this embodiment is stored in a preset block chain.
  • step S151 includes sub-steps S1511, S1512, and S1513.
  • the structure types of the collected data include structured data and unstructured data.
  • the structured data is also called row data, which is logically expressed and realized by a two-dimensional table structure, strictly follow the data format and length specification, mainly through the relational database for storage and management.
  • the unstructured data is data whose data structure is irregular or incomplete, and there is no predefined data model, that is, data that is not convenient to be represented by a two-dimensional logical table of a database.
  • the unstructured data includes all formats of office documents, text, pictures, XML, HTML, various reports, images and audio/video information and other data.
  • the structure type of the collected data is identified so as to be subsequently encrypted in different ways according to the structure type of the collected data and stored in the blockchain. For example, if the collected data is structured data, the collected data is encrypted using an elliptic curve algorithm or an asymmetric encryption algorithm and stored in the blockchain; if the collected data is unstructured To convert the data, the collected data is hashed to generate a corresponding digital fingerprint, and the generated corresponding digital fingerprint is encrypted to be stored in the blockchain.
  • the collected data is encrypted according to the structure type of the collected data to obtain encrypted data.
  • the structure type of the collected data is obtained by identifying the structure type of the collected data, which is convenient for subsequent encryption and storage in the blockchain in different ways according to the structure type of the collected data in. For example, if the collected data is structured data, the collected data is encrypted using an elliptic curve algorithm or an asymmetric encryption algorithm and stored in the blockchain; if the collected data is unstructured To convert the data, the collected data is hashed to generate a corresponding digital fingerprint, and the generated corresponding digital fingerprint is encrypted to be stored in the blockchain.
  • the data of the blocks in the blockchain is stored in the database.
  • the block in the blockchain includes a block header and a block body.
  • the block header contains the address and timestamp of the previous block, and the timestamp is used to indicate the creation time of the block.
  • the block body includes the encrypted data, that is, the data of the block in the blockchain includes both the data in the block header and the data in the block body.
  • LevelDB which is a data storage system designed for write-intensive applications, it sacrifices data read performance in exchange for improved write performance.
  • the data collected by the memory operating system described in this application is used to verify the data collected by a preset third-party system, and the preset third-party system needs to frequently read and query the collected data. The efficiency of query and analysis of the collected data is limited. Therefore, the data of the blocks in the blockchain is stored in the database so that a preset third-party system can quickly query and analyze the collected data.
  • the method further includes: The collected data updates the preset third-party system.
  • the third-party system is a user-oriented system that interacts with the memory operating system and can transmit and receive data with the memory operating system.
  • the user can communicate with the memory operating system through the third-party system.
  • the third-party system is a user-oriented system, the user can interact with the memory operating system by operating the third-party system.
  • the third-party system is a BMP (Bank Merchant Pos) system.
  • the collected data can be used to inquire about the user's erroneous operations on the third-party system In order to repair the user's error on the third-party system due to improper operation, and repair the data collected by the third-party system on the user to update the third-party system.
  • the updating of the preset third-party system based on the collected data includes: step S161, step S162, and step S163.
  • the third-party system is connected to the database and can perform data transmission and reception with the database, and the data collected by the memory operating system can be obtained from the database.
  • the third-party system and the memory operating system have the same data collection function, and the data collected by the third-party system is the user’s
  • the data during the operation on the system is compared with the data collected from the database and the data when the user operates on the third-party system, so that the third-party system can make it easier for the third-party system to query the office.
  • the third-party system is collecting abnormal data of the user's misoperation.
  • the collected data is compared with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system.
  • the data collected by the third-party system itself is data when the user operates on the third-party system, and the data is stored in another preset database through the third-party system.
  • the data collected through the memory operating system is compared with the data collected by the third-party system. To query whether the data collected by the third-party system is consistent, and then determine whether the data collected by the third-party system is abnormal, so as to repair the data collected by the third system.
  • the collected data is inconsistent with the data collected by the third-party system
  • the third-party system inquires that the data collected by the third-party system is inconsistent with the data collected from the memory operating system, it can be determined that the data collected by the third-party system is abnormal, and the data collected by the third-party system is abnormal.
  • the data collected from the memory operating system can be replaced with the data collected by the third-party system to repair the abnormal data collected by the third-party system, so that the data collected by the third-party system can be repaired. Keep consistent with the data collected by the memory operating system.
  • the technical methods in this application can be applied to application scenarios of smart government affairs/smart city management/smart community/smart security/smart logistics/smart healthcare/smart education/smart environmental protection/smart transportation that include a memory operating system for data collection, thereby Promote the construction of smart cities.
  • the embodiment of the present application also provides a device 100 for starting a memory operating system for data collection, and the device is used to execute any embodiment of the aforementioned method for starting a memory operating system for data collection.
  • FIG. 5 is a schematic block diagram of a device 100 for starting a memory operating system for data collection according to an embodiment of the present application.
  • the device 100 for starting a memory operating system for data collection includes a receiving unit 110, a judgment unit 120, a first running unit 130, and a second running unit 140.
  • the receiving unit 110 is configured to receive a start request for starting the memory operating system.
  • the device 100 for starting a memory operating system for data collection further includes a mounting unit 110a.
  • the mounting unit 110a is configured to mount a preset ISO image file, where the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file.
  • the judging unit 120 is used to judge the startup mode of the preset basic input output system.
  • the first running unit 130 is configured to, if the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run The memory operating system.
  • the second running unit 140 is configured to, if the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run The memory operating system.
  • the device 100 for starting a memory operating system for data collection further includes a first storage unit 150.
  • the first storage unit 150 is configured to collect data interacting with the memory operating system in the memory operating system according to a preset collection tool and store the collected data in a preset database.
  • the first storage unit 150 includes a writing unit 151 and a second storage unit 152.
  • the first writing unit 151 is configured to write the collected data into a preset blockchain.
  • the first writing unit 151 includes an identification unit 1511, an encryption unit 1512 and a second writing unit 1513.
  • the identification unit 1511 is used to identify the structure type of the collected data.
  • the encryption unit 1512 is configured to encrypt the collected data according to the structure type of the collected data to obtain encrypted data.
  • the second writing unit 1513 is configured to write the encrypted data into the blockchain.
  • the second storage unit 152 is configured to store data of blocks in the blockchain into the database.
  • the device 100 for starting a memory operating system for data collection further includes an update unit 160.
  • the update unit 160 is configured to update a preset third-party system according to the collected data.
  • the update unit 160 includes: an acquisition unit 161, a comparison unit 162, and a replacement unit 163.
  • the obtaining unit 161 is configured to obtain the collected data from the database according to the third-party system.
  • the comparison unit 162 is configured to compare the data with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system.
  • the replacement unit 163 is configured to, if the collected data is inconsistent with the data collected by the third-party system, replace the data collected by the third-party system with the collected data to update the third-party system.
  • FIG. 9 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can execute the method for starting the memory operating system for data collection.
  • the processor 502 is used to provide computing and control capabilities, and support the operation of the entire device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can execute the startup method of the memory operating system for data collection.
  • the network interface 505 is used for network communication, such as providing data information transmission.
  • 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the device 500 to which the solution of the present application is applied.
  • the specific device 500 may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor 502 is configured to run a computer program 5032 stored in a memory, so as to implement any embodiment of the above-mentioned method for starting a memory operating system for data collection.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors 502, or digital signal processors 502 (Digital Signal Processors, DSPs). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor 502 may be a microprocessor 502 or the processor 502 may also be any conventional processor 502 and the like.
  • the computer program may be stored in a storage medium, and the storage medium may be a computer-readable storage medium.
  • the computer program is executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiment.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the storage medium stores a computer program, which, when executed by a processor, implements any embodiment of the above-mentioned method for starting a memory operating system for data collection.
  • the computer-readable storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk, and other media that can store program codes.

Abstract

A method and apparatus for starting a RAM OS for data collection, a computer device, and a computer readable storage medium. The method comprises: receiving a start request for starting a RAM OS (S110); determining the start mode of a pre-set basic input output system (S120); if the start mode is Legacy start mode, obtaining, according to the Legacy start mode, a pre-set first boot file and loading, according to the first boot file, a pre-set first kernel file to run the RAM OS (S130); if the start mode is UEFI start mode, obtaining, according to the UEFI start mode, a pre-set second boot file and loading, according to the second boot file, a pre-set second kernel file to run the RAM OS (S140). The present method relates to techniques of system performance optimization, and solves the problem of a RAM OS being unable to start normally during a RAM OS starting process because of the BIOS start mode in a server.

Description

用于数据采集的内存操作系统的启动方法及装置Method and device for starting memory operating system for data collection
本申请要求于2020年07月20日提交中国专利局、申请号为202010698856.6,发明名称为“用于数据采集的内存操作系统的启动方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 20, 2020, the application number is 202010698856.6, and the invention title is "Starting method and device for memory operating system for data collection". The entire content of the application is approved The reference is incorporated in this application.
技术领域Technical field
本申请属于内存操作系统技术领域,尤其涉及一种用于数据采集的内存操作系统的启动方法、装置、计算机设备以及计算机可读存储介质。This application belongs to the technical field of memory operating systems, and in particular relates to a method, device, computer equipment, and computer-readable storage medium for starting a memory operating system for data collection.
背景技术Background technique
内存操作系统(RAM OS)是一种启动后不依赖硬盘的操作系统,其启动后会将所有文件加载到内存运行,运行速度快,系统的核心文件不易受到破坏。内存操作系统适用于对速度及性能有较高要求的用户,可用于代替影子系统、虚拟机,便于做各类测试,可跟正常系统一样使用,兼容性好,而且还适用于千兆网无盘RAMOS,无盘RAMOS客户机启动完毕后,不依赖服务器的支持,客户端和服务器之间网络无需进行数据交换,且服务器关闭后不影响客户端的运行。RAM OS is an operating system that does not depend on the hard disk after startup. After startup, it loads all files into the memory to run. It runs fast, and the core files of the system are not easily damaged. The memory operating system is suitable for users who have higher requirements for speed and performance. It can be used to replace shadow systems and virtual machines. It is easy to do various tests. It can be used like normal systems. It has good compatibility and is also suitable for gigabit networks. Disk RAMOS, after the diskless RAMOS client is started, it does not rely on the support of the server, the network between the client and the server does not need to exchange data, and the operation of the client is not affected after the server is closed.
通常内存操作系统在启动过程中是根据基本输入输出系統(BIOS,Basic Input Output System)的启动模式来进入内存操作系统的内核中。其中,BIOS的启动模式包括Legacy启动模式和UEFI(Unified Extensible Firmware Interface)启动模式。但发明人意识到现有技术中内存操作系统都是在单一的启动模式下进行的,同时内存操作系统的内核也是单一的,使得内存操作系统无法根据服务器的启动模式自动进入对应的OS内核,从而导致无法正常启动内存操作系统。Generally, the memory operating system enters the kernel of the memory operating system according to the startup mode of the basic input output system (BIOS, Basic Input Output System) during the startup process. Among them, the boot mode of the BIOS includes the Legacy boot mode and the UEFI (Unified Extensible Firmware Interface) boot mode. However, the inventor realizes that the memory operating system in the prior art is performed in a single startup mode, and the kernel of the memory operating system is also single, so that the memory operating system cannot automatically enter the corresponding OS kernel according to the startup mode of the server. As a result, the memory operating system cannot be started normally.
发明内容Summary of the invention
本申请实施例提供了一种用于数据采集的内存操作系统的启动方法、装置、计算机设备以及计算机可读存储介质,解决了用于数据采集的内存操作系统能在不同的启动模式的情况下自动加载不同启动模式所对应的内核文件以正常启动内存操作系统的问题。The embodiments of the present application provide a method, device, computer equipment, and computer-readable storage medium for starting a memory operating system for data collection, which solves the problem that the memory operating system for data collection can operate in different startup modes. Automatically load the kernel files corresponding to different startup modes to start the memory operating system normally.
第一方面,本申请实施例提供了一种用于数据采集的内存操作系统的启动方法,其包括:In the first aspect, an embodiment of the present application provides a method for starting a memory operating system for data collection, which includes:
接收启动所述内存操作系统的启动请求;Receiving a start request for starting the memory operating system;
判断预置的基本输入输出系统的启动模式;Determine the startup mode of the preset basic input and output system;
若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system;
若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
第二方面,本申请实施例提供了一种用于数据采集的内存操作系统的启动装置,其包括:In the second aspect, an embodiment of the present application provides a device for starting a memory operating system for data collection, which includes:
接收单元,用于接收启动所述内存操作系统的启动请求;A receiving unit, configured to receive a start request for starting the memory operating system;
判断单元,用于判断预置的基本输入输出系统的启动模式;The judging unit is used to judge the startup mode of the preset basic input output system;
第一运行单元,用于若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操 作系统;The first running unit is configured to, if the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run all The memory operating system;
第二运行单元,用于若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。The second running unit is configured to, if the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run all The memory operating system.
第三方面,本申请实施例又提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行以下步骤:In a third aspect, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the Perform the following steps in the computer program:
接收启动所述内存操作系统的启动请求;Receiving a start request for starting the memory operating system;
判断预置的基本输入输出系统的启动模式;Determine the startup mode of the preset basic input and output system;
若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system;
若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行以下步骤:In a fourth aspect, the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps :
接收启动所述内存操作系统的启动请求;Receiving a start request for starting the memory operating system;
判断预置的基本输入输出系统的启动模式;Determine the startup mode of the preset basic input and output system;
若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system;
若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
本申请实施例在所述的内存操作系统在启动的过程中通过对所述内存操作系统配置与服务器中的BIOS相对应的引导文件和内核文件,解决了在启动所述内存操作系统的过程中由于服务器中BIOS的启动模式的原因导致所述内存操作系统无法正常启动的问题,无需在更换服务器时需选用特定BIOS的启动模式的服务器。In the embodiment of the present application, during the startup process of the memory operating system, the boot file and kernel file corresponding to the BIOS in the server are configured for the memory operating system to solve the problem of The problem that the memory operating system cannot be started normally due to the boot mode of the BIOS in the server, there is no need to select a server with a specific BIOS boot mode when replacing the server.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的用于数据采集的内存操作系统的启动方法的流程示意图;FIG. 1 is a schematic flowchart of a method for starting a memory operating system for data collection according to an embodiment of the application;
图2为本申请实施例提供的用于数据采集的内存操作系统的启动方法的子流程示意图;2 is a schematic diagram of a sub-flow of a method for starting a memory operating system for data collection according to an embodiment of the application;
图3为本申请实施例提供的用于数据采集的内存操作系统的启动方法的另一子流程示意图;FIG. 3 is a schematic diagram of another sub-flow of a method for starting a memory operating system for data collection according to an embodiment of the application;
图4为本申请实施例提供的用于数据采集的内存操作系统的启动方法的另一子流程示意图;FIG. 4 is a schematic diagram of another sub-flow of a method for starting a memory operating system for data collection according to an embodiment of the application;
图5为本申请实施例提供的用于数据采集的内存操作系统的启动装置的示意性框图;5 is a schematic block diagram of a device for starting a memory operating system for data collection according to an embodiment of the application;
图6为本申请实施例提供的用于数据采集的内存操作系统的启动装置的子单元示意性框图;FIG. 6 is a schematic block diagram of a subunit of a device for starting a memory operating system for data collection according to an embodiment of the application;
图7为本申请实施例提供的用于数据采集的内存操作系统的启动装置的另一子单元示意性框图;FIG. 7 is a schematic block diagram of another subunit of the device for starting a memory operating system for data collection according to an embodiment of the application;
图8为本申请实施例提供的用于数据采集的内存操作系统的启动装置的另一子单元示意性框图;8 is a schematic block diagram of another subunit of the device for starting a memory operating system for data collection according to an embodiment of the application;
图9为本申请实施例提供的计算机设备的示意性框图。FIG. 9 is a schematic block diagram of a computer device provided by an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and appended claims, the terms "including" and "including" indicate the existence of the described features, wholes, steps, operations, elements and/or components, but do not exclude one or The existence or addition of multiple other features, wholes, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .
请参阅图1,图1为本申请实施例提供的用于数据采集的内存操作系统的启动方法的流程示意图。所述内存操作系统的启动方法应用于服务器中,在对所述内存操作系统进行启动时会将该内存操作系统对应的内核文件加载到内存进行运行。本申请实施中所述内存操作系统类似于Windows PE(Windows Preinstallation Environment)系统,是一种启动在启动过程中不依赖硬盘的内存操作系统,主要用于采集与所述内存操作系统进行交互的软硬件系统的数据,与所述内存操作系统进行交互的软硬件既包括所述内存操作系统启动过程中的服务器,也包括与所述内存操作系统连接的第三方系统、客户端以及设备。例如,当所述内存操作系统与交换机进行连接时,则所述内存操作系统用于采集该交换机运行过程中的数据以确定该交换机在运行过程中是否发生数据故障,若该交换机发生数据故障,可通过所述内存操作系统采集的数据对该交换机进行故障修复。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a method for starting a memory operating system for data collection according to an embodiment of the application. The method for starting the memory operating system is applied to a server, and when the memory operating system is started, a kernel file corresponding to the memory operating system is loaded into the memory for operation. The memory operating system described in the implementation of this application is similar to the Windows PE (Windows Preinstallation Environment) system. It is a memory operating system that does not depend on the hard disk during the startup process, and is mainly used to collect software that interacts with the memory operating system. The data of the hardware system and the software and hardware interacting with the memory operating system include not only the server during the startup of the memory operating system, but also the third-party systems, clients, and devices connected to the memory operating system. For example, when the memory operating system is connected to the switch, the memory operating system is used to collect data during the operation of the switch to determine whether a data failure occurs during the operation of the switch, and if a data failure occurs to the switch, The switch can be repaired through the data collected by the memory operating system.
如图1所示,该方法包括步骤S110~S140。As shown in Fig. 1, the method includes steps S110 to S140.
S110、接收启动所述内存操作系统的启动请求S110. Receive a start request for starting the memory operating system
接收启动所述内存操作系统的启动请求。具体的,所述启动请求为用于启动所述内存操作系统的启动指令信息,该启动指令信息为用于进入服务器中的BIOS并根据该BIOS运行所述内存操作系统的指令信息。Receiving a start request for starting the memory operating system. Specifically, the startup request is startup instruction information used to start the memory operating system, and the startup instruction information is instruction information used to enter the BIOS of the server and run the memory operating system according to the BIOS.
在一实施例中,步骤S110之前还包括:挂载预置的ISO镜像文件,其中,所述ISO镜 像文件包括所述第一内核文件、所述第二内核文件、所述第一引导文件和所述第二引导文件。In one embodiment, before step S110, it further includes: mounting a preset ISO image file, wherein the ISO image file includes the first kernel file, the second kernel file, the first boot file, and The second boot file.
挂载预置的ISO镜像文件,其中,所述ISO镜像文件包括所述第一内核文件、所述第二内核文件、所述第一引导文件和所述第二引导文件。具体的,所述ISO镜像文件为多个文件被压缩成单一文件以IOS格式存储在光盘上的镜像文件,所述ISO镜像文件中包括启动所述内存操作系统的内核文件和引导文件,其中内核文件为所述内存操作系统最基本的部分,即为所述内存操作系统最核心的部分,提供所述内存操作系统的最基本的功能,是所述内存操作系统工作的基础,负责管理所述内存操作系统的进程、内存、内核体系结构设备驱动程序、文件和网络系统,决定着系统的性能和稳定性;引导文件是一个具有隐藏和只读属性的系统文件,用于加载内核文件以使得能正常启动所述内存操作系统的文件。所述内存操作系统的内核文件既可以存储在该服务器中的存储设备中,也可以存储在与该服务器进行外部连接的设备中。当所述内存操作系统的内核文件存储在与该服务器进行外部连接的设备中时,与该服务器进行外部连接的设备既可以通过网络连接该服务器,也可以通过USB、VGA、DVI、HDMI、DP等接口进行连接。服务器中的BIOS在启动所述内存操作系统前,通过获取与所述内存操作系统相对应的引导文件和内核文件,进而通过该引导文件加载该内核文件以启动所述内存操作系统。由于服务器中的BIOS的启动模式既可以为传统的Legacy启动模式,也可以为UEFI启动模式,故在本实施例中,所述ISO镜像文件中既包含了与传统的Legacy启动模式相对应的第一引导文件和第一内核文件,也包含了与UEFI启动模式相对应的第二引导文件和第二内核文件。Mount a preset ISO image file, where the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file. Specifically, the ISO image file is an image file that is compressed into a single file and stored on an optical disc in the IOS format. The ISO image file includes a kernel file and a boot file for starting the memory operating system, wherein the kernel The file is the most basic part of the memory operating system, that is, the core part of the memory operating system, provides the most basic functions of the memory operating system, is the basis of the work of the memory operating system, and is responsible for managing the The process, memory, kernel architecture device driver, file and network system of the memory operating system determine the performance and stability of the system; the boot file is a system file with hidden and read-only attributes that is used to load the kernel file to make The file of the memory operating system can be started normally. The kernel file of the memory operating system can be stored in a storage device in the server or in a device externally connected to the server. When the kernel file of the memory operating system is stored in a device externally connected to the server, the device externally connected to the server can connect to the server through the network, or through USB, VGA, DVI, HDMI, DP Wait for the interface to connect. Before starting the memory operating system, the BIOS in the server obtains a boot file and a kernel file corresponding to the memory operating system, and then loads the kernel file through the boot file to start the memory operating system. Since the boot mode of the BIOS in the server can be either the traditional Legacy boot mode or the UEFI boot mode, in this embodiment, the ISO image file contains the first boot mode corresponding to the traditional Legacy boot mode. The first boot file and the first kernel file also include the second boot file and the second kernel file corresponding to the UEFI boot mode.
另外,所述内存操作系统在启动前,将所述ISO镜像文件进行挂载,挂载的方式包括使用虚拟机对所述ISO镜像文件进行挂载和远程挂载所述ISO镜像文件至预置的服务器中,其中,使用虚拟机挂载所述ISO镜像文件时可直接在虚拟机的设置中将所述ISO镜像文件直接选择并进行挂载,无需上传至虚拟机服务器中,通常是在测试环境中使用虚拟机挂载所述ISO镜像文件,而一般在正式环境中,需要将镜像文件上传至预置的服务器内进行远程挂载所述ISO镜像文件,故在本实施例中采用远程挂载所述ISO镜像文件至预置的服务器中。通常可通过各个厂商提供的工具,例如ipmitool工具,便可实现远程挂载所述ISO镜像文件。In addition, before the memory operating system is started, the ISO image file is mounted, and the mounting method includes using a virtual machine to mount the ISO image file and remotely mounting the ISO image file to a preset The ISO image file can be directly selected and mounted in the virtual machine settings when using a virtual machine to mount the ISO image file, without uploading to the virtual machine server, usually during testing In the environment, a virtual machine is used to mount the ISO image file. Generally, in a formal environment, the image file needs to be uploaded to a preset server for remote mounting of the ISO image file. Therefore, in this embodiment, remote mounting is used. Load the ISO image file to a preset server. Generally, the ISO image file can be mounted remotely through tools provided by various manufacturers, such as the ipmitool tool.
S120、判断预置的基本输入输出系统的启动模式。S120: Determine the startup mode of the preset basic input output system.
判断预置的基本输入输出系统的启动模式。具体的,基本输入输出系统(BIOS,Basic Input Output System)是一组固化到计算机内主板上一个ROM芯片上的程序,保存着计算机最重要的基本输入输出的程序、开机后自检程序和系统自启动程序,可从CMOS(Complementary Metal Oxide Semiconductor,可读写的RAM芯片)中读写系统设置的具体信息,BIOS主要功能是为计算机提供最底层的、最直接的硬件设置和控制。其中BIOS的启动模式既包括传统的Legacy启动模式,也包括UEFI启动模式,即当BIOS的启动模式为Legacy启动模式时,只能在Legacy启动模式下进入所述内存操作系统;当BIOS的启动模式为Legacy启动模式时,只能在Legacy启动模式下进入所述内存操作系统。故所述内存操作系统在启动前预先判定服务器中BIOS的启动模式以便于所述内存操作系统能在该服务器中正常启动。Determine the startup mode of the preset basic input output system. Specifically, the Basic Input Output System (BIOS, Basic Input Output System) is a set of programs that are solidified on a ROM chip on the motherboard of the computer, which saves the most important basic input and output programs of the computer, the self-check program and the system after booting. The self-starting program can read and write the specific information of the system settings from CMOS (Complementary Metal Oxide, RAM chip that can be read and written). The main function of BIOS is to provide the computer with the lowest and most direct hardware settings and control. The boot mode of the BIOS includes both the traditional Legacy boot mode and the UEFI boot mode, that is, when the BIOS boot mode is the Legacy boot mode, the memory operating system can only be entered in the Legacy boot mode; when the BIOS boot mode When it is the Legacy boot mode, the memory operating system can only be entered in the Legacy boot mode. Therefore, the memory operating system pre-determines the startup mode of the BIOS in the server before starting, so that the memory operating system can be normally started in the server.
S130、若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统。S130: If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode, and load the preset first kernel file according to the first boot file to run the memory operating system.
若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统。具体的,服务器在判断出该服务器中BIOS的启动模式为Legacy启动模式后,根据所述Legacy启动模式来获取与所述内存操作系统相对应的第一引导文件和第一内核文件,并通过所述第一引导文件加载所述第一内核文件以运行所述内存操作系统。在本实施例中,所述第一引导文件为SYSLINUX.CFG引导文件,所述第一内核文件为CentOS6系列内核文件,服务器中的BOIS通过SYSLINUX.CFG引导文件加载CentOS6系列内核文件便可运行所述内存操作系统。If the startup mode is the Legacy startup mode, obtain the preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system. Specifically, after the server determines that the boot mode of the BIOS in the server is the Legacy boot mode, it obtains the first boot file and the first kernel file corresponding to the memory operating system according to the Legacy boot mode, and passes the The first boot file loads the first kernel file to run the memory operating system. In this embodiment, the first boot file is the SYSLINUX.CFG boot file, and the first kernel file is the CentOS6 series kernel file. The BOIS in the server can be run by loading the CentOS6 series kernel file through the SYSLINUX.CFG boot file. The memory operating system.
S140、若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。S140: If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。具体的,服务器在判断出该服务器中BIOS的启动模式为UEFI启动模式后,根据所述UEFI启动模式来获取与所述内存操作系统相对应的第二引导文件和第二内核文件,并通过所述第二引导文件加载所述第二内核文件以运行所述内存操作系统。在本实施例中,所述第二引导文件为GRUB.CFG引导文件,所述第一内核文件为CentOS7系列内核文件,服务器中的BOIS通过GRUB.CFG引导文件加载CentOS7系列内核文件便可运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system. Specifically, after the server determines that the boot mode of the BIOS in the server is the UEFI boot mode, it obtains the second boot file and the second kernel file corresponding to the memory operating system according to the UEFI boot mode, and passes all the boot files. The second boot file loads the second kernel file to run the memory operating system. In this embodiment, the second boot file is the GRUB.CFG boot file, the first kernel file is the CentOS7 series kernel file, and the BOIS in the server can be run by loading the CentOS7 series kernel file through the GRUB.CFG boot file. The memory operating system.
在一实施例中,步骤S140之后还包括:根据预置的采集工具在所述内存操作系统中采集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中。In an embodiment, after step S140, the method further includes: collecting data interacting with the memory operating system in the memory operating system according to a preset collection tool and storing the collected data in a preset database.
根据预置的采集工具在所述内存操作系统中采集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中。其中,所述采集工具为用于采集与所述内存操作系统进行交互时的数据,该采集的数据既包括所述内存操作系统运行时所处的服务器中软硬件的数据,也包括与所述服务器进行数据传输和接收的数据。由于关闭所述内存操作系统后,所述内存操作系统无法将所述检测工具采集到的数据进行保存,因此所述采集工具采集到与所述内存操作系统进行交互后的数据后,将所述采集的数据保存预设的数据库中以防止所述内存操作系统关闭后所述采集的数据的丢失。具体的,所述内存操作系统在启动运行后,便可自动启动Agent服务,并通过python脚本采集与所述内存操作系统进行交互后的数据,Python脚本采集到所述采集的数据后,所述内存操作系统将所述采集的数据上传到预设的数据库中。Collect data interacting with the memory operating system in the memory operating system according to a preset collection tool and store the collected data in a preset database. Wherein, the collection tool is used to collect data when interacting with the memory operating system. The collected data includes not only the software and hardware data of the server where the memory operating system is running, but also the communication with the server. Perform data transmission and receive data. Since the memory operating system cannot save the data collected by the detection tool after the memory operating system is closed, after the collection tool collects the data after interacting with the memory operating system, the The collected data is saved in a preset database to prevent the loss of the collected data after the memory operating system is shut down. Specifically, after the memory operating system is started and running, the Agent service can be automatically started, and data after interaction with the memory operating system is collected through a python script. After the Python script collects the collected data, the The memory operating system uploads the collected data to a preset database.
在一实施例中,如图2所示,所述根据预置的采集工具在所述内存操作系统中采集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中包括:步骤S151和S152。In an embodiment, as shown in FIG. 2, the collected data interacting with the memory operating system is collected in the memory operating system according to the preset collection tool and the collected data is stored in a preset database Including: steps S151 and S152.
S151、将所述采集的数据写入预设的区块链中。S151. Write the collected data into a preset blockchain.
将所述采集的数据写入预设的区块链中。其中,所述区块链为用于存储所述采集的数据,所述区块链(Blockchain)是分布式数据存储、点对点传输、共识机制、加密算法等计算机技 术的新型应用模式,其本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块并能有效防止数据泄露或非法篡改,因此,在本实施例中所述采集的数据存储在预设的区块链中。Write the collected data into a preset blockchain. Wherein, the blockchain is used to store the collected data, and the blockchain is a new application mode of computer technology such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc., which is essentially It is a decentralized database. It is a series of data blocks that are generated using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity (anti-counterfeiting) and generation of the information. The next block can effectively prevent data leakage or illegal tampering. Therefore, the collected data in this embodiment is stored in a preset block chain.
在一实施例中,如图3所示,步骤S151包括子步骤S1511、S1512和S1513。In an embodiment, as shown in FIG. 3, step S151 includes sub-steps S1511, S1512, and S1513.
S1511、识别所述采集的数据的结构类型。S1511. Identify the structure type of the collected data.
识别所述采集的数据的结构类型。具体的,所述采集的数据的结构类型包括结构化数据和非结构化数据,其中,所述结构化数据也称作行数据,是由二维表结构来逻辑表达和实现的数据,严格地遵循数据格式与长度规范,主要通过关系型数据库进行存储和管理。所述非结构化数据是数据结构不规则或不完整,没有预定义的数据模型,即不方便用数据库二维逻辑表来表现的数据。所述非结构化数据包括所有格式的办公文档、文本、图片、XML,HTML、各类报表、图像和音频/视频信息等数据。通过对所述采集的数据的结构类型进行识别以便于后续根据所述采集的数据的结构类型进行不同方式的加密并存储到所述区块链中。例如,若所述采集的数据为结构化数据,则将所述采集的数据使用椭圆曲线算法或非对称加密算法进行加密并存储到所述区块链中;若所述采集的数据为非结构化数据,则将所述采集的数据进行哈希计算生成相应的数字指纹并将生成相应的数字指纹进行加密以存储到所述区块链中。Identify the structure type of the collected data. Specifically, the structure types of the collected data include structured data and unstructured data. The structured data is also called row data, which is logically expressed and realized by a two-dimensional table structure, strictly Follow the data format and length specification, mainly through the relational database for storage and management. The unstructured data is data whose data structure is irregular or incomplete, and there is no predefined data model, that is, data that is not convenient to be represented by a two-dimensional logical table of a database. The unstructured data includes all formats of office documents, text, pictures, XML, HTML, various reports, images and audio/video information and other data. The structure type of the collected data is identified so as to be subsequently encrypted in different ways according to the structure type of the collected data and stored in the blockchain. For example, if the collected data is structured data, the collected data is encrypted using an elliptic curve algorithm or an asymmetric encryption algorithm and stored in the blockchain; if the collected data is unstructured To convert the data, the collected data is hashed to generate a corresponding digital fingerprint, and the generated corresponding digital fingerprint is encrypted to be stored in the blockchain.
S1512、根据所述采集的数据的结构类型对所述采集的数据进行加密以得到加密后的数据。S1512. Encrypt the collected data according to the structure type of the collected data to obtain encrypted data.
根据所述采集的数据的结构类型对所述采集的数据进行加密以得到加密后的数据。其中,通过对所述采集的数据的结构类型进行识别以得到所述采集的数据的结构类型,进而便于后续根据所述采集的数据的结构类型进行不同方式的加密并存储到所述区块链中。例如,若所述采集的数据为结构化数据,则将所述采集的数据使用椭圆曲线算法或非对称加密算法进行加密并存储到所述区块链中;若所述采集的数据为非结构化数据,则将所述采集的数据进行哈希计算生成相应的数字指纹并将生成相应的数字指纹进行加密以存储到所述区块链中。The collected data is encrypted according to the structure type of the collected data to obtain encrypted data. Wherein, the structure type of the collected data is obtained by identifying the structure type of the collected data, which is convenient for subsequent encryption and storage in the blockchain in different ways according to the structure type of the collected data in. For example, if the collected data is structured data, the collected data is encrypted using an elliptic curve algorithm or an asymmetric encryption algorithm and stored in the blockchain; if the collected data is unstructured To convert the data, the collected data is hashed to generate a corresponding digital fingerprint, and the generated corresponding digital fingerprint is encrypted to be stored in the blockchain.
S1513、将所述加密后的数据写入所述区块链中。S1513. Write the encrypted data into the blockchain.
S152、将所述区块链中区块的数据存储至所述数据库中。S152. Store the data of the blocks in the blockchain into the database.
将所述区块链中区块的数据存储至所述数据库中。其中,所述区块链中的区块包括区块头和区块体,所述区块头包含前一区块的地址和时间戳,所述时间戳用于表示所述区块的创建时间,所述区块体包含所述加密后的数据,即所述区块链中区块的数据既包括区块头中的数据,也包括区块体中的数据。由于本申请中的区块链底层的数据存储系统使用的是LevelDB,它是一种写密集型应用而设计的数据存储系统,是以牺牲数据读取性能为代价换取写性能的提高。然而本申请中所述内存操作系统所采集的数据用于对预置的第三方系统所采集的数据进行校验,预置的第三方系统需要频繁的对所述采集的数据进行读取查询,限制了对所述采集的数据的查询及分析效率。因此,将所述区块链中区块的数据存储至所述数据库中以便于预置的第三方系统对所述采集的数据进行快速的查询和分析。The data of the blocks in the blockchain is stored in the database. Wherein, the block in the blockchain includes a block header and a block body. The block header contains the address and timestamp of the previous block, and the timestamp is used to indicate the creation time of the block. The block body includes the encrypted data, that is, the data of the block in the blockchain includes both the data in the block header and the data in the block body. Since the underlying data storage system of the blockchain in this application uses LevelDB, which is a data storage system designed for write-intensive applications, it sacrifices data read performance in exchange for improved write performance. However, the data collected by the memory operating system described in this application is used to verify the data collected by a preset third-party system, and the preset third-party system needs to frequently read and query the collected data. The efficiency of query and analysis of the collected data is limited. Therefore, the data of the blocks in the blockchain is stored in the database so that a preset third-party system can quickly query and analyze the collected data.
在另一实施例中,所述根据预置的采集工具在所述内存操作系统中采集与所述内存操作 系统进行交互的数据并将采集的数据存储至预设的数据库中之后还包括:根据所述采集的数据更新预置的第三方系统。In another embodiment, after collecting data interacting with the memory operating system in the memory operating system according to the preset collection tool and storing the collected data in a preset database, the method further includes: The collected data updates the preset third-party system.
根据所述采集的数据更新预置的第三方系统。具体的,所述第三方系统为与所述内存操作系统进行交互且面向用户的系统并可与所述内存操作系统进行数据传输和接收,用户可通过所述第三方系统与所述内存操作系统进行交互。由于所述第三方系统为面向用户的系统,用户通过操作所述第三方系统来实现与所述内存操作系统进行交互。在本实施例中,所述第三方系统为BMP(Bank Merchant Pos)系统。当用户在操作所述第三方系统的过程中,由于用户可能会在所述第三方系统中出现操作失误,通过所述采集的数据便可对用户在所述第三方系统上的失误操作进行查询以便于修复用户在所述第三方系统上的因操作不当出现失误的问题,并对所述第三方系统在所述用户上采集的数据进行修复以更新所述第三方系统。Update the preset third-party system according to the collected data. Specifically, the third-party system is a user-oriented system that interacts with the memory operating system and can transmit and receive data with the memory operating system. The user can communicate with the memory operating system through the third-party system. To interact. Since the third-party system is a user-oriented system, the user can interact with the memory operating system by operating the third-party system. In this embodiment, the third-party system is a BMP (Bank Merchant Pos) system. When the user is operating the third-party system, since the user may make operational errors in the third-party system, the collected data can be used to inquire about the user's erroneous operations on the third-party system In order to repair the user's error on the third-party system due to improper operation, and repair the data collected by the third-party system on the user to update the third-party system.
在一实施例中,如图4所示,所述根据所述采集的数据更新预置的第三方系统包括:步骤S161、步骤S162和步骤S163。In an embodiment, as shown in FIG. 4, the updating of the preset third-party system based on the collected data includes: step S161, step S162, and step S163.
S161、根据所述第三方系统从所述数据库中获取所述采集的数据。S161. Obtain the collected data from the database according to the third-party system.
根据所述第三方系统从所述数据库中获取所述采集的数据。具体的,所述第三方系统与所述数据库连接并可与所述数据库进行数据传输和接收,即可从所述数据库中获取所述内存操作系统采集的数据。所述第三方系统从所述数据库中获取所述采集的数据之前,所述第三方系统与所述内存操作系统具有相同的数据收集功能,所述第三方系统收集的数据为用户在该第三方系统上进行操作时的数据,将从所述数据库中采集到的数据与用户在该第三方系统上进行操作时的数据进行对比以便于所述第三方系统以便于所述第三方系统查询出所述第三方系统在采集用户的失误操作的异常数据。Obtaining the collected data from the database according to the third-party system. Specifically, the third-party system is connected to the database and can perform data transmission and reception with the database, and the data collected by the memory operating system can be obtained from the database. Before the third-party system obtains the collected data from the database, the third-party system and the memory operating system have the same data collection function, and the data collected by the third-party system is the user’s The data during the operation on the system is compared with the data collected from the database and the data when the user operates on the third-party system, so that the third-party system can make it easier for the third-party system to query the office. The third-party system is collecting abnormal data of the user's misoperation.
S162、将所述采集的数据与所述第三方系统收集的数据进行对比以得到所述采集的数据与所述第三方系统收集的数据是否一致的结果。S162. Compare the collected data with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system.
将所述采集的数据与所述第三方系统收集的数据进行对比以得到所述采集的数据与所述第三方系统收集的数据是否一致的结果。具体的,所述第三方系统自行收集的数据为用户在所述第三方系统上操作时的数据,该数据通过所述第三方系统存储在另一预设的数据库中,当所述第三方系统需要查询该数据是否因用户的操作不当出现的异常或在采集用户操作的数据的过程中出现的异常时,通过所述内存操作系统采集的数据与所述第三方系统自行采集的数据进行比对以查询所述第三方系统自行采集的数据是否一致,进而判断处所述第三方系统自行采集的数据是否发生异常,以便于对所述第三系统自行采集的数据进行修复。The collected data is compared with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system. Specifically, the data collected by the third-party system itself is data when the user operates on the third-party system, and the data is stored in another preset database through the third-party system. When the third-party system When it is necessary to query whether the data is abnormal due to improper operation of the user or an abnormality occurred in the process of collecting the data of the user operation, the data collected through the memory operating system is compared with the data collected by the third-party system. To query whether the data collected by the third-party system is consistent, and then determine whether the data collected by the third-party system is abnormal, so as to repair the data collected by the third system.
S163、若所述采集的数据与所述第三方系统收集的数据不一致,将所述第三方系统收集的数据替换成所述采集的数据以更新所述第三方系统。S163: If the collected data is inconsistent with the data collected by the third-party system, replace the data collected by the third-party system with the collected data to update the third-party system.
若所述采集的数据与所述第三方系统收集的数据不一致,将所述第三方系统收集的数据替换成所述采集的数据以更新所述第三方系统。具体的,当所述第三方系统查询出所述第三方系统自行采集的数据与从所述内存操作系统处采集的数据不一致时,则可判定所述第三方系统采集的数据出现异常,通过将从所述内存操作系统处采集的数据对所述第三方系统自行采集的数据进行替换便可对所述第三方系统自行采集到的异常数据进行修复,以使得所述第 三方系统自行采集的数据与所述内存操作系统采集的数据保持一致。If the collected data is inconsistent with the data collected by the third-party system, replace the data collected by the third-party system with the collected data to update the third-party system. Specifically, when the third-party system inquires that the data collected by the third-party system is inconsistent with the data collected from the memory operating system, it can be determined that the data collected by the third-party system is abnormal, and the data collected by the third-party system is abnormal. The data collected from the memory operating system can be replaced with the data collected by the third-party system to repair the abnormal data collected by the third-party system, so that the data collected by the third-party system can be repaired. Keep consistent with the data collected by the memory operating system.
本申请中的技术方法可应用于智慧政务/智慧城管/智慧社区/智慧安防/智慧物流/智慧医疗/智慧教育/智慧环保/智慧交通等包含进行数据采集的内存操作系统的应用场景中,从而推动智慧城市的建设。The technical methods in this application can be applied to application scenarios of smart government affairs/smart city management/smart community/smart security/smart logistics/smart healthcare/smart education/smart environmental protection/smart transportation that include a memory operating system for data collection, thereby Promote the construction of smart cities.
本申请实施例还提供了一种用于数据采集的内存操作系统的启动装置100,该装置用于执行前述用于数据采集的内存操作系统的启动方法的任一实施例。具体地,请参阅图5,图5是本申请实施例提供的用于数据采集的内存操作系统的启动装置100的示意性框图。The embodiment of the present application also provides a device 100 for starting a memory operating system for data collection, and the device is used to execute any embodiment of the aforementioned method for starting a memory operating system for data collection. Specifically, please refer to FIG. 5, which is a schematic block diagram of a device 100 for starting a memory operating system for data collection according to an embodiment of the present application.
如图5所示,所述的用于数据采集的内存操作系统的启动装置100,该装置包括接收单元110、判断单元120、第一运行单元130、第二运行单元140。As shown in FIG. 5, the device 100 for starting a memory operating system for data collection includes a receiving unit 110, a judgment unit 120, a first running unit 130, and a second running unit 140.
接收单元110,用于接收启动所述内存操作系统的启动请求。The receiving unit 110 is configured to receive a start request for starting the memory operating system.
在其他申请实施例中,所述的用于数据采集的内存操作系统的启动装置100还包括挂载单元110a。In other application embodiments, the device 100 for starting a memory operating system for data collection further includes a mounting unit 110a.
挂载单元110a,用于挂载预置的ISO镜像文件,其中,所述ISO镜像文件包括所述第一内核文件、所述第二内核文件、所述第一引导文件和所述第二引导文件。The mounting unit 110a is configured to mount a preset ISO image file, where the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file.
判断单元120,用于判断预置的基本输入输出系统的启动模式。The judging unit 120 is used to judge the startup mode of the preset basic input output system.
第一运行单元130,用于若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统。The first running unit 130 is configured to, if the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run The memory operating system.
第二运行单元140,用于若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。The second running unit 140 is configured to, if the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run The memory operating system.
在其他申请实施例中,所述的用于数据采集的内存操作系统的启动装置100还包括第一存储单元150。In other application embodiments, the device 100 for starting a memory operating system for data collection further includes a first storage unit 150.
第一存储单元150,用于根据预置的采集工具在所述内存操作系统中收集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中。The first storage unit 150 is configured to collect data interacting with the memory operating system in the memory operating system according to a preset collection tool and store the collected data in a preset database.
在其他申请实施例中,如图6所示,所述第一存储单元150包括写入单元151和第二存储单元152。In other application embodiments, as shown in FIG. 6, the first storage unit 150 includes a writing unit 151 and a second storage unit 152.
第一写入单元151,用于将所述采集的数据写入预设的区块链中。The first writing unit 151 is configured to write the collected data into a preset blockchain.
在其他申请实施例中,如图7所示,所述第一写入单元151包括识别单元1511、加密单元1512和第二写入单元1513。In other application embodiments, as shown in FIG. 7, the first writing unit 151 includes an identification unit 1511, an encryption unit 1512 and a second writing unit 1513.
识别单元1511,用于识别所述采集的数据的结构类型。The identification unit 1511 is used to identify the structure type of the collected data.
加密单元1512,用于根据所述采集的数据的结构类型对所述采集的数据进行加密以得到加密后的数据。The encryption unit 1512 is configured to encrypt the collected data according to the structure type of the collected data to obtain encrypted data.
第二写入单元1513,用于将所述加密后的数据写入所述区块链中。The second writing unit 1513 is configured to write the encrypted data into the blockchain.
第二存储单元152,用于将所述区块链中区块的数据存储至所述数据库中。The second storage unit 152 is configured to store data of blocks in the blockchain into the database.
在其他申请实施例中,所述的用于数据采集的内存操作系统的启动装置100还包括更新 单元160。In other embodiments of the application, the device 100 for starting a memory operating system for data collection further includes an update unit 160.
更新单元160,用于根据所述采集的数据更新预置的第三方系统。The update unit 160 is configured to update a preset third-party system according to the collected data.
在其他申请实施例中,如图8所示,所述更新单元160包括:采集单元161、对比单元162和替换单元163。In other application embodiments, as shown in FIG. 8, the update unit 160 includes: an acquisition unit 161, a comparison unit 162, and a replacement unit 163.
获取单元161,用于根据所述第三方系统从所述数据库中获取所述采集的数据。The obtaining unit 161 is configured to obtain the collected data from the database according to the third-party system.
对比单元162,用于将所述数据与所述第三方系统收集的数据进行对比以得到所述采集的数据与所述第三方系统收集的数据是否一致的结果。The comparison unit 162 is configured to compare the data with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system.
替换单元163,用于若所述采集的数据与所述第三方系统收集的数据不一致,将所述第三方系统收集的数据替换成所述采集的数据以更新所述第三方系统。The replacement unit 163 is configured to, if the collected data is inconsistent with the data collected by the third-party system, replace the data collected by the third-party system with the collected data to update the third-party system.
请参阅图9,图9是本申请实施例提供的计算机设备的示意性框图。Please refer to FIG. 9, which is a schematic block diagram of a computer device according to an embodiment of the present application.
参阅图9,该设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。Referring to FIG. 9, the device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行用于数据采集的内存操作系统的启动方法。该处理器502用于提供计算和控制能力,支撑整个设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行用于数据采集的内存操作系统的启动方法。该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的设备500的限定,具体的设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute the method for starting the memory operating system for data collection. The processor 502 is used to provide computing and control capabilities, and support the operation of the entire device 500. The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the startup method of the memory operating system for data collection. . The network interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the device 500 to which the solution of the present application is applied. The specific device 500 may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现上述用于数据采集的内存操作系统的启动方法的任一实施例。Wherein, the processor 502 is configured to run a computer program 5032 stored in a memory, so as to implement any embodiment of the above-mentioned method for starting a memory operating system for data collection.
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器502、数字信号处理器502(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器502可以是微处理器502或者该处理器502也可以是任何常规的处理器502等。It should be understood that, in this embodiment of the application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors 502, or digital signal processors 502 (Digital Signal Processors, DSPs). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor 502 may be a microprocessor 502 or the processor 502 may also be any conventional processor 502 and the like.
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序可存储于一存储介质中,该存储介质可以为计算机可读存储介质。该计算机程序被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments may be implemented by computer programs instructing relevant hardware. The computer program may be stored in a storage medium, and the storage medium may be a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiment.
因此,本申请还提供了一种计算机可读存储介质。该计算机可读存储介质可以是非易失性,也可以是易失性。该存储介质存储有计算机程序,该计算机程序当被处理器执行时实现上述用于数据采集的内存操作系统的启动方法的任一实施例。Therefore, this application also provides a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile. The storage medium stores a computer program, which, when executed by a processor, implements any embodiment of the above-mentioned method for starting a memory operating system for data collection.
该计算机可读存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk, and other media that can store program codes.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment, and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, and the division of the units is only a logical function division, and there may be other division methods in actual implementation. Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working processes of the devices, equipment and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here. The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种用于数据采集的内存操作系统的启动方法,其中,包括以下步骤:A method for starting a memory operating system for data collection, which includes the following steps:
    接收启动所述内存操作系统的启动请求;Receiving a start request for starting the memory operating system;
    判断预置的基本输入输出系统的启动模式;Determine the startup mode of the preset basic input and output system;
    若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system;
    若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
  2. 根据权利要求1所述的用于数据采集的内存操作系统的启动方法,其中,所述接收启动所述内存操作系统的启动请求之前,还包括:The method for starting a memory operating system for data collection according to claim 1, wherein before the receiving a starting request for starting the memory operating system, the method further comprises:
    挂载预置的ISO镜像文件,其中,所述ISO镜像文件包括所述第一内核文件、所述第二内核文件、所述第一引导文件和所述第二引导文件。Mount a preset ISO image file, where the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file.
  3. 根据权利要求1所述的用于数据采集的内存操作系统的启动方法,其中,所述运行所述内存操作系统之后,还包括:The method for starting a memory operating system for data collection according to claim 1, wherein after the running of the memory operating system, the method further comprises:
    根据预置的采集工具在所述内存操作系统中采集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中。Collect data interacting with the memory operating system in the memory operating system according to a preset collection tool and store the collected data in a preset database.
  4. 根据权利要求3所述的用于数据采集的内存操作系统的启动方法,其中,所述将采集的数据存储至预设的数据库中,包括:The method for starting a memory operating system for data collection according to claim 3, wherein said storing the collected data in a preset database comprises:
    将所述采集的数据写入预设的区块链中;Write the collected data into a preset blockchain;
    将所述区块链中区块的数据存储至所述数据库中。The data of the blocks in the blockchain is stored in the database.
  5. 根据权利要求4所述的用于数据采集的内存操作系统的启动方法,其中,所述将所述采集的数据写入预设的区块链中,包括:The method for starting a memory operating system for data collection according to claim 4, wherein said writing the collected data into a preset blockchain comprises:
    识别所述采集的数据的结构类型;Identify the structure type of the collected data;
    根据所述采集的数据的结构类型对所述采集的数据进行加密以得到加密后的数据;Encrypting the collected data according to the structure type of the collected data to obtain encrypted data;
    将所述加密后的数据写入所述区块链中。The encrypted data is written into the blockchain.
  6. 根据权利要求3所述的用于数据采集的内存操作系统的启动方法,其中,所述将采集的数据存储至预设的数据库中之后,还包括:The method for starting a memory operating system for data collection according to claim 3, wherein, after storing the collected data in a preset database, the method further comprises:
    根据所述采集的数据更新预置的第三方系统。Update the preset third-party system according to the collected data.
  7. 根据权利要求6所述的用于数据采集的内存操作系统的启动方法,其中,所述根据所述采集的数据更新预置的第三方系统,包括:The method for starting a memory operating system for data collection according to claim 6, wherein said updating a preset third-party system according to the collected data comprises:
    根据所述第三方系统从所述数据库中获取所述采集的数据;Acquiring the collected data from the database according to the third-party system;
    将所述采集的数据与所述第三方系统收集的数据进行对比以得到所述采集的数据与所述第三方系统收集的数据是否一致的结果;Comparing the collected data with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system;
    若所述采集的数据与所述第三方系统收集的数据不一致,将所述第三方系统收集的数据替换成所述采集的数据以更新所述第三方系统。If the collected data is inconsistent with the data collected by the third-party system, replace the data collected by the third-party system with the collected data to update the third-party system.
  8. 一种用于数据采集的内存操作系统的启动装置,其中,包括:A starting device for a memory operating system for data collection, which includes:
    接收单元,用于接收启动所述内存操作系统的启动请求;A receiving unit, configured to receive a start request for starting the memory operating system;
    判断单元,用于判断预置的基本输入输出系统的启动模式;The judging unit is used to judge the startup mode of the preset basic input output system;
    第一运行单元,用于若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;The first running unit is configured to, if the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run all The memory operating system;
    第二运行单元,用于若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。The second running unit is configured to, if the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run all The memory operating system.
  9. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行以下步骤:A computer device includes a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the following steps when the computer program is executed:
    接收启动所述内存操作系统的启动请求;Receiving a start request for starting the memory operating system;
    判断预置的基本输入输出系统的启动模式;Determine the startup mode of the preset basic input and output system;
    若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system;
    若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
  10. 根据权利要求9所述的计算机设备,其中,所述接收启动所述内存操作系统的启动请求之前,还包括:9. The computer device according to claim 9, wherein before the receiving a start request for starting the memory operating system, the method further comprises:
    挂载预置的ISO镜像文件,其中,所述ISO镜像文件包括所述第一内核文件、所述第二内核文件、所述第一引导文件和所述第二引导文件。Mount a preset ISO image file, where the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file.
  11. 根据权利要求9所述的计算机设备,其中,所述运行所述内存操作系统之后,还包括:The computer device according to claim 9, wherein after said running said memory operating system, further comprising:
    根据预置的采集工具在所述内存操作系统中采集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中。Collect data interacting with the memory operating system in the memory operating system according to a preset collection tool and store the collected data in a preset database.
  12. 根据权利要求11所述的计算机设备,其中,所述将采集的数据存储至预设的数据库中,包括:The computer device according to claim 11, wherein said storing the collected data in a preset database comprises:
    将所述采集的数据写入预设的区块链中;Write the collected data into a preset blockchain;
    将所述区块链中区块的数据存储至所述数据库中。The data of the blocks in the blockchain is stored in the database.
  13. 根据权利要求12所述的计算机设备,其中,所述将所述采集的数据写入预设的区块链中,包括:The computer device according to claim 12, wherein said writing the collected data into a preset blockchain comprises:
    识别所述采集的数据的结构类型;Identify the structure type of the collected data;
    根据所述采集的数据的结构类型对所述采集的数据进行加密以得到加密后的数据;Encrypting the collected data according to the structure type of the collected data to obtain encrypted data;
    将所述加密后的数据写入所述区块链中。The encrypted data is written into the blockchain.
  14. 根据权利要求11所述的计算机设备,其中,所述将采集的数据存储至预设的数据库中之后,还包括:The computer device according to claim 11, wherein, after storing the collected data in a preset database, the method further comprises:
    根据所述采集的数据更新预置的第三方系统。Update the preset third-party system according to the collected data.
  15. 根据权利要求14所述的计算机设备,其中,所述根据所述采集的数据更新预置的第三方系统,包括:The computer device according to claim 14, wherein said updating a preset third-party system according to said collected data comprises:
    根据所述第三方系统从所述数据库中获取所述采集的数据;Acquiring the collected data from the database according to the third-party system;
    将所述采集的数据与所述第三方系统收集的数据进行对比以得到所述采集的数据与所述第三方系统收集的数据是否一致的结果;Comparing the collected data with the data collected by the third-party system to obtain a result of whether the collected data is consistent with the data collected by the third-party system;
    若所述采集的数据与所述第三方系统收集的数据不一致,将所述第三方系统收集的数据替换成所述采集的数据以更新所述第三方系统。If the collected data is inconsistent with the data collected by the third-party system, replace the data collected by the third-party system with the collected data to update the third-party system.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are executed:
    接收启动所述内存操作系统的启动请求;Receiving a start request for starting the memory operating system;
    判断预置的基本输入输出系统的启动模式;Determine the startup mode of the preset basic input and output system;
    若所述启动模式为Legacy启动模式,根据所述Legacy启动模式获取预置的第一引导文件并根据所述第一引导文件加载预置的第一内核文件以运行所述内存操作系统;If the startup mode is the Legacy startup mode, obtain a preset first boot file according to the Legacy startup mode and load the preset first kernel file according to the first boot file to run the memory operating system;
    若所述启动模式为UEFI启动模式,根据所述UEFI启动模式获取预置的第二引导文件并根据所述第二引导文件加载预置的第二内核文件以运行所述内存操作系统。If the boot mode is the UEFI boot mode, obtain a preset second boot file according to the UEFI boot mode and load the preset second kernel file according to the second boot file to run the memory operating system.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述接收启动所述内存操作系统的启动请求之前,还包括:15. The computer-readable storage medium according to claim 16, wherein before the receiving a start request to start the memory operating system, the method further comprises:
    挂载预置的ISO镜像文件,其中,所述ISO镜像文件包括所述第一内核文件、所述第二内核文件、所述第一引导文件和所述第二引导文件。Mount a preset ISO image file, where the ISO image file includes the first kernel file, the second kernel file, the first boot file, and the second boot file.
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述运行所述内存操作系统之后,还包括:The computer-readable storage medium according to claim 16, wherein, after said running the memory operating system, further comprising:
    根据预置的采集工具在所述内存操作系统中采集与所述内存操作系统进行交互的数据并将采集的数据存储至预设的数据库中。Collect data interacting with the memory operating system in the memory operating system according to a preset collection tool and store the collected data in a preset database.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述将采集的数据存储至预设的数据库中,包括:The computer-readable storage medium according to claim 18, wherein said storing the collected data in a preset database comprises:
    将所述采集的数据写入预设的区块链中;Write the collected data into a preset blockchain;
    将所述区块链中区块的数据存储至所述数据库中。The data of the blocks in the blockchain is stored in the database.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述将所述采集的数据写入预设的区块链中,包括:The computer-readable storage medium according to claim 19, wherein said writing the collected data into a preset blockchain comprises:
    识别所述采集的数据的结构类型;Identify the structure type of the collected data;
    根据所述采集的数据的结构类型对所述采集的数据进行加密以得到加密后的数据;Encrypting the collected data according to the structure type of the collected data to obtain encrypted data;
    将所述加密后的数据写入所述区块链中。The encrypted data is written into the blockchain.
PCT/CN2020/125062 2020-07-20 2020-10-30 Method and apparatus for starting ram os for data collection WO2021139355A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010698856.6A CN111831346B (en) 2020-07-20 2020-07-20 Method and device for starting memory operating system for data acquisition
CN202010698856.6 2020-07-20

Publications (1)

Publication Number Publication Date
WO2021139355A1 true WO2021139355A1 (en) 2021-07-15

Family

ID=72923318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125062 WO2021139355A1 (en) 2020-07-20 2020-10-30 Method and apparatus for starting ram os for data collection

Country Status (2)

Country Link
CN (1) CN111831346B (en)
WO (1) WO2021139355A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311832A (en) * 2023-11-29 2023-12-29 苏州元脑智能科技有限公司 PCIE equipment starting mode display method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111831346B (en) * 2020-07-20 2023-06-09 平安科技(深圳)有限公司 Method and device for starting memory operating system for data acquisition

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130138941A1 (en) * 2011-11-28 2013-05-30 Samsung Electronics Co., Ltd. Method and apparatus to control booting of computer system
US20170085384A1 (en) * 2014-05-30 2017-03-23 Kabushiki Kaisha Toshiba Information processing device and version switching method of trusted platform module
CN108614718A (en) * 2018-04-25 2018-10-02 紫光华山信息技术有限公司 The method, apparatus and realization device of start-up operation system
US20190095221A1 (en) * 2017-09-26 2019-03-28 Dell Products, Lp Boot Disk Detection and Management in an Information Handling System Manufacturing Environment
CN110737479A (en) * 2019-09-04 2020-01-31 平安科技(深圳)有限公司 method for starting operating system without disk, server and readable storage medium
CN111831346A (en) * 2020-07-20 2020-10-27 平安科技(深圳)有限公司 Starting method and device of memory operating system for data acquisition

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810430B (en) * 2012-11-13 2018-02-27 联想(北京)有限公司 The method and electronic equipment of a kind of control electronics
US9672047B1 (en) * 2014-10-31 2017-06-06 American Megatrends, Inc. Systems and methods for accessing a bootable partition on a serial peripheral interface device
CN109002346B (en) * 2018-07-10 2022-04-15 广东微云科技股份有限公司 Conversion method of Windows virtual machine bootstrap program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130138941A1 (en) * 2011-11-28 2013-05-30 Samsung Electronics Co., Ltd. Method and apparatus to control booting of computer system
US20170085384A1 (en) * 2014-05-30 2017-03-23 Kabushiki Kaisha Toshiba Information processing device and version switching method of trusted platform module
US20190095221A1 (en) * 2017-09-26 2019-03-28 Dell Products, Lp Boot Disk Detection and Management in an Information Handling System Manufacturing Environment
CN108614718A (en) * 2018-04-25 2018-10-02 紫光华山信息技术有限公司 The method, apparatus and realization device of start-up operation system
CN110737479A (en) * 2019-09-04 2020-01-31 平安科技(深圳)有限公司 method for starting operating system without disk, server and readable storage medium
CN111831346A (en) * 2020-07-20 2020-10-27 平安科技(深圳)有限公司 Starting method and device of memory operating system for data acquisition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311832A (en) * 2023-11-29 2023-12-29 苏州元脑智能科技有限公司 PCIE equipment starting mode display method, device, equipment and medium
CN117311832B (en) * 2023-11-29 2024-02-20 苏州元脑智能科技有限公司 PCIE equipment starting mode display method, device, equipment and medium

Also Published As

Publication number Publication date
CN111831346A (en) 2020-10-27
CN111831346B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
US9104574B2 (en) System and method for software application remediation
TWI450103B (en) Remote management systems and methods for servers, and computer program products thereof
WO2021139355A1 (en) Method and apparatus for starting ram os for data collection
WO2022063284A1 (en) Data synchronization method and apparatus, device, and computer-readable medium
US9047491B2 (en) Encryption acceleration
US20170286097A1 (en) Method to prevent operating system digital product key activation failures
TW201416853A (en) Method and system for cloud testing and remote monitoring of integrated circuit device in validation of computerized system
WO2019148727A1 (en) Electronic device, redis-based exception warning method and storage medium
CN111522703B (en) Method, apparatus and computer program product for monitoring access requests
JP5713138B1 (en) Virtual computer system, printer control system, virtual computer program, and printer control program
US11601443B2 (en) System and method for generating and storing forensics-specific metadata
CN110063042A (en) A kind of response method and its terminal of database failure
US9817731B2 (en) Acquiring diagnostic data selectively
WO2019148657A1 (en) Method for testing associated environments, electronic device and computer readable storage medium
US20100125645A1 (en) Providing aggregated directory structure
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
TWI518680B (en) Method for maintaining file system of computer system
US11321246B2 (en) Support information provisioning system
WO2019169771A1 (en) Electronic device, access instruction information acquisition method and storage medium
CN109933351A (en) A kind of method and apparatus of reparation and upgrading linux system
US9189299B2 (en) Framework for system communication for handling data
US10291700B2 (en) Network optimized scan with dynamic fallback recovery
WO2019056545A1 (en) Test machine automation management method and apparatus, device, and storage medium
WO2020199596A1 (en) Data lock-based information acquisition method and apparatus, and computer device
US20240028713A1 (en) Trust-based workspace instantiation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20911416

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20911416

Country of ref document: EP

Kind code of ref document: A1