CN113254888B - Method for acquiring hardware information, authorization control system and computing equipment - Google Patents

Method for acquiring hardware information, authorization control system and computing equipment Download PDF

Info

Publication number
CN113254888B
CN113254888B CN202110650861.4A CN202110650861A CN113254888B CN 113254888 B CN113254888 B CN 113254888B CN 202110650861 A CN202110650861 A CN 202110650861A CN 113254888 B CN113254888 B CN 113254888B
Authority
CN
China
Prior art keywords
interface
hardware information
client
hardware
server
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
CN202110650861.4A
Other languages
Chinese (zh)
Other versions
CN113254888A (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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202110650861.4A priority Critical patent/CN113254888B/en
Publication of CN113254888A publication Critical patent/CN113254888A/en
Application granted granted Critical
Publication of CN113254888B publication Critical patent/CN113254888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for acquiring hardware information, which comprises the steps of acquiring an embedded script from a server, and acquiring a hardware information demand table configured by the server based on the embedded script; calling one or more corresponding interfaces based on the hardware information requirement table so as to obtain corresponding hardware information of the client based on each interface; writing the acquired one or more hardware information into a hardware information table in a memory of the client; and acquiring a hardware information table comprising one or more hardware information from the memory, and sending the hardware information table to the server. The invention also discloses an authorization control system and a computing device. According to the technical scheme of the invention, the server can flexibly customize the hardware information of the client to be acquired.

Description

Method for acquiring hardware information, authorization control system and computing equipment
Technical Field
The invention relates to the technical field of computers and internet, in particular to a method for acquiring hardware information, an authorization control system and computing equipment.
Background
Currently, there is a business model for computer software enterprises to charge for the authorization of client software, such as software products represented by Windows system. For such software enterprises, a technical team thereof needs to solve the problem of how to authorize, i.e., how to manage the authorization of client software of users. The general design idea is that a user needs to purchase authorization codes for using software, one authorization code is bound to one client, the client bound with the authorization code is in a permission state of obtaining software authorization, and then the user can use the functions of the software in the permission state.
The authorization code is generated directly by the server management software of the software enterprise according to the algorithm, and the physical information of the client is reported to the server by the client software. Generally, when software is designed, the number of hardware of the client and specific feature information of the hardware, which are required to be acquired by software authorization and used for identifying unique physical information of the client, are determined, and the hardware may include information of a motherboard, a CPU, a memory, a hard disk, a network card, and a video card, for example.
In the prior art, according to a process that a client requests a server to authorize software, an acquisition scheme of hardware information is integrated in a client code, and the acquired hardware information is fixed under the condition that a client version is not changed. That is, the manner of obtaining the hardware information of the client cannot be changed or upgraded without upgrading the client, so that when the interface for obtaining the hardware information has a problem, it is difficult to repair the interface in real time. And, because the mode of obtaining the hardware information is fixed, have caused the restriction for flexible extension and upgrading of the authorization scheme.
Therefore, a method for acquiring hardware information is needed to solve the problems in the above technical solutions.
Disclosure of Invention
To this end, the present invention provides a method, an authorization control system and a computing device for acquiring hardware information to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a method for acquiring hardware information, which is executed at a client and includes the steps of: acquiring an embedded script from a server, and acquiring a hardware information demand table configured by the server based on the embedded script; calling one or more corresponding interfaces based on the hardware information requirement table so as to obtain corresponding hardware information of the client based on each interface; writing the acquired one or more hardware information into a hardware information table in a memory of the client; and acquiring a hardware information table comprising one or more hardware information from the memory, and sending the hardware information table to the server.
Optionally, in the method for acquiring hardware information according to the present invention, the step of calling the corresponding one or more interfaces based on the hardware information requirement table includes: acquiring one or more target hardware names from the hardware information requirement table, and determining an interface corresponding to each target hardware name; calling an interface corresponding to each hardware name to acquire hardware information corresponding to the hardware name.
Optionally, in the method for acquiring hardware information according to the present invention, the step of determining an interface corresponding to each target hardware name includes: acquiring an interface list, wherein each item in the interface list comprises interface information corresponding to hardware information and a corresponding hardware name; traversing each target hardware name in the hardware information requirement table, and determining interface information corresponding to each target hardware name based on the interface list so as to call the corresponding interface.
Optionally, in the method for acquiring hardware information according to the present invention, before invoking the corresponding one or more interfaces, the method further includes the steps of: and generating a hardware information table, and storing the hardware information table in a memory of the client, wherein the hardware information table is used for storing the hardware information of the client.
Optionally, in the method for acquiring hardware information according to the present invention, writing the acquired one or more types of hardware information into a hardware information table in a memory of the client includes: and writing the acquired one or more kinds of hardware information into a hardware information table in a memory of the client in a key value pair mode.
Optionally, in the method for acquiring hardware information according to the present invention, acquiring an embedded script from a server includes: and acquiring the embedded script and the extension file from the server so as to extend the interface or repair the interface based on the extension file.
Optionally, in the method for acquiring hardware information according to the present invention, the embedded script is a Lua script; the hardware comprises one or more of a mainboard, a CPU, an internal memory, a hard disk, a network card and a display card.
According to an aspect of the present invention, there is provided an authorization control system, a client, adapted to perform the method as described above; and the server is connected with the client and is suitable for configuring a hardware information demand table, generating a corresponding embedded script and providing the embedded script to the client to acquire the hardware information of the client.
According to an aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions configured to be executed by the at least one processor, the program instructions including instructions for performing the method of acquiring hardware information as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions, which when read and executed by a computing device, cause the computing device to execute the method of acquiring hardware information as described above.
According to the technical scheme of the invention, the method for acquiring the hardware information is provided, and when the server authorizes the client software, the server can configure the hardware information demand table according to the actual demand on the client hardware information and provide the corresponding embedded script for the client. The client terminal can call one or more interfaces corresponding to one or more hardware information required by the server by executing the embedded script, acquire the one or more hardware information required by the server based on the interfaces, and provide the hardware information to the server. Therefore, the server can flexibly customize the acquired client hardware information under the scene of managing client software authorization. In addition, the client can also obtain the extension file from the server, so that when the client calls the interface to obtain the hardware information, the client can realize the extension or repair of the interface based on the extension file.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of an authorization control system 100 according to one embodiment of the invention;
FIG. 2 shows a schematic diagram of a computing device 200, according to one embodiment of the invention; and
FIG. 3 shows a flow diagram of a method 300 of obtaining hardware information, according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a schematic diagram of an authorization control system 100, according to one embodiment of the invention.
As shown in fig. 1, the authorization control system 100 includes one or more clients 110, a server 120. Wherein one or more clients 110 are communicatively coupled to server 120, such as by a wired or wireless network connection.
The client 110 is a terminal used by a user. The mobile phone can be specifically implemented as a personal computer such as a desktop computer and a notebook computer, and can also be a mobile phone, a tablet computer, multimedia equipment, intelligent wearable equipment, and the like, but is not limited thereto.
The server 120 is used to provide authorization services for the software for the client. It should be noted that the present invention is not limited to a particular type of server 120. For example, the server 120 may be implemented as a computing device such as a desktop computer, a notebook computer, a processor chip, a mobile phone, a tablet computer, etc., but is not limited thereto, and may also be an application program residing on the computing device.
Client 110 includes software, such as an application or operating system, that needs to request authorization from server 120. An application or operating system may request an authorized license from the server 120 based on the authorization code, and the client 110 needs to provide the client's hardware information to the server 120 when requesting authorization from the server 120. In other words, before activating the software of the client 110, the server 120 needs to acquire the hardware information of the client 110, and store the hardware information as the key value of the authorization code, so as to return an activation success state to the client 110.
In one embodiment, the server 120 may configure one or more types of hardware information that needs to be obtained from the client 110 according to actual needs. Specifically, the server 120 may be configured to generate a hardware information requirement table and generate a corresponding embedded script, and by providing the embedded script to the client 110, the client 110 may obtain the hardware information requirement table of the server 120 when executing the embedded script. Thus, the client 110 determines one or more kinds of hardware information required by the server 120 based on the hardware information requirement table, and acquires the corresponding one or more kinds of hardware information to provide the one or more kinds of hardware information to the server 120.
In one embodiment, the embedded script may be implemented as a Lua script, for example, although the invention is not limited thereto. And flexible extension and customization of software can be realized based on the Lua script.
In one embodiment, the client 110 may establish an interface corresponding to each type of hardware information. The hardware information requirement table includes one or more target hardware names, and the client 110 may obtain the one or more target hardware names from the hardware information requirement table, and may obtain one or more pieces of hardware information required by the server 120 by calling an interface corresponding to each target hardware name.
In one embodiment, after acquiring the embedded script, the client 110 includes an interface library layer 114 disposed at the bottom, an interface adaptation layer 113 disposed above the interface library layer, a script layer 112 (Lua script layer) disposed above the interface adaptation layer, and an authorization request layer 111 disposed above the script layer 112. The interface library layer 114 includes interfaces corresponding to each type of hardware information, the interface adaptation layer 113 is available for the script layer 112 to call, the script layer 112 can obtain an interface list returned by the interface adaptation layer 113 by calling the interface adaptation layer 113, can determine interface information corresponding to each target hardware name according to the interface list, and return the determined interface information to the interface adaptation layer 113, so as to call the interfaces corresponding to the interface information. In this way, the script layer 112 may call the corresponding interface (i.e., the interface of the interface library layer 114) according to the interface information corresponding to the target hardware name, and obtain the corresponding hardware information returned by the interface.
In an embodiment of the invention, the client 110 is adapted to perform a method of obtaining hardware information. The method 300 of acquiring hardware information of the present invention will be described in detail below.
In one embodiment, the client 110 and the server 120 of the present invention can be implemented as a computing device, respectively, so that the method 300 for acquiring hardware information of the present invention can be executed in the computing device.
FIG. 2 shows a block diagram of a computing device 200, according to one embodiment of the invention. As shown in FIG. 2, in a basic configuration 202, a computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing, including but not limited to: a microprocessor (UP), a microcontroller (UC), a digital information processor (DSP), or any combination thereof. The processor 204 may include one or more levels of cache, such as a level one cache 210 and a level two cache 212, a processor core 214, and registers 216. Example processor cores 214 may include Arithmetic Logic Units (ALUs), Floating Point Units (FPUs), digital signal processing cores (DSP cores), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 may include an operating system 220, one or more applications 222, and program data 224. The application 222 is actually a plurality of program instructions that direct the processor 204 to perform corresponding operations. In some embodiments, application 222 may be arranged to cause processor 204 to operate with program data 224 on an operating system.
Computing device 200 may also include a storage interface bus 234. The storage interface bus 234 enables communication from the storage devices 232 (e.g., removable storage 236 and non-removable storage 238) to the basic configuration 202 via the bus/interface controller 230. At least a portion of the operating system 220, applications 222, and data 224 may be stored on removable storage 236 and/or non-removable storage 238, and loaded into system memory 206 via storage interface bus 234 and executed by the one or more processors 204 when the computing device 200 is powered on or the applications 222 are to be executed.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus/interface controller 230. The example output device 242 includes a graphics processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. Example peripheral interfaces 244 can include a serial interface controller 254 and a parallel interface controller 256, which can be configured to facilitate communications with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 258. An example communication device 246 may include a network controller 260, which may be arranged to facilitate communications with one or more other computing devices 262 over a network communication link via one or more communication ports 264.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in a manner that encodes information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In the computing device 200 according to the present invention, the application 222 includes a plurality of program instructions that execute the method 300 of obtaining hardware information that may instruct the processor 204 to perform the method 300 of obtaining hardware information of the present invention such that the method 300 of the present invention may be performed in the computing device 200.
FIG. 3 shows a flow diagram of a method 300 of obtaining hardware information, according to one embodiment of the invention. The method 300 is suitable for execution at a client 110 (e.g., the aforementioned computing device 200).
As shown in fig. 3, the method 300 begins at step S310.
In step S310, the embedded script is obtained from the server 120, and the hardware information requirement table configured by the server 120 is obtained based on the embedded script. Here, the client 110 may obtain the hardware information requirement table by executing the embedded script after obtaining the embedded script provided by the server 120.
It should be noted that the hardware information requirement table is customized by the server 120 according to the hardware information that needs to be obtained actually, so that the server 120 can flexibly customize one or more types of hardware information that needs to be obtained from the client according to the current actual requirement. Accordingly, one or more types of hardware information required by the server 120 may be determined at the client based on the hardware information requirement table. It should be noted that the present invention is not limited to a specific kind of hardware information required by the server.
In one embodiment, the embedded script may be implemented as, for example, a Lua script, but is not limited to such.
Subsequently, in step S320, the corresponding one or more interfaces are called based on the hardware information requirement table, so as to obtain the corresponding hardware information of the client 110 based on each interface.
It should be noted that before step S320 is executed, an interface corresponding to each kind of hardware information of the client 110 is constructed in advance at the client, and the hardware information can be acquired based on the interface corresponding to the hardware information. Therefore, when the embedded script is executed, one or more kinds of hardware information required by the server are determined according to the hardware information requirement table, and then one or more interfaces corresponding to the one or more kinds of hardware information required by the server are called, so that the one or more kinds of hardware information can be acquired based on the corresponding interfaces.
In one embodiment, building an interface requires obtaining the hardware information structure to be populated, script cache addresses, script byte size, etc. In other words, the interface is constructed based on the hardware information structure, script cache address, and script byte size corresponding to the interface. For example, the constructed interface may be implemented as:
int get_full_hardware_info(struct hardwareinfo *hdinfo, const char *luascripts, size_t sz);
it should be noted that the first parameter in the code implemented by the interface refers to an address of a struct hardwareinfo structure variable defined by the client 110 and filled by the interface, and the inside of the interface needs to perform zero clearing processing on a memory space pointed by a pointer.
In one embodiment, the hardware information requirement table may include hardware names (character strings) corresponding to one or more types of hardware information that the server 120 needs to obtain from the client 110. That is, one or more target hardware names required by the server 120 may be included in the hardware information requirement table.
In this way, when executing the embedded script, one or more target hardware names required by the server 120 may be obtained from the hardware information requirement table, and an interface corresponding to each target hardware name may be determined. Further, by calling the interface corresponding to each hardware name, the corresponding hardware information, that is, the hardware information corresponding to the hardware name, can be acquired. Here, the hardware information may be hardware identification information uniquely corresponding to the hardware.
In one embodiment, the client 110 includes an interface library layer 114 disposed at the bottom most layer, an interface adaptation layer 113 disposed above the interface library layer, a script layer 112 (Lua script layer) disposed above the interface adaptation layer, and an authorization request layer 111 disposed above the script layer 112. The interface library layer 114 includes interfaces corresponding to each type of hardware information, the interface adaptation layer 113 is available for the script layer 112 to call, and the script layer 112 may obtain an interface list returned by the interface adaptation layer 113 by calling the interface adaptation layer 113, and determine an interface corresponding to each target hardware name according to the interface list.
In one embodiment, the interface adaptation layer is based on the Lua standard: typedef int (. mua _ CFunction) (lua _ State. L). Based on this standard, the interface information for implementing the adaptation layer corresponding to each kind of hardware information of the client 110 is as follows:
static int LuaM_get_video(lua_State *L);
static int LuaM_get_netcard(lua_State *L);
......
static int LuaM_get_ddr(lua_State *L);
static int LuaM_get_fingerprint(lua_State *L);
as can be seen, at the interface adaptation layer, interface information corresponding to each kind of hardware information of the client 110 may be provided, and an interface list may be formed. Here, each item in the interface list includes interface information corresponding to one type of hardware information, and the interface information further includes a corresponding hardware name. In this way, after the script layer 112 obtains the interface list by calling the interface adaptation layer 113, the interface information corresponding to each target hardware name can be determined according to the interface list. Specifically, each target hardware name in the hardware information requirement table is traversed, interface information corresponding to each target hardware name is determined based on the interface list, and the determined interface information is returned to the interface adaptation layer 113 so as to call an interface corresponding to the interface information. In this way, the script layer 112 may call the corresponding interface (i.e., the interface of the interface library layer 114) according to the interface information corresponding to the target hardware name, and obtain the corresponding hardware information returned by the interface.
In one embodiment, the C interface of the interface library layer 114 is implemented as follows:
int hwinfo_get_video(struct video);
int hwinfo_get_netcard(struct netcard);
......
int hwinfo_get_ddr(struct netcard);
int hwinfo_get_fingerprint(struct fingerprint);
the script layer may call an interface corresponding to the hardware information based on the method of getevice. xxxx.
In one embodiment, the hardware of the client 110 includes one or more of a motherboard, a CPU, a memory, a hard disk, a network card, and a video card, for example. Accordingly, the target hardware name in the hardware information requirement table configured by the server 120 may include the names of one or more of the above-mentioned hardware. The hardware information required by the server 120 and the hardware information obtained by calling the corresponding interface at the client 110 may include feature information of one or more kinds of hardware, such as hardware identification information uniquely corresponding to the hardware.
Subsequently, in step S330, the one or more interfaces write the acquired corresponding one or more types of hardware information into a hardware information table in the memory of the client. Here, the hardware information table is a global table generated at the client 110. The hardware information table is used for storing various hardware information of the client.
According to one embodiment, before performing step S320, when the client 100 executes the embedded script, a hardware information table may be generated based on the embedded script and stored in the memory of the client 110. The hardware information table generated at the client 110 and the hardware information requirement table configured at the server 120 are Lua tables created based on the Lua language.
According to one embodiment, one or more interfaces may invoke embedded scripts (scripting layer 112) to write the retrieved one or more types of hardware information in the form of key-value pairs into a hardware information table in client memory. Thus, after step S330 is executed, the hardware information table in the client memory includes one or more key-value pairs corresponding to the hardware information.
Finally, in step S340, the client 110 obtains a hardware information table including one or more types of hardware information from the memory, and may send the hardware information table to the server 120. Thereby making the server 120 acquire the required hardware information or hardware information. Here, step S340 may be specifically executed by the authorization request layer 111 of the client.
In this way, the server 120 can obtain one or more required hardware information of the client 110 by providing the embedded script to the client 110, thereby realizing flexible customization of the obtained hardware information by the server in a scenario of managing client software authorization.
In addition, according to an embodiment of the present invention, when the client 110 obtains the embedded script from the server 120, the extension file may also be obtained synchronously, so that the client 110 may implement an extension interface or a repair interface based on the extension file. For example, the extension file may be implemented as a dynamic library libhot. so, which may be loaded from/usr/lib/license/directory based on a specified path. And the original interface which can be called by the Lua script can be expanded or the original interface which can be called by the Lua script can be modified based on the dynamic library libhotfix.
Specifically, by acquiring the extension file, when an original interface for acquiring the hardware information is defective or damaged, and when the Lua script calls the defective interface, the defect interface may be replaced by a corresponding interface in the extension file (dynamic library), that is, the corresponding interface in the extension file may be called to acquire the hardware information corresponding to the interface. Thus, the effect of repairing the defective interface is achieved.
In one embodiment, when the interfaces corresponding to video and netcard are defective, the defective interfaces can be replaced by corresponding interfaces in the extended file (dynamic library) by the following commands, so as to realize the hot update of the interfaces:
hardware.video=hardware_hotfix.video
hardware.netcard=hardware_hotfix.netcard
in summary, according to the method 300 of the present invention, when the server performs authorization processing on the client software, the server may configure the hardware information requirement table according to the actual requirement for the client hardware information, and provide the corresponding embedded script to the client. The client terminal can call one or more interfaces corresponding to one or more hardware information required by the server by executing the embedded script, acquire the one or more hardware information required by the server based on the interfaces, and provide the hardware information to the server. Therefore, the server can flexibly customize the acquired client hardware information under the scene of managing client software authorization. In addition, the client can also obtain the extension file from the server, so that when the client calls the interface to obtain the hardware information, the client can realize the extension or repair of the interface based on the extension file.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the method of acquiring hardware information of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense with respect to the scope of the invention, as defined in the appended claims.

Claims (9)

1. A method for acquiring hardware information, which is executed at a client, comprises the following steps:
requesting authorization for the software from a server based on the authorization code;
when requesting software authorization from a server, acquiring an embedded script from the server, and acquiring a hardware information requirement table configured by the server based on the embedded script, wherein the client comprises an interface library layer arranged at the bottommost layer, an interface adaptation layer arranged above the interface library layer, a script layer arranged above the interface adaptation layer, and an authorization request layer arranged above the script layer, and the interface library layer comprises an interface corresponding to each hardware information;
acquiring one or more target hardware names from the hardware information demand table, determining an interface corresponding to each target hardware name, and calling the interface corresponding to each target hardware name, wherein the script layer acquires an interface list returned by the interface adaptation layer by calling the interface adaptation layer, determines interface information corresponding to each target hardware name according to the interface list, and returns the interface information to the interface adaptation layer so as to call the interface corresponding to the interface information, and acquires the hardware information corresponding to the hardware name based on the interface;
writing the acquired one or more hardware information into a hardware information table in a memory of the client;
acquiring a hardware information table comprising one or more hardware information from a memory, and sending the hardware information table to a server so that the server can store the hardware information as a key value of an authorization code;
and acquiring the activation success state returned by the server.
2. The method of claim 1, wherein determining the interface corresponding to each target hardware name comprises:
acquiring an interface list, wherein each item in the interface list comprises interface information corresponding to hardware information and a corresponding hardware name;
traversing each target hardware name in the hardware information requirement table, and determining interface information corresponding to each target hardware name based on the interface list so as to call the corresponding interface.
3. The method of claim 1, wherein prior to invoking the interface, further comprising the steps of:
and generating a hardware information table, and storing the hardware information table in a memory of the client, wherein the hardware information table is used for storing the hardware information of the client.
4. The method of any one of claims 1-3, wherein writing the obtained one or more types of hardware information to a hardware information table in a client memory comprises:
and writing the acquired one or more kinds of hardware information into a hardware information table in a memory of the client in a key value pair mode.
5. The method of any of claims 1-3, wherein retrieving the embedded script from the server comprises:
and acquiring the embedded script and the extension file from the server so as to extend the interface or repair the interface based on the extension file.
6. The method of any one of claims 1-3,
the embedded script is a Lua script;
the hardware comprises one or more of a mainboard, a CPU, an internal memory, a hard disk, a network card and a display card.
7. An authorization control system, comprising:
a client adapted to perform the method of any one of claims 1-6, wherein the client comprises an interface library layer arranged at a bottommost layer, an interface adaptation layer arranged above the interface library layer, a script layer arranged above the interface adaptation layer, an authorization request layer arranged above the script layer, the interface library layer comprising interfaces corresponding to each hardware information; and
and the server is connected with the client, is suitable for configuring a hardware information requirement table, generates a corresponding embedded script, provides the embedded script to the client to acquire the hardware information of the client when receiving an authorization request of the client for software based on the authorization code, stores the hardware information as a key value of the authorization code, and returns an activation success state to the client.
8. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of obtaining hardware information according to any of claims 1-6.
9. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of acquiring hardware information of any of claims 1-6.
CN202110650861.4A 2021-06-11 2021-06-11 Method for acquiring hardware information, authorization control system and computing equipment Active CN113254888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110650861.4A CN113254888B (en) 2021-06-11 2021-06-11 Method for acquiring hardware information, authorization control system and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110650861.4A CN113254888B (en) 2021-06-11 2021-06-11 Method for acquiring hardware information, authorization control system and computing equipment

Publications (2)

Publication Number Publication Date
CN113254888A CN113254888A (en) 2021-08-13
CN113254888B true CN113254888B (en) 2021-11-09

Family

ID=77187538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110650861.4A Active CN113254888B (en) 2021-06-11 2021-06-11 Method for acquiring hardware information, authorization control system and computing equipment

Country Status (1)

Country Link
CN (1) CN113254888B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504880A (en) * 2002-11-29 2004-06-16 联想(北京)有限公司 Operating system automatically installing method applying Linux
CN101163055A (en) * 2007-11-21 2008-04-16 浪潮电子信息产业股份有限公司 Method of automatically detecting server hardware information
CN105978749A (en) * 2016-04-27 2016-09-28 浪潮(北京)电子信息产业有限公司 Monitoring method of computer hardware information in local area network and system thereof
CN107590392A (en) * 2017-08-14 2018-01-16 大唐高鸿信安(浙江)信息科技有限公司 Utilize the system and method for script verification hardware integrity
CN110120886A (en) * 2019-04-25 2019-08-13 深圳市国鑫恒宇科技有限公司 A kind of method that batch obtains server hardware configuration information

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205709A1 (en) * 2001-05-09 2004-10-14 Sun Microsystems, Inc. Method,system, and program for providing patch expressions used in determining whether to install a patch
CN1220948C (en) * 2002-08-22 2005-09-28 联想(北京)有限公司 Device for obtaining computer hardware information and method
CN103136455A (en) * 2011-11-24 2013-06-05 成绵广 Encryption method
CN102724343A (en) * 2012-05-31 2012-10-10 青岛海信移动通信技术股份有限公司 Mobile phone hardware module test method and test device
JP2014092996A (en) * 2012-11-05 2014-05-19 Canon Inc Information processing device, control method thereof, and program
CN103838556A (en) * 2012-11-23 2014-06-04 苏州精易会信息技术有限公司 Method for achieving design of client program
CN103092732B (en) * 2013-01-23 2016-08-17 加弘科技咨询(上海)有限公司 Utilize the system of the dynamic monitoring device of script
CN105069350B (en) * 2015-08-24 2023-05-16 上海繁易信息科技股份有限公司 Encryption method and device for embedded operating system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1504880A (en) * 2002-11-29 2004-06-16 联想(北京)有限公司 Operating system automatically installing method applying Linux
CN101163055A (en) * 2007-11-21 2008-04-16 浪潮电子信息产业股份有限公司 Method of automatically detecting server hardware information
CN105978749A (en) * 2016-04-27 2016-09-28 浪潮(北京)电子信息产业有限公司 Monitoring method of computer hardware information in local area network and system thereof
CN107590392A (en) * 2017-08-14 2018-01-16 大唐高鸿信安(浙江)信息科技有限公司 Utilize the system and method for script verification hardware integrity
CN110120886A (en) * 2019-04-25 2019-08-13 深圳市国鑫恒宇科技有限公司 A kind of method that batch obtains server hardware configuration information

Also Published As

Publication number Publication date
CN113254888A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN106598667A (en) Method and device used for restoring kernel vulnerability
WO2017166447A1 (en) Method and device for loading kernel module
CN104704468A (en) Cross system installation of WEB applications
CN111651464A (en) Data processing method and system and computing equipment
US8438295B2 (en) Declarative programming model for modeling and execution of triggers for resource oriented system
CN111506300A (en) Applet generation method, device, equipment and storage medium
CN110874298B (en) Request data storage method and terminal equipment
CN108846129B (en) Storage data access method, device and storage medium
US20190250926A1 (en) Capturing pre-fetch blocks of an operating system to improve boot performance in a cloud environment
CN114189553A (en) Flow playback method, system and computing equipment
US9983862B2 (en) Systems and methods for download and installation of drivers for unmanaged information handling resources
CN113254888B (en) Method for acquiring hardware information, authorization control system and computing equipment
CN115150392B (en) Remote file copying method, system, computing equipment and storage medium
CN111443992A (en) Docker mirror image difference derivation method, computer storage medium and electronic device
US9003364B2 (en) Overriding system attributes and function returns in a software subsystem
CN112231761B (en) Device mounting method, computing device and readable storage medium
CN109558181B (en) Method for enabling non-IE browser to be compatible with OCX control, computer storage medium and equipment
CN111752620A (en) Processing method and loading method of kernel module
CN117453151B (en) NOR-FLASH drive development method, device and computer equipment
US20230244859A1 (en) System and method for automatically sharing verified user information across remote systems
CN113742140B (en) File backup method and device and computing equipment
CN114880722A (en) Device mounting method, computing device and readable storage medium
CN114218191A (en) System function migration method and device, computer equipment and storage medium
CN114090525A (en) File attribute adding method, computing device and storage medium
CN114356332A (en) Page determination method and related 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