CN116431078A - Information acquisition method, device, equipment and storage medium - Google Patents

Information acquisition method, device, equipment and storage medium Download PDF

Info

Publication number
CN116431078A
CN116431078A CN202310468489.4A CN202310468489A CN116431078A CN 116431078 A CN116431078 A CN 116431078A CN 202310468489 A CN202310468489 A CN 202310468489A CN 116431078 A CN116431078 A CN 116431078A
Authority
CN
China
Prior art keywords
information
target
character string
printing
embedded controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310468489.4A
Other languages
Chinese (zh)
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.)
SHENZHEN BITLAND INFORMATION TECHNOLOGY CO LTD
Original Assignee
SHENZHEN BITLAND INFORMATION 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 SHENZHEN BITLAND INFORMATION TECHNOLOGY CO LTD filed Critical SHENZHEN BITLAND INFORMATION TECHNOLOGY CO LTD
Priority to CN202310468489.4A priority Critical patent/CN116431078A/en
Publication of CN116431078A publication Critical patent/CN116431078A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of data processing, and discloses an information acquisition method, an information acquisition device and a storage medium, wherein the method comprises the following steps: storing information numbers corresponding to all the printing information in the embedded controller into a preset storage space; acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in a preset storage space by the target printing information; and searching target character string information corresponding to the target information number so as to output analysis information corresponding to the target printing information to the target text file based on the target character string information. According to the invention, the information numbers of the printing information stored in the preset storage space are acquired from the embedded controller, and the analysis information corresponding to the printing information is output to the target text file through the character string information corresponding to the information numbers, so that the technical problem that a great deal of historical debugging information of the EC cannot be acquired, and a great obstacle exists when an EC engineer analyzes the problem is solved.

Description

Information acquisition method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an information acquisition method, apparatus, device, and storage medium.
Background
With the development of industry and the progress of technology, computer devices are widely applied to daily life and work of people, and bring great convenience to the life and work of people. In the context of development debugging, stability testing, factory production, it may be necessary to obtain historical debugging information for the device from the device to allow the EC engineer to conduct problem analysis through the historical debugging information.
In the existing scheme, a serial port terminal of HOST can be used for acquiring real-time debugging information and historical debugging information of a computer through a UART (Universal Asynchronous Receiver/Transmitter, asynchronous receiving and transmitting Transmitter), but because the EC debugging information of the computer is stored in an EC RAM (Random Access Memory ) in a character string mode or other power-down non-lost storage media, the EC is a single-core embedded chip, the RAM and the power-down non-lost storage media are limited in space, and more character string information storage cannot be met.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide an information acquisition method, an information acquisition device and a storage medium, and aims to solve the technical problem that in the prior art, a great amount of historical debugging information of an EC cannot be acquired, so that an EC engineer has a great obstacle in problem analysis.
In order to achieve the above object, the present invention provides an information acquisition method, comprising the steps of:
storing information numbers corresponding to all the printing information in the embedded controller into a preset storage space;
acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in the preset storage space by the target printing information;
and searching target character string information corresponding to the target information number, and outputting analysis information corresponding to the target printing information to a target text file based on the target character string information.
Optionally, the step of acquiring, by the information parsing tool, the target printing information from the embedded controller, and acquiring a target information number of the target printing information stored in the preset storage space includes:
acquiring target printing information from the embedded controller through an information analysis tool, and reading a head offset address of the target printing information through the information analysis tool;
acquiring head information corresponding to the target printing information according to the head offset address;
and acquiring a target information number stored in the preset storage space by the target printing information based on the head information.
Optionally, before the step of storing the information numbers corresponding to all the printing information in the embedded controller in the preset storage space, the method further includes:
acquiring information numbers and character string information corresponding to all printing information in the embedded controller;
establishing a mapping relation based on the information number, the character string information and each piece of printing information, and storing the information number and the character string information into a preset configuration file when the establishment is completed;
correspondingly, the step of searching the target character string information corresponding to the target information number to output the analysis information corresponding to the target printing information to the target text file based on the target character string information includes:
and searching target character string information corresponding to the target information number based on the preset configuration file and the mapping relation, and outputting analysis information corresponding to the target printing information to a target text file based on the target character string information.
Optionally, the step of outputting the parsing information corresponding to the target printing information to the target text file based on the target character string information includes:
judging whether the target character string information has data parameters or not;
if the target character string information does not exist, determining the target character string information as analysis information corresponding to the target printing information, and outputting the analysis information to a target text file.
Optionally, after the step of determining whether the target string information has the data parameter, the method further includes:
if the data parameters exist, reading the data parameters, and determining the parameter types, the parameter quantity and the parameter data length of the data parameters;
and determining analysis information corresponding to the target printing information based on the target character string information, the parameter type, the parameter quantity and the parameter data length, and outputting the analysis information to a target text file.
Optionally, the step of obtaining, by an information parsing tool, the target printing information from the embedded controller includes:
receiving a signal input by a user through a graphical user interface of an information analysis tool;
and when the signal is an information acquisition signal, acquiring target printing information from the embedded controller through the signal analysis tool and a preset communication bus.
Optionally, the step of obtaining the information numbers and the character string information corresponding to all the printing information in the embedded controller includes:
acquiring information numbers, character string information and information parameters corresponding to all printing information in the embedded controller;
correspondingly, the step of storing the information numbers corresponding to all the printing information in the embedded controller into the preset storage space comprises the following steps:
determining input parameters of a printing information function based on the information number, the character string information and the information parameters;
and storing the information numbers corresponding to all the printing information in the embedded controller to a preset storage space based on the input parameters.
In addition, to achieve the above object, the present invention also proposes an information acquisition apparatus including:
the information storage module is used for storing the information numbers corresponding to all the printing information in the embedded controller into a preset storage space;
the information acquisition module is used for acquiring target printing information from the embedded controller through an information analysis tool and acquiring a target information number stored in the preset storage space by the target printing information;
and the information searching module is used for searching the target character string information corresponding to the target information number so as to output the analysis information corresponding to the target printing information to the target text file based on the target character string information.
In addition, to achieve the above object, the present invention also proposes an information acquisition apparatus including: a memory, a processor and an information acquisition program stored on the memory and executable on the processor, the information acquisition program configured to implement the steps of the information acquisition method as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon an information acquisition program which, when executed by a processor, implements the steps of the information acquisition method as described above.
In the invention, information numbers corresponding to all printing information in an embedded controller are stored in a preset storage space; acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in a preset storage space by the target printing information; searching target character string information corresponding to the target information number to output analysis information corresponding to the target printing information to the target text file based on the target character string information; compared with the prior art that the EC debugging information of the computer is stored in the EC RAM in the form of character strings or other power-down non-lost storage media, the invention obtains the information number stored in the preset storage space by the printing information from the embedded controller and outputs the analysis information corresponding to the printing information to the target text file through the character string information corresponding to the information number, thereby solving the technical problem that a great amount of historical debugging information of the EC cannot be obtained in the prior art, leading to larger obstacle for an EC engineer in analyzing the problem and further improving the efficiency of the EC engineer in solving the problem.
Drawings
Fig. 1 is a schematic structural diagram of an information acquisition device of a hardware running environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of an information acquisition method according to the present invention;
FIG. 3 is a diagram showing a storage format of print information in a first embodiment of the information acquisition method of the present invention;
FIG. 4 is a flowchart of a second embodiment of the information acquisition method of the present invention;
FIG. 5 is a flowchart of a third embodiment of an information acquisition method according to the present invention;
fig. 6 is a block diagram showing the structure of a first embodiment of the information acquisition apparatus of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of an information obtaining device of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the information acquisition apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the information acquisition apparatus, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an information acquisition program may be included in the memory 1005 as one type of storage medium.
In the information acquisition apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the information acquisition apparatus of the present invention may be provided in an information acquisition apparatus that invokes an information acquisition program stored in the memory 1005 through the processor 1001 and executes the information acquisition method provided by the embodiment of the present invention.
An embodiment of the present invention provides an information obtaining method, referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the information obtaining method of the present invention.
In this embodiment, the information acquisition method includes the following steps:
step S10: and storing the information numbers corresponding to all the printing information in the embedded controller into a preset storage space.
It should be noted that, the execution body of the method of the present embodiment may be an information acquisition device that acquires the history debug information of the computer in the development debug, the stability test and the factory production scenario, or other information acquisition systems that can implement the same or similar functions and include the information acquisition device. The information acquisition method provided by the present embodiment and the embodiments described below will be specifically described herein with an information acquisition system (hereinafter referred to as a system).
It should be appreciated that the print information described above may be debug information for a computer device EC (Embedded Controller ) in a development debug, stability test, factory production scenario.
It can be understood that the information number may be a number set in advance for debug information, and the value range may be 0 to 65535. In practical applications, the number corresponding to the debug information one may be set to 0, the number corresponding to the debug information two may be set to 1, and so on. Wherein, the information number corresponding to the debug information cannot be repeatedly set.
It should be understood that the above-mentioned preset storage space may be an area with a storage function in the EC, for example, RAM of the EC and a power-down non-loss storage medium, etc., which is not limited in this embodiment.
In a specific implementation, corresponding information numbers can be set for all the debug information in the embedded controller, and the information numbers corresponding to all the debug information are stored in the RAM of the embedded controller or the storage medium is not lost when power is lost.
Step S20: and acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in the preset storage space by the target printing information.
The information analysis tool may be a tool for analyzing print information in the embedded controller.
It should be understood that the target print information may be any debug information in the embedded controller, and in this embodiment, the latest print information in the embedded controller may be first used as the target print information. Correspondingly, the preset storage space stores a target information number corresponding to the target printing information.
It may be appreciated that the step of obtaining, by the information parsing tool, the target print information from the embedded controller may specifically include: receiving a signal input by a user through a graphical user interface of an information analysis tool; and when the signal is an information acquisition signal, acquiring target printing information from the embedded controller through the signal analysis tool and a preset communication bus.
The graphical user interface may be a GUI interface (Graphical User Interface, GUI).
It should be understood that the above-mentioned preset communication bus may be a bus for implementing communication between the CPU and the embedded controller, for example: ESPI (Enhanced Serial Peripheral Interface ) or LPC (Low Pin CountBus), which the present embodiment does not limit. In practical application, after the information analysis TOOL in EXE format is installed, the system can be changed into a GUI interface, so that a user can operate on the GUI interface conveniently, correspondingly, the GUI interface can receive a signal input by the user and detect the signal input by the user, if the signal input by the user is detected to be an information acquisition signal (i.e. debug information in the embedded controller needs to be acquired), the system can acquire target printing information through ESPI or LPC communication between the CPU and the EC by the information analysis TOOL cprints_tol, or acquire the target printing information in other modes, and finally convert the target printing information into bin format.
Further, in order to accurately obtain the information number corresponding to the print information in the embedded controller, the step S20 specifically includes: acquiring target printing information from the embedded controller through an information analysis tool, and reading a head offset address of the target printing information through the information analysis tool; acquiring head information corresponding to the target printing information according to the head offset address; and acquiring a target information number stored in the preset storage space by the target printing information based on the head information.
It should be noted that, the print information defines the size of the space according to the actual situation, and may be stored in the RAM or may be stored in a storage medium that is not lost when power is turned off, in this embodiment, a 4K space is taken as an example, and referring to fig. 3, fig. 3 is a schematic diagram of a storage format of the print information in the first embodiment of the information acquisition method of the present invention. As shown in fig. 3, the four Byte (0 x 00000003) counts of the first frame in fig. 3 are expressed as the offset address (i.e. the above-mentioned header offset address) of the last print information Head of the embedded controller, wherein the header offset address facilitates the tool to parse and query the debug information in order; four bytes (0 xA6 x59 0x 0000) of the second frame are parameter save formats of debug information one, the first two bytes (0 xA60x 59) are debug information start Head (i.e. the header information), and the second two bytes are debug information numbers (i.e. the target information numbers); the third box (0xA6 0x59 0x0001 Hello) is a parameter save format of debug information two, the first two bytes (0 x a6 x 59) are debug information start Head, the next two bytes are debug information numbers, and the rest are data input parameters entered in character form; the fourth box (0xA6 0x59 0x0002 0x0066 0x0088) is a parameter save format of debug info three, the first two bytes (0 x a6 x 59) are debug info start Head, the next two bytes are debug info numbers, and the rest are two data input parameters entered in integer form; debug information start Head is defined with two bytes fixed (0 xa60x 59) that add to equal OxFF, using a special format to facilitate tool lookup parsing. If the 4K space is full, the debugging information data can be stored from the 4K space to form a cycle; and if the Flash sector space is the Flash sector space, a sector block processing mechanism is adopted.
It should be understood that if the information number corresponding to the last piece of printing information in the embedded controller needs to be determined, the information parsing tool may first read the offset address of the last piece of printing information Head from the embedded controller to determine the position of the last piece of printing information, then read the Head (0 xa6 x 59) from the address, and then acquire the information numbers of two bytes immediately following the Head, that is, the information number of the target printing information stored in the preset storage space, so that the data input parameter and the special identifier are only stored in the RAM or the special identifier are not lost when power is lost, and the character string is not saved, thereby greatly saving space utilization.
In a specific implementation, after the system installs the information analysis TOOL in the EXE format, a user may operate on a GUI interface of the information analysis TOOL, and when the GUI interface receives an information acquisition signal input by the user, the system may acquire the latest print information in the embedded controller through ESPI or LPC communication between the CPU and the EC through the information analysis TOOL cprints_tol, and read a header offset address of the print information through cprints_tol, so as to determine a location of the print information, and then read the header information of the print information from the address, and acquire the information numbers of two bytes following the header information.
Step S30: and searching target character string information corresponding to the target information number, and outputting analysis information corresponding to the target printing information to a target text file based on the target character string information.
The target character string information may be character string information corresponding to target print information. In practical application, the character string information may be "Hello china-! The present embodiment is not limited thereto.
It should be understood that the character string information of the print information may include a character string and a data parameter, so that the print information may be parsed to obtain parsed information, and the character string or the data parameter obtained after parsing may be output to the target text file.
In a specific implementation, the print information, the character string information and the information number may have a one-to-one correspondence relationship, so after the target information number corresponding to the target print information is obtained, the corresponding target character string information may be determined by the target information number, and the analysis information corresponding to the target print information is output to the target text file according to the target character string information. In addition, after the analysis of the latest printing information is completed, the Head (0 xA60x 59) can be searched forward, the printing information is analyzed by the same method as the analysis of the target printing information, and the like, and finally, the analyzed printing information is output to the target text file, so that an EC engineer can view and clearly analyze the problem.
The embodiment discloses storing information numbers corresponding to all printing information in an embedded controller into a preset storage space; acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in a preset storage space by the target printing information; searching target character string information corresponding to the target information number to output analysis information corresponding to the target printing information to the target text file based on the target character string information; compared with the prior art that the EC debugging information of the computer is stored in the EC RAM in the form of character strings or other power-down non-lost storage media, the embodiment obtains the information number stored in the preset storage space by the printing information from the embedded controller and outputs the analysis information corresponding to the printing information to the target text file through the character string information corresponding to the information number, thereby solving the technical problem that a great amount of historical debugging information of the EC cannot be obtained in the prior art, leading to larger barriers for an EC engineer in the process of analyzing the problem, and further improving the efficiency of the EC engineer in solving the problem.
Referring to fig. 4, fig. 4 is a flowchart of a second embodiment of the information acquisition method of the present invention.
Based on the first embodiment, in this embodiment, before step S10, the method further includes:
step S01: and acquiring information numbers and character string information corresponding to all the printing information in the embedded controller.
Step S02: and establishing a mapping relation based on the information number, the character string information and each piece of printing information, and storing the information number and the character string information into a preset configuration file when the establishment is completed.
The mapping relationship may be a correspondence relationship among each print information, an information number of the print information, and character string information of the print information in the embedded controller.
It should be understood that the above-mentioned preset configuration file may be a file storing the information number and the character string information corresponding to the print information.
Correspondingly, the step S30 specifically includes:
step S30': and searching target character string information corresponding to the target information number based on the preset configuration file and the mapping relation, and outputting analysis information corresponding to the target printing information to a target text file based on the target character string information.
It can be understood that after the target information number of the target printing information is obtained, because the information numbers and the character string information of all the printing information are stored in the preset configuration file, and the information numbers and the character string information have mapping relations with the printing information, the target information number corresponding to the obtained target printing information is the target character string information corresponding to the target information number can be obtained by comparing the mapping relations in the preset configuration file.
In a specific implementation, the information numbers and the character string information corresponding to all the printing information in the embedded controller can be obtained, the mapping relation among the printing information, the information numbers corresponding to the printing information and the character string information corresponding to the printing information is established, the information numbers and the character string information of all the printing information are stored in a preset configuration file, after the target information numbers of the target printing file are obtained, the target character string information corresponding to the target information numbers can be compared and searched from the preset configuration file according to the pre-established mapping relation, and therefore analysis information corresponding to the target printing information is output to the target text file based on the target character string information.
Further, the step S01 specifically includes: acquiring information numbers, character string information and information parameters corresponding to all printing information in the embedded controller; correspondingly, the step S10 specifically includes: determining input parameters of a printing information function based on the information number, the character string information and the information parameters; and storing the information numbers corresponding to all the printing information in the embedded controller to a preset storage space based on the input parameters.
It should be noted that, the information parameter may be a data input parameter of the print information, for example: "Hello", this embodiment is not limited thereto.
It should be understood that the print information function may be a function for inputting print information, and in practical application, the EC engineer only needs to call the print information function interface when developing. The print information function (CPRINTS) supports input of information numbers, character string information, information parameters of different print information, and can input a plurality of data. In addition, the printing information function adopts a unique debugging information format design scheme, so that the EC engineer can develop and use the printing information, and the printing information format comprises an information number (unsigned short int PrintNo), character string information (const char) and information parameters, wherein the printing information function interface can be as follows: int CPRINTS (unsigned short int PrintNo, const char format, information parameters). For example: if the corresponding information number of the printing information is 0, and the information parameter includes character string information, the corresponding function of the printing information may be: CPRINTS (0, "Hello cina; if the information number corresponding to the second printing information is 1, and the information parameter includes character string information and a data input parameter and is input in a character form, the function corresponding to the second printing information may be: CPRINTS (1, "Hello china% s; if the information number corresponding to the printing information three is 2, and the information parameters include character string information and two data input parameters and are input in an integer form, the function corresponding to the printing information three can be: CPRINTS (2, "Hello china 0x%02x 0x%02 x|", value1, value 2).
According to the embodiment, the mapping relation is built based on the information numbers, the character string information and the printing information corresponding to all the printing information in the embedded controller, and the information numbers and the character string information are stored in the preset configuration file, so that the target character string information corresponding to the target information numbers can be searched based on the preset configuration file and the mapping relation, analysis information corresponding to the target printing information is output to the target text file based on the target character string information, accuracy of obtaining the information numbers corresponding to the printing information in the embedded controller is further improved, and information obtaining efficiency is improved.
Referring to fig. 5, fig. 5 is a flowchart of a third embodiment of the information acquisition method according to the present invention.
Based on the above embodiments, in this embodiment, the step S30 includes:
step S301: and judging whether the target character string information has data parameters or not.
The data parameter may be a parameter input in the form of an integer.
Step S302: if the target character string information does not exist, determining the target character string information as analysis information corresponding to the target printing information, and outputting the analysis information to a target text file.
It should be understood that if there is no parameter input in the form of an integer in the target string information, the string in the target string information may be directly output to the target text file.
It will be appreciated that, after the step S301, the method further includes: if the data parameters exist, reading the data parameters, and determining the parameter types, the parameter quantity and the parameter data length of the data parameters; and determining analysis information corresponding to the target printing information based on the target character string information, the parameter type, the parameter quantity and the parameter data length, and outputting the analysis information to a target text file.
If the character string information includes parameters input in the form of integers, the parameter type, the number of parameters, and the parameter data length of the parameters may be obtained, where the parameter type may be integer or character type. And reading the data parameters from the following addresses according to the parameter types, the parameter numbers and the parameter data length corresponding to the data parameters, splicing the data parameters into the character strings, determining the spliced data as analysis information of target character string information, and outputting the analysis information into the target text file.
In the specific implementation, after the target character string information of the target printing information is determined, whether the data parameter exists in the target character string information or not can be judged, if the data parameter does not exist, the target character string information can be determined to be the analysis information corresponding to the target printing information, the analysis information is output to the target text file, and if the data parameter exists in the target character string information, the parameter type, the parameter number and the parameter data length of the data parameter can be read to splice the parameter data into the character string in the character string information, and the spliced parameter data and the character string are output to the target text file.
According to the method and the device, whether the target character string information has the data parameters or not is judged, if the data parameters do not exist, the target character string information is determined to be the analysis information and output to the target text file, if the data parameters do not exist, the analysis information is determined according to the parameter types, the parameter number, the parameter length and the character string information corresponding to the data parameters, and the analysis information is output to the target text file, so that an EC engineer can clearly check the printing information and analyze the problem, and time cost is saved.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores an information acquisition program, and the information acquisition program realizes the steps of the information acquisition method when being executed by a processor.
Referring to fig. 6, fig. 6 is a block diagram showing the structure of a first embodiment of the information acquisition apparatus of the present invention.
As shown in fig. 6, an information acquisition apparatus according to an embodiment of the present invention includes:
the information storage module 601 is configured to store information numbers corresponding to all the printing information in the embedded controller into a preset storage space;
the information acquisition module 602 is configured to acquire target printing information from the embedded controller through an information analysis tool, and acquire a target information number stored in the preset storage space by the target printing information;
the information searching module 603 is configured to search for target string information corresponding to the target information number, so as to output resolution information corresponding to the target print information to a target text file based on the target string information.
Further, the information obtaining module 602 is further configured to receive a signal input by a user through a graphical user interface of the information analysis tool; and when the signal is an information acquisition signal, acquiring target printing information from the embedded controller through the signal analysis tool and a preset communication bus.
Further, the information obtaining module 602 is further configured to obtain, by using an information parsing tool, target print information from the embedded controller, and read, by using the information parsing tool, a header offset address of the target print information; acquiring head information corresponding to the target printing information according to the head offset address; and acquiring a target information number stored in the preset storage space by the target printing information based on the head information.
The information acquisition device of the embodiment discloses that information numbers corresponding to all printing information in an embedded controller are stored in a preset storage space; acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in a preset storage space by the target printing information; searching target character string information corresponding to the target information number to output analysis information corresponding to the target printing information to the target text file based on the target character string information; compared with the prior art that the EC debugging information of the computer is stored in the EC RAM in the form of character strings or other power-down non-lost storage media, the embodiment obtains the information number stored in the preset storage space by the printing information from the embedded controller and outputs the analysis information corresponding to the printing information to the target text file through the character string information corresponding to the information number, thereby solving the technical problem that a great amount of historical debugging information of the EC cannot be obtained in the prior art, leading to larger barriers for an EC engineer in the process of analyzing the problem, and further improving the efficiency of the EC engineer in solving the problem.
Based on the above-described first embodiment of the information acquisition apparatus of the present invention, a second embodiment of the information acquisition apparatus of the present invention is proposed.
In this embodiment, the information storage module 601 is further configured to obtain information numbers and character string information corresponding to all the print information in the embedded controller; and establishing a mapping relation based on the information number, the character string information and each piece of printing information, and storing the information number and the character string information into a preset configuration file when the establishment is completed.
Correspondingly, the information searching module 603 is further configured to search for target string information corresponding to the target information number based on the preset configuration file and the mapping relationship, so as to output resolution information corresponding to the target print information to a target text file based on the target string information.
Further, the information storage module 601 is further configured to obtain information numbers, character string information, and information parameters corresponding to all the print information in the embedded controller; determining input parameters of a printing information function based on the information number, the character string information and the information parameters; and storing the information numbers corresponding to all the printing information in the embedded controller to a preset storage space based on the input parameters.
According to the embodiment, the mapping relation is built based on the information numbers, the character string information and the printing information corresponding to all the printing information in the embedded controller, and the information numbers and the character string information are stored in the preset configuration file, so that the target character string information corresponding to the target information numbers can be searched based on the preset configuration file and the mapping relation, analysis information corresponding to the target printing information is output to the target text file based on the target character string information, accuracy of obtaining the information numbers corresponding to the printing information in the embedded controller is further improved, and information obtaining efficiency is improved.
Based on the above-described respective device embodiments, a third embodiment of the information acquisition device of the present invention is proposed.
In this embodiment, the information searching module 603 is further configured to determine whether the target string information has a data parameter; if the target character string information does not exist, determining the target character string information as analysis information corresponding to the target printing information, and outputting the analysis information to a target text file.
Further, the information searching module 603 is further configured to read the data parameter if the data parameter exists, and determine a parameter type, a parameter number and a parameter data length of the data parameter; and determining analysis information corresponding to the target printing information based on the target character string information, the parameter type, the parameter quantity and the parameter data length, and outputting the analysis information to a target text file.
According to the method and the device, whether the target character string information has the data parameters or not is judged, if the data parameters do not exist, the target character string information is determined to be the analysis information and output to the target text file, if the data parameters do not exist, the analysis information is determined according to the parameter types, the parameter number, the parameter length and the character string information corresponding to the data parameters, and the analysis information is output to the target text file, so that an EC engineer can clearly check the printing information and analyze the problem, and time cost is saved.
Other embodiments or specific implementation manners of the information obtaining apparatus of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read-only memory/random-access memory, magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. An information acquisition method, characterized in that the information acquisition method comprises:
storing information numbers corresponding to all the printing information in the embedded controller into a preset storage space;
acquiring target printing information from the embedded controller through an information analysis tool, and acquiring a target information number stored in the preset storage space by the target printing information;
and searching target character string information corresponding to the target information number, and outputting analysis information corresponding to the target printing information to a target text file based on the target character string information.
2. The information acquisition method according to claim 1, wherein the step of acquiring target print information from the embedded controller by an information parsing tool and acquiring a target information number stored in the preset storage space for the target print information includes:
acquiring target printing information from the embedded controller through an information analysis tool, and reading a head offset address of the target printing information through the information analysis tool;
acquiring head information corresponding to the target printing information according to the head offset address;
and acquiring a target information number stored in the preset storage space by the target printing information based on the head information.
3. The information acquisition method as set forth in claim 1, wherein before the step of storing the information numbers corresponding to all the print information in the embedded controller in the preset storage space, the method further includes:
acquiring information numbers and character string information corresponding to all printing information in the embedded controller;
establishing a mapping relation based on the information number, the character string information and each piece of printing information, and storing the information number and the character string information into a preset configuration file when the establishment is completed;
correspondingly, the step of searching the target character string information corresponding to the target information number to output the analysis information corresponding to the target printing information to the target text file based on the target character string information includes:
and searching target character string information corresponding to the target information number based on the preset configuration file and the mapping relation, and outputting analysis information corresponding to the target printing information to a target text file based on the target character string information.
4. The information acquisition method according to claim 3, wherein the step of outputting the resolution information corresponding to the target print information to a target text file based on the target character string information includes:
judging whether the target character string information has data parameters or not;
if the target character string information does not exist, determining the target character string information as analysis information corresponding to the target printing information, and outputting the analysis information to a target text file.
5. The information acquisition method according to claim 4, wherein after the step of judging whether the target character string information has the data parameter, further comprising:
if the data parameters exist, reading the data parameters, and determining the parameter types, the parameter quantity and the parameter data length of the data parameters;
and determining analysis information corresponding to the target printing information based on the target character string information, the parameter type, the parameter quantity and the parameter data length, and outputting the analysis information to a target text file.
6. The information acquisition method according to claim 1, wherein the step of acquiring the target print information from the embedded controller by an information parsing tool includes:
receiving a signal input by a user through a graphical user interface of an information analysis tool;
and when the signal is an information acquisition signal, acquiring target printing information from the embedded controller through the signal analysis tool and a preset communication bus.
7. The information acquisition method as claimed in claim 3, wherein the step of acquiring the information numbers and the character string information corresponding to all the print information in the embedded controller includes:
acquiring information numbers, character string information and information parameters corresponding to all printing information in the embedded controller;
correspondingly, the step of storing the information numbers corresponding to all the printing information in the embedded controller into the preset storage space comprises the following steps:
determining input parameters of a printing information function based on the information number, the character string information and the information parameters;
and storing the information numbers corresponding to all the printing information in the embedded controller to a preset storage space based on the input parameters.
8. An information acquisition apparatus, characterized in that the apparatus comprises:
the information storage module is used for storing the information numbers corresponding to all the printing information in the embedded controller into a preset storage space;
the information acquisition module is used for acquiring target printing information from the embedded controller through an information analysis tool and acquiring a target information number stored in the preset storage space by the target printing information;
and the information searching module is used for searching the target character string information corresponding to the target information number so as to output the analysis information corresponding to the target printing information to the target text file based on the target character string information.
9. An information acquisition apparatus, characterized in that the apparatus comprises: memory, a processor and an information acquisition program stored on the memory and executable on the processor, the information acquisition being configured to implement the steps of the information acquisition method according to any one of claims 1 to 7.
10. A storage medium having stored thereon an information acquisition program which, when executed by a processor, implements the steps of the information acquisition method according to any one of claims 1 to 7.
CN202310468489.4A 2023-04-23 2023-04-23 Information acquisition method, device, equipment and storage medium Pending CN116431078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310468489.4A CN116431078A (en) 2023-04-23 2023-04-23 Information acquisition method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310468489.4A CN116431078A (en) 2023-04-23 2023-04-23 Information acquisition method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116431078A true CN116431078A (en) 2023-07-14

Family

ID=87083155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310468489.4A Pending CN116431078A (en) 2023-04-23 2023-04-23 Information acquisition method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116431078A (en)

Similar Documents

Publication Publication Date Title
CN109325009B (en) Log analysis method and device
CN111428462B (en) Communication protocol template construction method and terminal equipment
CN108881251B (en) System and method for access analysis and standardization of any binary equipment
CN110196795B (en) Method and related device for detecting running state of mobile terminal application
CN111104269B (en) UART interface-based processor debugging method and system
CN111369237B (en) Data processing method and device and computer storage medium
CN110769002A (en) LabVIEW-based message analysis method, system, electronic device and medium
CN111209326B (en) Data query method, device, electronic equipment and storage medium
US20230315213A1 (en) Program download method for intelligent terminal and intelligent terminal
CN116431078A (en) Information acquisition method, device, equipment and storage medium
CN111737933A (en) SOC prototype verification method, system, equipment and medium
CN109889482B (en) Vehicle protocol analysis method and system
CN111736924B (en) Method, device, equipment and medium for accessing data acquisition instrument based on Lua script
CN111414299B (en) SSD (solid State disk) extension information acquisition method and device based on hdchart
CN114063943A (en) Data transmission system, method, device, medium, and apparatus
CN112380133A (en) Method and device for simulating instruction set simulator by using function library
CN113034873A (en) Sensor communication method, device and system
CN112559478A (en) Log generation method and device, terminal equipment and storage medium
CN111641419B (en) Version identification method, control method and system of radio frequency power amplifier of terminal
CN112463818B (en) Method, medium, equipment and system for inquiring information of storage bottom layer
CN117596256B (en) Data synchronization method, device, system, electronic equipment and readable storage medium
CN117931763A (en) Log information generation method of embedded system, electronic equipment and storage medium
CN111181948B (en) Method and device for driving existing functions by non-standard message
CN116662152A (en) Object attribute error correction method, device, equipment and storage medium
CN117009247A (en) Test method, device, equipment and medium

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