CN116756784B - System verification method and device, electronic equipment and readable storage medium - Google Patents

System verification method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116756784B
CN116756784B CN202310582423.8A CN202310582423A CN116756784B CN 116756784 B CN116756784 B CN 116756784B CN 202310582423 A CN202310582423 A CN 202310582423A CN 116756784 B CN116756784 B CN 116756784B
Authority
CN
China
Prior art keywords
matching
configuration parameters
data
matching result
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310582423.8A
Other languages
Chinese (zh)
Other versions
CN116756784A (en
Inventor
周宏斌
张雅彬
赵海春
张炯明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanxin Information Technology Group Co ltd
Original Assignee
Yuanxin Information Technology Group Co ltd
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 Yuanxin Information Technology Group Co ltd filed Critical Yuanxin Information Technology Group Co ltd
Priority to CN202310582423.8A priority Critical patent/CN116756784B/en
Publication of CN116756784A publication Critical patent/CN116756784A/en
Application granted granted Critical
Publication of CN116756784B publication Critical patent/CN116756784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
    • 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/4411Configuring for operating with peripheral devices; Loading of device drivers

Abstract

The embodiment of the application provides a system verification method, a system verification device, electronic equipment and a readable storage medium, and relates to the technical field of operating system management. The method comprises the following steps: when an operating system starting instruction is detected, acquiring hardware verification data corresponding to a terminal, and acquiring system verification data corresponding to an operating system; generating target data to be verified based on the system verification data and the hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result; and determining consistency between the terminal and the operating system based on the matching result. According to the method and the device for verifying the consistency of the terminal, the consistency verification result is obtained by gradually completing three times of verification after starting, the consistency of the operating system and the terminal is determined through the consistency verification result, the problems of poor performance of a terminal product and the like are avoided, and legal risks are avoided.

Description

System verification method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the technical field of operating system management, and in particular, to a system verification method, a device, an electronic apparatus, and a readable storage medium.
Background
The stability of terminals such as mobile phones and computers has been the focus of attention in the research and development of terminal products. Parameters and related data of target hardware are set in the operating system, so that the operating system can customize tone quality, picture enhancement or picture cutting adjustment and the like of the display content according to the parameters and related data of the target hardware, and the terminal achieves the optimal operation effect through the interaction of the operating system and the hardware.
However, more and more users replace the hardware of the original terminal with the hardware produced or selected by a manufacturer of the non-terminal product, such as replacing a touch screen, replacing a sensor, and even replacing a memory, based on the consideration of pursuing higher performance. Because the operating system and the new hardware may have poor compatibility and other problems, the unstable running of the operating system after the hardware replacement may affect the performance of the terminal product. Meanwhile, the operating system used by the terminal product manufacturer is usually authorized based on specific hardware equipment, and the replacement of the hardware of the terminal product may infringe the rights of copyright persons of the operating system, thereby creating legal risks.
Disclosure of Invention
The embodiment of the application provides a system verification method, a system verification device, electronic equipment and a readable storage medium, which can solve the problem of consistency matching verification between terminal peripherals and an operating system. The technical proposal is as follows:
according to an aspect of an embodiment of the present application, there is provided a method for system verification, including:
when an operating system is started, acquiring hardware verification data corresponding to a terminal, and acquiring system verification data corresponding to the operating system;
wherein the hardware check data and the system check data are generated based on the configuration parameters; the configuration parameters comprise a first configuration parameter of the terminal and a second configuration parameter of the operating system;
generating target data to be verified based on the system verification data and the hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result;
and determining consistency between the terminal and the operating system based on the matching result.
According to another aspect of the embodiments of the present application, there is provided a system verification method, before detecting an operating system start instruction, further including:
acquiring configuration parameters of a terminal and an operating system, and generating check data based on the configuration parameters;
and converting the verification data to obtain hardware verification data stored in the terminal and system verification data stored in the operating system.
According to another aspect of the embodiment of the application, a system verification method is provided, wherein the matching result comprises a first matching result, a second matching result and a third matching result;
matching the target data with the verification data corresponding to the configuration parameters to generate a matching result, wherein the matching result comprises the following steps:
matching the target data to be checked with the check data corresponding to the configuration parameters to obtain a first matching result;
matching the configuration parameters acquired from the target data with the configuration parameters acquired from the check data to obtain a second matching result;
and matching the actual configuration parameters of the terminal with the configuration parameters obtained from the verification data to obtain a third matching result.
According to another aspect of the embodiments of the present application, there is provided a system verification method, including:
if the target data to be checked is completely consistent with the check data corresponding to the configuration parameters, the first matching result is successful in matching, otherwise, the first matching result is failed in matching;
the configuration parameters obtained from the target data and the configuration parameters obtained from the verification data respectively form a parameter set, if a bijection can be established between the two parameter sets, and the attributes of all the two elements belonging to different parameter sets with corresponding relations in the bijection are completely the same, the second matching result is successful matching, otherwise, the second matching result is failed matching;
the actual configuration parameters of the terminal form a first set, the configuration parameters obtained from the verification data form a second set, if a bijection can be established between the first set and a certain subset of the second set, and the attributes of all elements belonging to different sets with corresponding relations in the bijection are completely the same, the third matching result is successful matching, otherwise, the third matching result is failed matching. According to another aspect of the embodiments of the present application, there is provided a system verification method, generating verification data based on configuration parameters, including:
randomizing the configuration parameters to obtain target configuration parameters;
and formatting the target configuration parameters to obtain verification data.
According to another aspect of the embodiments of the present application, there is provided a system verification method, where randomizing a configuration parameter to obtain a target configuration parameter, including:
generating a first number of random parameter values;
randomly determining a first number of parameters to be replaced in the configuration parameters;
updating the parameter to be replaced according to the random parameter value to obtain an updated first configuration parameter;
generating random replacement information based on the position of the parameter to be replaced in the configuration parameter and the random parameter value;
and updating the random replacement information into the first configuration parameters to generate target configuration parameters.
According to another aspect of the embodiments of the present application, there is provided a system verification method, generating target data to be verified based on system verification data and hardware verification data, including:
acquiring target conversion information, and determining a target conversion mode based on the target conversion information;
determining a target conversion mode corresponding to the target conversion mode based on the target conversion mode;
and processing the hardware check data and the system check data based on the target conversion mode to obtain target data to be checked.
According to another aspect of an embodiment of the present application, there is provided a system verification apparatus, including:
the system verification data acquisition module is used for acquiring hardware verification data corresponding to the terminal and system verification data corresponding to the operating system when the operating system is started; wherein, the hardware check data and the system check data are generated by configuration parameters; the configuration parameters comprise a first configuration parameter of the terminal and a second configuration parameter of the operating system;
the data verification module is used for generating target data to be verified based on the system verification data and the hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result;
and the consistency judging module is used for determining consistency between the terminal and the operating system based on the matching result.
According to another aspect of the embodiments of the present application, there is provided an electronic device including: a memory, a processor and a computer program stored on the memory, the processor executing the computer program to perform the steps of the system verification method of any aspect of the present application.
According to yet another aspect of embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the system verification method of any aspect of the present application.
The beneficial effects that technical scheme that this application embodiment provided brought are:
according to the method and the device for verifying the terminal hardware, the consistency verification result is obtained through gradually completing multiple times of verification after the operating system of the terminal product is started, consistency of the operating system and the terminal hardware is determined through the consistency verification result, whether the hardware of the terminal is tampered or replaced is judged based on the consistency verification result, the starting of the operating system is stopped under the condition that the hardware of the terminal is tampered or replaced, and the problems of poor performance and the like of the terminal product are avoided, and legal risks are avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic diagram of an application scenario for implementing system verification according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a system verification method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a system verification method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a system verification method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a system verification method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a system verification device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device for system verification according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present application. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates at least one of the items defined by the term, e.g. "a and/or B" indicates implementation as "a", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The system verification method, the device, the electronic equipment and the readable storage medium provided by the application aim to solve the technical problems in the prior art.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
Fig. 1 is a schematic diagram of an application scenario for implementing system verification according to an embodiment of the present application, where the application scenario may include a terminal 10 configured with an operating system and a server 20, and the terminal 10 includes terminal hardware 110 and an operating system 120. The terminal hardware 110 is a generic term for each hardware device in the terminal, and specific hardware devices are not distinguished if there is no necessity in the technical solution of the present application.
Specifically, when the terminal 10 configured with the operating system 120 detects a start signal of the operating system 120, corresponding hardware check data and system check data are obtained from the terminal hardware 110 and the operating system 120, and after the check is successful, all functions of the terminal 10 are started, if the check fails, the terminal 10 is closed, a failure report is generated, and the failure report is sent to the server 20, so that a terminal developer can perform data statistics and analysis.
In the above application scenario, the terminal 10 and the server 20 communicate with each other, both the terminal hardware 110 and the operating system 120 are configured in the terminal 10, and the server 20 receives the verification report sent by the terminal 10, so that it is able to analyze whether the reason of the verification failure is malicious attack or whether the user replaces the terminal hardware, and if the user replaces the hardware of the terminal, further acquire detailed information of the hardware replaced by the user, that is, acquire data of the actual operating environment to update into the verification report before terminating the starting of the operating system. The above application scenario is only an example, and is not limited to the application scenario of the system verification method of the present application.
Those skilled in the art will appreciate that the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server or a server cluster that provides a cloud database, cloud computing, cloud storage, cloud communication, network services, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud services such as big data and an artificial intelligence platform. The terminal may be a smart phone (e.g., android phone, iOS phone, etc.), a tablet computer, a notebook computer, a digital broadcast receiver, a MID (Mobile Internet Devices, mobile internet device), a PDA (personal digital assistant), a desktop computer, a smart home appliance, a vehicle-mounted terminal (e.g., a vehicle-mounted navigation terminal, a vehicle-mounted computer, etc.), a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, but are not limited thereto. The embodiment of the invention can be applied to various scenes, including but not limited to cloud technology, artificial intelligence, intelligent transportation, auxiliary driving and the like. The specific application scenario may also be determined based on actual requirements, which is not limited herein.
In an embodiment of the present application, as shown in fig. 2, a method for checking a system is provided, where the method includes:
s10, when the operating system is started, acquiring hardware check data corresponding to the terminal, and acquiring system check data corresponding to the operating system.
The hardware check data and the system check data are generated based on configuration parameters, wherein the configuration parameters comprise a first configuration parameter of the terminal and a second configuration parameter of the operating system. The first configuration parameters of the terminal in the configuration parameters can comprise parameters such as a screen model of the terminal, screen parameters such as the highest resolution which can be supported by the screen, a core chip model, key peripheral parameters, a product model and the like which can be directly acquired according to the characteristics of the hardware of the terminal; the first configuration parameters of the terminal may further include parameters specified by the manufacturer, such as actual resolution of a display screen configured by the manufacturer of the terminal. The second configuration parameters of the operating system in the configuration parameters may include parameters of operating system processes and threads, operating system version numbers, client identifiers, operating system specific functional feature numbers, and the like.
In the implementation process, the starting state of the operating system can be judged through an operating system starting instruction, and the operating system starting instruction is a preset instruction. The operating system can acquire the hardware check data and the system check data in the starting process, for example, the Linux operating system can acquire the hardware check data by analyzing cmdline in the starting process.
In order to ensure the accuracy and the safety of the verification data, parameters used in the verification process of the application cannot be changed by a user of the terminal. In a specific implementation mode, parameters are written in the code of a verification program in the form of constant values, and the verification program and related files form a verification service after running.
S20, generating target data to be verified based on system verification data and hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result;
s30, determining consistency between the terminal and the operating system based on the matching result.
In the embodiment of the application, when an operating system is in a starting state, a verification service in the operating system acquires system verification data and hardware verification data, and converts the two parts of data according to preset target conversion information to obtain target data to be verified; the conversion mode of the system check data and the hardware check data comprises one or more of integration, decryption and reformatting. Taking an integration conversion mode as an example, after two parts of check data are respectively obtained from hardware and an operating system, if the preset integration conversion mode is parity, the hardware check data is used as odd-bit data of target data, and the system check data is used as even-bit data of the target data to be integrated, so as to generate the target data to be checked.
The matching result comprises a first matching result, a second matching result and a third matching result, and when the three matching results are successful in matching, the hardware equipment of the terminal is determined to be consistent with the operating system.
In a specific embodiment, three times of matching are sequentially performed, if the previous matching fails, starting of the operating system is directly stopped, and detailed information of the matching failure is recorded. The matching failure condition includes that the hardware of the terminal does not include hardware check data, the hardware check data format included in the hardware of the terminal is different from the system check data format, the converted target data is different from the check data, the check data is different from the actual configuration parameters, and the like, which is only exemplified by the present application and is not limited thereto.
In a specific embodiment, if the starting of the operating system is terminated, the operating system may be directly turned off, or may enter a sleep state or a suspend state. The suspending state is that the operating system suspends the executing process and temporarily transfers the process out of the memory; when the operating system is in a suspended state, the reasons of the failure in matching can be displayed on the terminal in a prompting frame, a popup window and other modes.
According to the embodiment of the application, the hardware check data and the system check data are obtained based on the related parameters of the hardware and the operating system, and the accuracy of the check result is ensured by improving the safety of the hardware check data and the system check data. The method and the device realize that the consistency check result is obtained by gradually completing the check (namely the matching) for a plurality of times after the operating system of the terminal product is started, determine the consistency of the operating system and the terminal hardware through the consistency check result, judge whether the hardware of the terminal is tampered or replaced based on the consistency check result, terminate the starting of the operating system under the condition that the hardware of the terminal is tampered or replaced, avoid the problems of poor performance of the terminal product and the like, and avoid legal risks.
In one possible implementation manner provided in the embodiments of the present application, as shown in fig. 3, before detecting an operating system start instruction, the method further includes:
s010, acquiring configuration parameters of the terminal and the operating system, and generating check data based on the configuration parameters.
Wherein the verification data may be used to generate hardware verification data and system verification data; and may also be used to verify target data.
In a specific embodiment, determining a target configuration parameter according to a preset configuration parameter name of a manufacturer, and obtaining a target configuration parameter list based on the target configuration parameter; and randomly determining at least one target processing mode according to the specification of a manufacturer or in a preset mode, carrying out randomization and other processing on the target configuration parameter list, and generating check data. Illustratively, the randomizing process may be to randomly determine n parameters in the target configuration parameter list, replace the real parameter value with a random number and then participate in subsequent conversion; wherein, the selection range of n can be any integer from 3 to 5.
S020, converting the verification data to obtain hardware verification data stored in the terminal and system verification data stored in the operating system.
In the implementation process, the conversion mode and the conversion mode are inverse operations, and the conversion mode can include one or more of splitting, encrypting and formatting, and the inverse operations of splitting, encrypting and formatting are respectively integration, decryption and de-formatting in the conversion mode. The splitting and converting mode can also comprise binary splitting or binary splitting besides the odd-even mode; the encryption conversion mode can adopt a common encryption algorithm; the format conversion manner may include converting the target configuration parameter list into data in a specific format such as JSON.
After the verification data are split and converted to form two data, the two obtained data are respectively stored in hardware equipment of the terminal and core codes of an operating system. Because the splitting mode and the storage position of the two data can not be fixed, the two data are difficult to be illegally acquired, and are difficult to be cracked even if being illegally acquired, so that the safety of the data is high; meanwhile, two data can be compiled into binary form and stored in hardware equipment and an operating system, and can not be tampered basically, so that the accuracy of a data verification consistent result can be ensured, and the verification reliability is improved.
In an embodiment of the present application, as shown in fig. 4, a possible implementation manner is provided, where generating verification data based on configuration parameters includes:
s011, randomizing the configuration parameters to obtain target configuration parameters.
The randomizing may include taking a preset configuration parameter of the terminal manufacturer as a target configuration parameter, or may include taking a configuration parameter reasonably determined by other manners as a target configuration parameter. Randomizing the configuration parameters to obtain target configuration parameters, including:
in a specific embodiment, the original arrangement sequence of the configuration parameters in the target configuration parameter list may be rearranged in a randomized manner, and a new arrangement sequence may be recorded.
(1) Generating a first number of random parameter values;
(2) Randomly determining a first number of parameters to be replaced in the configuration parameters;
(3) And updating the parameter to be replaced according to the random parameter value to obtain an updated first configuration parameter.
The random parameter value is a random number for replacing the target configuration parameter and can be generated through a preset random number program; the parameter to be replaced is a parameter whose true value is to be replaced by a random parameter value; and updating the actual parameter value of the parameter to be replaced to be adjusted to a random parameter value.
The first number is n randomly determined in step S010, and may be generally any integer from 3 to 5. Specifically, after determining the first number, taking the first number as 4 as an example, 4 random parameter values, such as A1, A2, A3, A4, are randomly generated, and 4 parameters to be replaced, such as 1-B1, 2-B2, 3-B3, 4-B4, are determined, wherein-the preceding character represents the name of the parameter, -the following character represents the specific value of the parameter. And then updating parameters to be replaced according to the random parameter values to form 1-A1, 2-A2, 3-A3 and 4-A4, wherein '1-A1, 2-A2, 3-A3 and 4-A4' is the updated first configuration parameter.
(4) Generating random replacement information based on the position of the parameter to be replaced in the configuration parameter and the random parameter value;
the position of the parameter to be replaced in the configuration parameters is the position of the parameter to be replaced after the original arrangement sequence of the configuration parameters in the target configuration parameter list is rearranged in a randomized mode.
(5) And updating the random replacement information into the first configuration parameters to generate target configuration parameters.
Specifically, the parameter form of the target configuration parameter may be "parameter position-parameter name-real parameter value-random parameter value", and if the real parameter value of a certain configuration parameter is not replaced by the random parameter value, the "random parameter value" in the above form may be set to be null or a special symbol, etc.
S012, formatting the target configuration parameters to obtain verification data.
Wherein the formatting process refers to generating a formatted data, such as JSON, based on the target configuration parameters. The specific implementation process can comprise the following steps: and generating formatted data by using the parameter name and the real parameter value of each parameter in the target configuration parameter list, wherein the formatted data and the data obtained after conversion can be used as verification data.
In addition to the above-described formatted data, the "parameter position-parameter name-true parameter value-random parameter value" of each parameter in the target configuration parameter list may be used to generate formatted data, which may be used together as verification data, and the data obtained after conversion thereof.
In an embodiment of the present application, as shown in fig. 5, a possible implementation manner is provided, where generating target data to be verified based on system verification data and hardware verification data includes:
s21, acquiring target conversion information, and determining a target conversion mode based on the target conversion information;
s22, determining a target conversion mode corresponding to the target conversion mode based on the target conversion mode;
s23, processing the hardware check data and the system check data based on the target conversion mode to obtain target data to be checked.
In the implementation process, the target conversion information can be directly written in a constant value form in a verification program of an operating system by a terminal manufacturer, or can be judged by a verification service according to the information such as file format, file size and the like of system verification data and hardware verification data by only setting a judgment rule. Because the conversion mode and the conversion mode are inverse operations, the target conversion information can be used to determine what target conversion operation is performed on the system check data and the hardware check data.
For example, if the target conversion information is "format, encrypt, split", the target conversion operation may be determined to be "integrate, decrypt, and de-format", that is, the system check data and the hardware check data are integrated into one piece of data, then decrypt, and finally restore the formatted data into the form of the target configuration parameter list. The data obtained by each conversion operation can be used as target data to be verified.
In the embodiment of the present application, a possible implementation manner is provided, as shown in fig. 5, the matching result includes a first matching result, a second matching result and a third matching result; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result, wherein the matching result comprises the following steps:
s24, matching the target data to be checked with the check data corresponding to the configuration parameters to obtain a first matching result.
Because the most common target conversion operation is integration and decryption, the target data to be verified, which is obtained by integrating and/or decrypting the system verification data and the hardware verification data, is usually matched with the verification data corresponding to the configuration parameters, and the matching process is called first matching, and the matching result is the first matching result. The system check data and the hardware check data generally obtain formatted data after integrating and/or decrypting operation, and the check data corresponding to the configuration parameters used by the check service is also formatted data correspondingly. The target data to be checked is completely consistent with the check data corresponding to the configuration parameters, the first matching result is successful matching, otherwise, the first matching result is failed matching.
And S25, matching the configuration parameters acquired from the target data with the configuration parameters acquired from the check data to obtain a second matching result.
The system check data and the hardware check data generally obtain formatted data after integration and/or decryption operation, and the formatted data can be restored into a target configuration parameter list and other forms, so that information of 'parameter position-parameter name-real parameter value-random parameter value' of each parameter is obtained, and if the 'random parameter value' of a certain parameter is null or a special symbol, the real parameter value is indicated not to be replaced by the random parameter value. The verification data used by the verification service is obtained by randomizing configuration parameters and the like, and corresponds to the configuration parameters, so that the information of 'parameter position-parameter name-real parameter value-random parameter value' of each parameter can be obtained from the verification data. The configuration parameters acquired from the target data can form a parameter set, and the configuration parameters acquired from the verification data can also form a parameter set, wherein the parameters are elements in the two sets, and each element has four attributes of parameter position, parameter name, real parameter value and random parameter value. And matching the two parameter sets, wherein the matching process is called second matching, and the matching result is a second matching result. If a bijection can be established between the two parameter sets, and four attributes of all elements belonging to different parameter sets with corresponding relations in the bijection are identical, the second matching result is successful, otherwise, the second matching result is failed.
S26, matching the actual configuration parameters of the terminal with the configuration parameters obtained from the verification data to obtain a third matching result.
In the starting process of the operating system, the actual configuration parameters of hardware in the terminal can be obtained, each parameter has information such as a parameter name-real parameter value, the actual configuration parameters can form a first set, the parameters are elements in the first set, and each element has two attributes such as the parameter name-real parameter value. As described in S25, the "parameter name-real parameter value" information of each parameter may also be obtained from the verification data, the configuration parameters obtained from the verification data may also form a second set, the parameters are elements in the second set, and each element also has two attributes of "parameter name-real parameter value". And matching the first set with the second set, wherein the matching process is called third matching, and the matching result is a third matching result. If a bijection can be established between a certain subset of the first set and a certain subset of the second set, and two attributes of all elements belonging to different sets with corresponding relations in the bijection are identical, a third matching result is successful, otherwise, the third matching result is failed.
Under normal conditions, the first matching result, the second matching result and the third matching result can be regarded as passing the consistency check only when the matching is successful, and the hardware equipment of the terminal is determined to be consistent with the operating system, so that the operating system is started normally. Otherwise, the starting of the operating system is terminated, and the operating system can be directly shut down, and also can enter a dormant state or a suspended state. When the operating system is in a suspended state, the reasons of the failure in matching can be displayed on the terminal in a prompting frame, a popup window and other modes. When restarting the operating system from the sleep state or the suspend state, the operating system can be normally started only if the first matching result, the second matching result and the third matching result are all successful matching results.
The embodiment of the present application provides a system verification device, as shown in fig. 6, the system verification device 60 may include: a system verification data acquisition module 601, a data verification module 602, and a consistency determination module 603, wherein,
the system verification data acquisition module is used for acquiring hardware verification data corresponding to the terminal and system verification data corresponding to the operating system when the operating system is started; wherein, the hardware check data and the system check data are generated by configuration parameters; the configuration parameters comprise a first configuration parameter of the terminal and a second configuration parameter of the operating system;
the data verification module is used for generating target data to be verified based on the system verification data and the hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result;
and the consistency judging module is used for determining consistency between the terminal and the operating system based on the matching result.
The system verification device of the present embodiment may perform steps of the system verification method shown in the foregoing embodiments of the present application, and implementation principles are similar, and actions performed by each module in the device of each embodiment of the present application correspond to steps in the method of each embodiment of the present application, and detailed functional descriptions of each module of the device may be referred to in the corresponding method shown in the foregoing description, which is not repeated herein.
An electronic device (computer apparatus/device/system) is provided in an embodiment of the present application, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the system verification method, and compared with the prior art, the method can be implemented: according to the embodiment of the application, the parameter data configured by the user and the related data of the terminal hardware are obtained, the hardware check data and the system check data are generated and converted according to the data, the two parts of data are binary converted and stored in the hard disk which cannot be changed manually and in the check service, and the password obtained in the embodiment of the application cannot be easily cracked or changed due to randomization and formatting conversion.
According to the embodiment of the application, the consistency check result is obtained by gradually completing three checks after starting, the consistency of the operating system and the terminal is determined through the consistency check result, whether the terminal hardware is tampered or replaced is judged based on the consistency check result, a user is informed of the spare parts which are changed or replaced, and the problems of using the terminal and the like caused by hardware replacement are avoided.
In an alternative embodiment, an electronic device is provided, as shown in fig. 7, the electronic device 4000 shown in fig. 7 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 7, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer.
The memory 4003 is used for storing a computer program that executes an embodiment of the present application, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute a computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiment.
Among them, electronic devices include, but are not limited to: personal computers (personal computer, PC), portable handsets, portable computers (Tablet Personal Computer, tablet PC), and the like.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, may implement the steps and corresponding content of the foregoing method embodiments.
The embodiments of the present application also provide a computer program product, which includes a computer program, where the computer program can implement the steps of the foregoing method embodiments and corresponding content when executed by a processor.
It should be understood that, although the flowcharts of the embodiments of the present application indicate the respective operation steps by arrows, the order of implementation of these steps is not limited to the order indicated by the arrows. In some implementations of embodiments of the present application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages may be flexibly configured according to the requirement, which is not limited in the embodiment of the present application.
The foregoing is merely an optional implementation manner of the implementation scenario of the application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the application are adopted without departing from the technical ideas of the application, and also belong to the protection scope of the embodiments of the application.

Claims (8)

1. A system verification method, comprising:
when an operating system is started, acquiring hardware verification data corresponding to a terminal, and acquiring system verification data corresponding to the operating system;
wherein the hardware check data and the system check data are generated based on configuration parameters; the configuration parameters comprise a first configuration parameter of the terminal and a second configuration parameter of the operating system;
generating target data to be verified based on the system verification data and the hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result; the matching results comprise a first matching result, a second matching result and a third matching result;
determining consistency between the terminal and an operating system based on the matching result;
the step of generating a matching result by matching the target data with the check data corresponding to the configuration parameters includes:
matching the target data to be checked with the check data corresponding to the configuration parameters to obtain a first matching result;
matching the configuration parameters acquired from the target data with the configuration parameters acquired from the check data to obtain a second matching result;
matching the actual configuration parameters of the terminal with the configuration parameters obtained from the verification data to obtain a third matching result;
the determining the consistency between the terminal and the operating system based on the matching result comprises the following steps:
if the target data to be checked is completely consistent with the check data corresponding to the configuration parameters, the first matching result is successful in matching, otherwise, the first matching result is failed in matching;
the configuration parameters acquired from the target data and the configuration parameters acquired from the verification data respectively form a parameter set, if a bijection can be established between the two parameter sets, and the attributes of two elements of the bijection, which are respectively different from the parameter sets and have corresponding relations, are completely the same, the second matching result is successful matching, otherwise the second matching result is failed matching;
the actual configuration parameters of the terminal form a first set, the configuration parameters obtained from the verification data form a second set, if a bijection can be established between the first set and a certain subset of the second set, and the attributes of all elements belonging to different sets with corresponding relations in the bijection are completely the same, the third matching result is successful matching, otherwise, the third matching result is failed matching;
and if the first matching result, the second matching result and the third matching result are all successful in matching, the matching result is that the consistency check between the terminal and the operating system passes.
2. The system verification method according to claim 1, wherein the method further comprises:
before an operating system starting instruction is detected, acquiring configuration parameters of the terminal and the operating system, and generating check data based on the configuration parameters;
and converting the verification data to obtain hardware verification data stored in the terminal and system verification data stored in the operating system.
3. The system verification method according to claim 2, wherein the generating verification data based on the configuration parameters includes:
randomizing the configuration parameters to obtain target configuration parameters;
and formatting the target configuration parameters to obtain verification data.
4. A system verification method according to claim 3, wherein said randomizing said configuration parameters to obtain target configuration parameters comprises:
generating a first number of random parameter values;
randomly determining the first number of parameters to be replaced in the configuration parameters;
updating the parameter to be replaced according to the random parameter value to obtain an updated first configuration parameter;
generating random replacement information based on the position of the parameter to be replaced in the configuration parameter and the random parameter value;
and updating the random replacement information into the first configuration parameters to generate target configuration parameters.
5. The system verification method according to claim 1, wherein the generating target data to be verified based on the system verification data and the hardware verification data includes:
acquiring target conversion information, and determining a target conversion mode based on the target conversion information;
determining a target conversion mode corresponding to the target conversion mode based on the target conversion mode;
and processing the hardware check data and the system check data based on the target conversion mode to obtain the target data to be checked.
6. A system verification device, comprising:
the system verification data acquisition module is used for acquiring hardware verification data corresponding to the terminal and system verification data corresponding to the operating system when the operating system is started; wherein the hardware check data and the system check data are generated by configuration parameters; the configuration parameters comprise a first configuration parameter of the terminal and a second configuration parameter of the operating system;
the data verification module is used for generating target data to be verified based on the system verification data and the hardware verification data; matching the target data with the verification data corresponding to the configuration parameters to generate a matching result; the matching results comprise a first matching result, a second matching result and a third matching result;
the consistency judging module is used for determining consistency between the terminal and the operating system based on the matching result;
the step of generating a matching result by matching the target data with the check data corresponding to the configuration parameters includes:
matching the target data to be checked with the check data corresponding to the configuration parameters to obtain a first matching result;
matching the configuration parameters acquired from the target data with the configuration parameters acquired from the check data to obtain a second matching result;
matching the actual configuration parameters of the terminal with the configuration parameters obtained from the verification data to obtain a third matching result;
the determining the consistency between the terminal and the operating system based on the matching result comprises the following steps:
if the target data to be checked is completely consistent with the check data corresponding to the configuration parameters, the first matching result is successful in matching, otherwise, the first matching result is failed in matching;
the configuration parameters acquired from the target data and the configuration parameters acquired from the verification data respectively form a parameter set, if a bijection can be established between the two parameter sets, and the attributes of two elements of the bijection, which are respectively different from the parameter sets and have corresponding relations, are completely the same, the second matching result is successful matching, otherwise the second matching result is failed matching;
the actual configuration parameters of the terminal form a first set, the configuration parameters obtained from the verification data form a second set, if a bijection can be established between the first set and a certain subset of the second set, and the attributes of all elements belonging to different sets with corresponding relations in the bijection are completely the same, the third matching result is successful matching, otherwise, the third matching result is failed matching;
and if the first matching result, the second matching result and the third matching result are all successful in matching, the matching result is that the consistency check between the terminal and the operating system passes.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the system verification method according to any one of claims 1-5.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the system verification method of any one of claims 1-5.
CN202310582423.8A 2023-05-22 2023-05-22 System verification method and device, electronic equipment and readable storage medium Active CN116756784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310582423.8A CN116756784B (en) 2023-05-22 2023-05-22 System verification method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310582423.8A CN116756784B (en) 2023-05-22 2023-05-22 System verification method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN116756784A CN116756784A (en) 2023-09-15
CN116756784B true CN116756784B (en) 2024-02-23

Family

ID=87948695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310582423.8A Active CN116756784B (en) 2023-05-22 2023-05-22 System verification method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116756784B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108064376A (en) * 2017-11-20 2018-05-22 深圳市汇顶科技股份有限公司 System starts method of calibration and system, electronic equipment and computer storage media
CN112445537A (en) * 2020-12-11 2021-03-05 中国科学院信息工程研究所 Trusted starting method and device of operating system, mobile terminal and storage medium
CN114547033A (en) * 2022-02-22 2022-05-27 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for managing key product data
CN116048639A (en) * 2022-12-30 2023-05-02 元心信息科技集团有限公司 Method and device for starting operating system, electronic equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108064376A (en) * 2017-11-20 2018-05-22 深圳市汇顶科技股份有限公司 System starts method of calibration and system, electronic equipment and computer storage media
CN112445537A (en) * 2020-12-11 2021-03-05 中国科学院信息工程研究所 Trusted starting method and device of operating system, mobile terminal and storage medium
CN114547033A (en) * 2022-02-22 2022-05-27 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for managing key product data
CN116048639A (en) * 2022-12-30 2023-05-02 元心信息科技集团有限公司 Method and device for starting operating system, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN116756784A (en) 2023-09-15

Similar Documents

Publication Publication Date Title
US11755693B1 (en) Authentication of encrypted media based on immutable ledgers
TWI672648B (en) Business process method and device, data share system, and storage medium
US9853928B2 (en) Systems and methods for controlling email access
KR101948721B1 (en) Method and apparatus for examining forgery of file by using file hash value
JP2015531559A (en) Safe handling of server certificate errors in synchronous communication
JP6476167B2 (en) Self-authentication device and self-authentication method
CN113360217A (en) Rule engine SDK calling method and device and storage medium
WO2022142536A1 (en) Grayscale publishing method, system and apparatus, and device and storage medium
US11934539B2 (en) Method and apparatus for storing and processing application program information
CN113127844A (en) Variable access method, device, system, equipment and medium
CN106778295B (en) File storage method, file display method, file storage device, file display device and terminal
CN116756784B (en) System verification method and device, electronic equipment and readable storage medium
US10681017B2 (en) Systems and methods for controlling email access
CN103559430A (en) Application account management method and device based on android system
US11683180B1 (en) Protecting digital media with nested hashing techniques
US10262161B1 (en) Secure execution and transformation techniques for computing executables
US20230198760A1 (en) Verified presentation of non-fungible tokens
US8695068B1 (en) Device authentication using display device irregularity
CN112948815A (en) Off-line weak password checking method and device based on Hash matching
CN112637160A (en) Login verification method, device, equipment and storage medium
CN104134025A (en) Mobile terminal locking method and device based on SIM cards and mobile terminal
WO2013044304A1 (en) System and method for servicing a request
KR102642586B1 (en) Method and system for verifing messages
US20220164794A1 (en) Method of verifying identity for a computerized account, computing device, and storage medium
CN117544294A (en) Data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant