CN113672482A - Log message transmission method, device, equipment and medium of terminal equipment - Google Patents

Log message transmission method, device, equipment and medium of terminal equipment Download PDF

Info

Publication number
CN113672482A
CN113672482A CN202110908671.8A CN202110908671A CN113672482A CN 113672482 A CN113672482 A CN 113672482A CN 202110908671 A CN202110908671 A CN 202110908671A CN 113672482 A CN113672482 A CN 113672482A
Authority
CN
China
Prior art keywords
static
log
attribute
information
dynamic
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
CN202110908671.8A
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 Ape Man Innovation Technology Co ltd
Original Assignee
Shenzhen Ape Man Innovation 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 Ape Man Innovation Technology Co ltd filed Critical Shenzhen Ape Man Innovation Technology Co ltd
Priority to CN202110908671.8A priority Critical patent/CN113672482A/en
Publication of CN113672482A publication Critical patent/CN113672482A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the field of data transmission, and discloses a log message transmission method and device for terminal equipment, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring equipment information of terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type; inquiring a log file of the terminal equipment during operation; identifying the character string attribute of each log content in the log file; when the character string attribute is a dynamic attribute, transmitting the log content corresponding to the dynamic attribute to a dynamic mapping table to obtain a dynamic data table; when the character string attribute is the static attribute, extracting character string parameters of the log content corresponding to the static attribute, and transmitting the character string parameters to a static mapping table to obtain a static data table; and returning the log contents in the static data table and the dynamic data table to the front-end page so as to show the running data of the terminal equipment during running. The method and the device can improve the log content transmission efficiency of the terminal equipment.

Description

Log message transmission method, device, equipment and medium of terminal equipment
Technical Field
The present application relates to the field of data transmission, and in particular, to a method and an apparatus for transmitting a log message of a terminal device, an electronic device, and a computer-readable storage medium.
Background
The terminal device refers to a device that inputs programs and data to a computer or receives a result of processing output from the computer via a communication facility. At present, log content generated in the operation process of the terminal device is usually returned to the terminal user according to a network serial port, but in an actual service scene, the network serial port supports normal functions, and the remaining storage capacity and the connection bandwidth are very limited, so that the log content transmission of the terminal device with large data volume is difficult to support, and the efficiency of the log content of the terminal device in the transmission process is very low.
Disclosure of Invention
In order to solve the above technical problem or at least partially solve the above technical problem, the present application provides a method and an apparatus for transmitting a log message of a terminal device, an electronic device, and a computer-readable storage medium, which can reduce the data amount of the log content of the terminal device during the transmission process and improve the efficiency of transmitting the log content of the terminal device.
In a first aspect, the present application provides a log message transmission method for a terminal device, including:
acquiring equipment information of terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type;
inquiring a log file of the terminal equipment during operation;
identifying a character string attribute of each log content in the log file;
when the character string attribute is a dynamic attribute, transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table;
when the character string attribute is a static attribute, extracting a character string parameter of the log content corresponding to the static attribute, and transmitting the character string parameter to the static mapping table to obtain a static data table;
and returning the log contents in the static data table and the dynamic data table to a front-end page to display the running data of the terminal equipment during running.
It can be seen that, in the embodiment of the present application, by configuring the static mapping table and the dynamic mapping table of the terminal device, the storage location of data generated by the subsequent terminal device during operation can be obtained; secondly, according to the character string attribute of each log content in the log file generated by the terminal device during operation, the storage mode of each log content is determined, and the data volume of the subsequent log content in the transmission process can be reduced by extracting the character string parameter of the log content corresponding to the static attribute, so that the storage and bandwidth requirements of the network serial port in the transmission of the log message of the device can be reduced, and the transmission efficiency of the log message of the device is improved. Therefore, the log message transmission method for the terminal device provided by the embodiment of the application can reduce the data volume of the log content of the terminal device in the transmission process and improve the log content transmission efficiency of the terminal device.
In one possible implementation manner of the first aspect, the identifying the information category of the device information includes:
acquiring a field of the equipment information, and identifying the attribute of the equipment information according to the field;
and identifying the information category of the equipment information according to the attribute, wherein the information category comprises a static category and a dynamic category.
In a possible implementation manner of the first aspect, the configuring a static mapping table and a dynamic mapping table of the terminal device according to the information category includes:
acquiring description information of the device information corresponding to the information type as a static type, constructing a static message identifier of the description information, and creating a static mapping table of the device information in a key value pair form according to the description information and the static message identifier, wherein the static message number and the message character string are in one-to-one correspondence;
and constructing a dynamic message identifier of the device information corresponding to the dynamic category as the information category, and creating a dynamic mapping table of the device information according to the dynamic message identifier.
In a possible implementation manner of the first aspect, after configuring the static mapping table and the dynamic mapping table of the device information according to the information category, the method further includes:
acquiring the equipment identifier of the terminal equipment of the equipment information;
and according to the equipment identifier, carrying out identity marking on the static mapping table and the dynamic mapping table so as to establish a corresponding relation between the static mapping table and the dynamic mapping table and the terminal equipment of the equipment information.
In a possible implementation manner of the first aspect, the querying a log file of the terminal device during runtime includes:
responding to the operation of the terminal equipment, and performing identity authentication on the terminal equipment;
and when the identity authentication is successful, inquiring the running data recorded in the running operation process of the terminal equipment by using an inquiry statement to obtain a running log file of the terminal equipment.
In a possible implementation manner of the first aspect, the extracting a string parameter of a log content corresponding to the static attribute includes:
inquiring the content message identification and the operation parameter of the log content corresponding to the static attribute;
and taking the content message identification and the operation parameter as the character string parameter of the log content corresponding to the static attribute.
In a possible implementation manner of the first aspect, the transmitting the string parameter to the static mapping table to obtain a static data table includes:
acquiring a content message identifier and an operation parameter in the character string parameter, and matching the content message identifier with a static message number in the static data table;
inquiring the description information in the successfully matched static message number;
and updating the parameter placeholder in the description information according to the operation parameter corresponding to the content message identifier to obtain a static data table.
In a second aspect, the present application provides a log message transmission apparatus for a terminal device, where the apparatus, applied to a server, includes:
the mapping table configuration module is used for acquiring equipment information of the terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type;
the file query module is used for querying the log file of the terminal equipment during operation;
the attribute identification module is used for identifying the character string attribute of each log content in the log file;
the data transmission module is used for transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table when the character string attribute is the dynamic attribute;
the data transmission module is further configured to, when the string attribute is a static attribute, extract a string parameter of the log content corresponding to the static attribute, and transmit the string parameter to the static mapping table to obtain a static data table;
and the data display module is used for returning the log contents in the static data table and the dynamic data table to a front-end page so as to display the running data of the terminal equipment during running.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of transmitting log messages of a terminal device according to any of the above first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the log message transmission method of the terminal device according to any one of the above first aspects.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a log message transmission method of a terminal device according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a step of the log message transmission method of the terminal device provided in fig. 1 according to an embodiment of the present application;
fig. 3 is a schematic block diagram of a log message transmission apparatus of a terminal device according to an embodiment of the present application;
fig. 4 is a schematic internal structural diagram of an electronic device implementing a log message transmission method of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic flowchart of a log message transmission method of a terminal device according to an embodiment of the present application. The log message transmission method of the terminal device described in fig. 1 is applied to a server, and includes:
s1, collecting the equipment information of the terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type.
In this embodiment, the terminal device may be understood as a device that inputs a program and data to a computer through a communication facility and/or receives a processing result output by the computer, such as an intelligent home terminal, an intelligent conference desktop terminal, a financial intelligent terminal, and the like, and the device information refers to data describing the terminal device, such as identification information, function information, performance information, and the like of the terminal device. The identification information refers to device identification data, such as a device ID, describing the terminal device, the function information refers to data describing functions included in the terminal device, such as data of an intelligent positioning function, and the performance data refers to data describing hardware included in the terminal device, such as a processor model and a memory size.
Further, the embodiment of the application acquires data generated by the terminal device in the operation process, which are data not requiring description information and which are data requiring description information, by identifying the information attribute of the device information. The description information refers to annotation information of data generated by the terminal device in the operation process, and for example, the data generated by the terminal device in the operation process includes: the length is 1.4m, the height is 1.5m, and the width is 1.2m, then the length, the height, and the width are the description information.
As an embodiment of the present application, the identifying the information category of the device information includes: acquiring a field of the equipment information, identifying the attribute of the equipment information according to the field, and identifying the information category of the equipment information according to the attribute, wherein the information category comprises a static category and a dynamic category.
The field refers to the identification of each column in a two-dimensional table with a relational model as a data structure, for example, in time series data, the field may be time, the attribute is a data type for characterizing data in the time series data, and for example, the attribute of the time field may be time data generated in the time field.
Further, in the embodiment of the present application, the static category may be understood as that the device information generated during the operation of the terminal device is fixed and unchangeable, or some fixed parts in the device information can be changed, but after the changed parts are described in a parameterization mode, the parameters themselves may fully describe the category of this varying content, e.g., for smart home terminals, its popularity data (such as Hello, welcome, etc.) that appears during operation, because it is fixed and variable, therefore, the category of the welcome data can be used as a static category, for example, the time data (such as time: 11.30am) appearing in the operation process of the smart home terminal, and if the description information of the time data is deleted, the data of the 11.30am directly appears, and the information description of the time word is not influenced, so that the category of the time data can also be used as the static category.
Further, in this embodiment of the present application, the dynamic category is used to characterize the content of a character string that cannot be completely or partially determined before actual operation, such as a character string returned from a network interface, or other character strings referenced in the character string, like a% s placeholder of c language printf, such as "hello,% s, name", where name is the referenced other character strings, only providing the value of name cannot restore the character string that it actually points to, and the character string that name points to must be provided at the same time to finally resolve the restoration.
Further, according to the information category, a static mapping table and a dynamic mapping table of the device information are configured. The static mapping table and the dynamic mapping table are used for determining the storage position and the storage mode of data generated in the operation process of subsequent terminal equipment.
As an embodiment of the present application, referring to fig. 2, the configuring a static mapping table and a dynamic mapping table of the terminal device according to the information category includes:
s201, collecting description information of equipment information corresponding to the information type as a static type, constructing a static message identifier of the description information, and creating a static mapping table of the equipment information in a key value pair mode according to the description information and the static message identifier, wherein the static message number and the message character string are in one-to-one correspondence;
s202, constructing a dynamic message identifier of the device information corresponding to the information type as the dynamic type, and creating a dynamic mapping table of the device information according to the dynamic message identifier.
The static message identifier may be understood as an ID of the description information, and is used to represent identity information of the description information, it should be noted that a plurality of description fields may exist in one description information in different service scenarios to form more specific device information description content, and a parameter placeholder may exist in each description field to store a specific parameter generated in a subsequent terminal device in an operation process.
Optionally, the static message identifier and the dynamic message identifier may be constructed by a self-increment sequence algorithm.
Further, in order to avoid a change phenomenon of the device information during the upgrade maintenance process of the terminal device, the embodiment of the present application further includes, after configuring the static mapping table and the dynamic mapping table of the device information according to the information type: and acquiring the equipment identifier of the terminal equipment of the equipment information, and carrying out identity marking on the static mapping table and the dynamic mapping table according to the equipment identifier so as to establish a corresponding relation between the static mapping table and the dynamic mapping table and the terminal equipment of the equipment information, wherein the equipment identifier comprises an equipment version number plus an equipment UUID.
And S2, inquiring the log file of the terminal equipment during operation.
In the embodiment of the application, the operation of the terminal device may be triggered by a trigger instruction, the trigger instruction may be a switch instruction of the terminal device, and the log file refers to operation data generated by the terminal device in an operation process and includes functional data, performance data and the like. As an embodiment of the present application, the querying a log file of the terminal device during operation includes: and responding to the operation of the terminal equipment, performing identity authentication on the terminal equipment, and inquiring the operation data recorded in the operation process of the terminal equipment by using an inquiry statement when the identity authentication is successful to obtain a log file of the terminal equipment.
The identity authentication of the terminal equipment is used for identifying whether the terminal equipment establishes network connection with the corresponding server or not, and ensuring the data interaction security of the subsequent terminal equipment and the corresponding server. Optionally, the identity authentication of the terminal device may be performed by querying whether the device identifier of the terminal device is pre-registered in the server corresponding to the terminal device, and if the device identifier of the terminal device is not pre-registered, the identity authentication of the terminal device fails, and if the device identifier of the terminal device is pre-registered, the identity authentication of the terminal device succeeds.
Further, in an optional embodiment of the present application, the query statement may be an SQL statement, such as a select statement.
It should be noted that the running data generated in the running operation process of the terminal device may be recorded by a log generation script of the terminal device, and the log generation script may be compiled by a JavaScript scripting language.
And S3, identifying the character string attribute of each log content in the running log file.
In the embodiment of the application, the character string attribute of each log content in the running log file is identified so as to identify the subsequent transmission mode of each log content. The character string attribute is used for representing the content form of the corresponding log content, namely determining whether the log content is static content or dynamic content, and comprises a static attribute and a dynamic attribute. Optionally, the character string attribute may be determined by a content category of the log content, and a method for identifying the content category of the log content may refer to the method for identifying the information category of the device information in S1, which is not further described herein.
And S4, when the character string attribute is a dynamic attribute, transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table.
It should be understood that when the character string attribute is a dynamic attribute, it indicates that the log content corresponding to the character string attribute is a dynamic content, that is, the log content needs description information to clearly understand the meaning expressed by the log content, such as "xiaoming, welcome", so that the embodiment of the present application transmits the log content corresponding to the dynamic attribute to the dynamic mapping table, so as to transmit the operation data of the terminal device to a front-end page, which is convenient for a user to refer.
Optionally, the transmission of the log content corresponding to the dynamic attribute may be performed according to an identifier of the log content, that is, the identifier of the log content is matched with a dynamic message identifier in a dynamic data table, and the log content corresponding to the identifier that is successfully matched is transmitted to a character string of the dynamic message identifier, so as to obtain the dynamic data table.
And S5, when the character string attribute is a static attribute, extracting the character string parameter of the log content corresponding to the static attribute, and transmitting the character string parameter to the static mapping table to obtain a static data table.
It should be understood that when the character string attribute is a static attribute, it indicates that the log content corresponding to the character string attribute is a static content, that is, the log content can clearly understand the meaning expressed by the log content without description information, such as "hello world", and therefore, in the embodiment of the present application, the data amount of the subsequent log content in the transmission process is reduced by extracting the character string parameter of the log content corresponding to the static attribute, so that the storage and bandwidth requirements on the network serial port in the device log message transmission can be reduced, and the transmission efficiency of the device log message is improved.
As an embodiment of the present application, the extracting a string parameter of a log content corresponding to the static attribute includes: and inquiring the content message identification and the operation parameter of the log content corresponding to the static attribute, and taking the content message identification and the operation parameter as the character string parameter of the log content corresponding to the static attribute.
The content message identifier is used for representing the content identity of the log content, and the operation parameter refers to specific data generated in the operation process of the terminal device.
Further, the character string parameters are transmitted to the static mapping table in the embodiment of the application, so that the operation data of the terminal device is transmitted to a front-end page, and the user can conveniently look up the operation data.
As an embodiment of the present application, the transmitting the string parameter to the static mapping table to obtain a static data table includes: acquiring a content message identifier and an operation parameter in the character string parameters, matching the content message identifier with a static message number in the static data table, inquiring description information in the successfully matched static message number, and updating a parameter placeholder in the description information according to the operation parameter corresponding to the content message identifier to obtain the static data table.
Illustratively, the existing string parameter is "0001 +0x12345674, 123, a, B", wherein 0001 denotes a content message identifier of the log content, and "0 x12345674, 123, a, B" denotes an operation parameter of the log content, and the description information for querying the content message identifier and the static data table to be successfully matched is "Buffer% p length% d content% c,% c", and according to the operation parameter, updating a parameter placeholder of the description information results in "Buffer 0x12345674, length 123, content a, B".
And S6, returning the log contents in the static data table and the dynamic data table to a front-end page to show the running data of the terminal equipment during running.
According to the embodiment of the application, the log contents in the static data table and the dynamic data table are returned to the front-end page to display the running data of the terminal equipment in running, so that a user can conveniently check the equipment state of the terminal equipment in the running operation process in real time, and the user can conveniently monitor the running abnormal points of the terminal equipment to make rapid early warning.
Optionally, the log content in the static data table and the dynamic data table may be returned through a file transfer protocol, where the file transfer protocol may be an http/https protocol.
It can be seen that, in the embodiment of the present application, by configuring the static mapping table and the dynamic mapping table of the terminal device, the storage location of data generated by the subsequent terminal device during operation can be obtained; secondly, according to the character string attribute of each log content in the log file generated by the terminal device during operation, the storage mode of each log content is determined, and the data volume of the subsequent log content in the transmission process can be reduced by extracting the character string parameter of the log content corresponding to the static attribute, so that the storage and bandwidth requirements of the network serial port in the transmission of the log message of the device can be reduced, and the transmission efficiency of the log message of the device is improved. Therefore, the log message transmission method for the terminal device provided by the embodiment of the application can reduce the data volume of the log content of the terminal device in the transmission process and improve the log content transmission efficiency of the terminal device.
Fig. 3 is a functional block diagram of a log message transmission apparatus of a terminal device according to the present application.
The log message transmission apparatus 300 of the terminal device according to the present application may be installed in an electronic device. According to the realized functions, the log message transmission device of the terminal device may include a mapping table configuration module 301, a file query module 302, an attribute identification module 303, a data transmission module 304, and a data presentation module 305. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the mapping table configuration module 301 is configured to collect device information of a terminal device, identify an information category of the device information, and configure a static mapping table and a dynamic mapping table of the terminal device according to the information category;
the file query module 302 is configured to query a log file of the terminal device during operation;
the attribute identification module 303 is configured to identify a character string attribute of each log content in the log file;
the data transmission module 304 is configured to transmit, when the string attribute is a dynamic attribute, the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table;
the data transmission module 304 is further configured to, when the string attribute is a static attribute, extract a string parameter of the log content corresponding to the static attribute, and transmit the string parameter to the static mapping table to obtain a static data table;
the data display module 305 is configured to return the log contents in the static data table and the dynamic data table to a front-end page, so as to display the running data of the terminal device during running.
In detail, in the embodiment of the present application, when the modules in the log message transmission apparatus 300 of the terminal device are used, the same technical means as the log message transmission method of the terminal device described in fig. 1 and fig. 2 are adopted, and the same technical effect can be produced, and details are not described here again.
Fig. 4 is a schematic structural diagram of an electronic device implementing a log message transmission method of a terminal device according to the present application.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a log message transmission program of a terminal device, stored in the memory 11 and operable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the electronic device 1 by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (for example, executing a log message transmission program of a terminal device, etc.) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as a code of a log message transmission program of a terminal device, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device 1 and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices 1. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
Fig. 3 shows only the electronic device 1 with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The log message transmission program of the terminal device stored in the memory 11 of the electronic device 1 is a combination of a plurality of computer programs, and when running in the processor 10, can realize:
acquiring equipment information of terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type;
inquiring a log file of the terminal equipment during operation;
identifying a character string attribute of each log content in the log file;
when the character string attribute is a dynamic attribute, transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table;
when the character string attribute is a static attribute, extracting a character string parameter of the log content corresponding to the static attribute, and transmitting the character string parameter to the static mapping table to obtain a static data table;
and returning the log contents in the static data table and the dynamic data table to a front-end page to display the running data of the terminal equipment during running.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present application also provides a computer-readable storage medium, which stores a computer program that, when executed by a processor of an electronic device 1, may implement:
acquiring equipment information of terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type;
inquiring a log file of the terminal equipment during operation;
identifying a character string attribute of each log content in the log file;
when the character string attribute is a dynamic attribute, transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table;
when the character string attribute is a static attribute, extracting a character string parameter of the log content corresponding to the static attribute, and transmitting the character string parameter to the static mapping table to obtain a static data table;
and returning the log contents in the static data table and the dynamic data table to a front-end page to display the running data of the terminal equipment during running.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application and not for limiting, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.

Claims (10)

1. A log message transmission method of a terminal device is characterized in that the method applied to a server side comprises the following steps:
acquiring equipment information of terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type;
inquiring a log file of the terminal equipment during operation;
identifying a character string attribute of each log content in the log file;
when the character string attribute is a dynamic attribute, transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table;
when the character string attribute is a static attribute, extracting a character string parameter of the log content corresponding to the static attribute, and transmitting the character string parameter to the static mapping table to obtain a static data table;
and returning the log contents in the static data table and the dynamic data table to a front-end page to display the running data of the terminal equipment during running.
2. The log message transmission method of a terminal device according to claim 1, wherein the identifying the information category of the device information includes:
acquiring a field of the equipment information, and identifying the attribute of the equipment information according to the field;
and identifying the information category of the equipment information according to the attribute, wherein the information category comprises a static category and a dynamic category.
3. The method for transmitting log message of terminal device according to claim 1, wherein the configuring the static mapping table and the dynamic mapping table of the terminal device according to the information category comprises:
acquiring description information of the device information corresponding to the information type as a static type, constructing a static message identifier of the description information, and creating a static mapping table of the device information in a key value pair form according to the description information and the static message identifier, wherein the static message number and the message character string are in one-to-one correspondence;
and constructing a dynamic message identifier of the device information corresponding to the dynamic category as the information category, and creating a dynamic mapping table of the device information according to the dynamic message identifier.
4. The method for transmitting log message of terminal device according to claim 1, wherein after configuring the static mapping table and the dynamic mapping table of the device information according to the information category, further comprising:
acquiring the equipment identifier of the terminal equipment of the equipment information;
and according to the equipment identifier, carrying out identity marking on the static mapping table and the dynamic mapping table so as to establish a corresponding relation between the static mapping table and the dynamic mapping table and the terminal equipment of the equipment information.
5. The method for transmitting log message of terminal device according to claim 1, wherein said querying the log file of the terminal device during operation comprises:
responding to the operation of the terminal equipment, and performing identity authentication on the terminal equipment;
and when the identity authentication is successful, inquiring the running data recorded in the running operation process of the terminal equipment by using an inquiry statement to obtain a running log file of the terminal equipment.
6. The method for transmitting log message of terminal device according to claim 1, wherein said extracting the character string parameter of the log content corresponding to the static attribute comprises:
inquiring the content message identification and the operation parameter of the log content corresponding to the static attribute;
and taking the content message identification and the operation parameter as the character string parameter of the log content corresponding to the static attribute.
7. The method for transmitting the log message of the terminal device according to any one of claims 1 to 6, wherein the transmitting the string parameter to the static mapping table to obtain a static data table comprises:
acquiring a content message identifier and an operation parameter in the character string parameter, and matching the content message identifier with a static message number in the static data table;
inquiring the description information in the successfully matched static message number;
and updating the parameter placeholder in the description information according to the operation parameter corresponding to the content message identifier to obtain a static data table.
8. The log message transmission device of the terminal equipment is characterized in that the device applied to a server side comprises the following steps:
the mapping table configuration module is used for acquiring equipment information of the terminal equipment, identifying the information type of the equipment information, and configuring a static mapping table and a dynamic mapping table of the terminal equipment according to the information type;
the file query module is used for querying the log file of the terminal equipment during operation;
the attribute identification module is used for identifying the character string attribute of each log content in the log file;
the data transmission module is used for transmitting the log content corresponding to the dynamic attribute to the dynamic mapping table to obtain a dynamic data table when the character string attribute is the dynamic attribute;
the data transmission module is further configured to, when the string attribute is a static attribute, extract a string parameter of the log content corresponding to the static attribute, and transmit the string parameter to the static mapping table to obtain a static data table;
and the data display module is used for returning the log contents in the static data table and the dynamic data table to a front-end page so as to display the running data of the terminal equipment during running.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the log message transmission method of the terminal device according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements a log message transmission method of a terminal device according to any one of claims 1 to 7.
CN202110908671.8A 2021-08-09 2021-08-09 Log message transmission method, device, equipment and medium of terminal equipment Pending CN113672482A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110908671.8A CN113672482A (en) 2021-08-09 2021-08-09 Log message transmission method, device, equipment and medium of terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110908671.8A CN113672482A (en) 2021-08-09 2021-08-09 Log message transmission method, device, equipment and medium of terminal equipment

Publications (1)

Publication Number Publication Date
CN113672482A true CN113672482A (en) 2021-11-19

Family

ID=78541902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110908671.8A Pending CN113672482A (en) 2021-08-09 2021-08-09 Log message transmission method, device, equipment and medium of terminal equipment

Country Status (1)

Country Link
CN (1) CN113672482A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178709A (en) * 2006-11-08 2008-05-14 中兴通讯股份有限公司 Diary record system and method
US20090315744A1 (en) * 2008-06-18 2009-12-24 Microsoft Corporation Dynamic character encoding
CN110175001A (en) * 2019-05-27 2019-08-27 牧星机器人(江苏)有限公司 A kind of NOR-FLASH date storage method, computer equipment and storage medium
CN110795606A (en) * 2019-09-02 2020-02-14 西安交大捷普网络科技有限公司 Method for generating log analysis rule
CN111865895A (en) * 2020-05-29 2020-10-30 广西博士海意信息科技有限公司 Data secret transmission method and system based on cloud platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178709A (en) * 2006-11-08 2008-05-14 中兴通讯股份有限公司 Diary record system and method
US20090315744A1 (en) * 2008-06-18 2009-12-24 Microsoft Corporation Dynamic character encoding
CN110175001A (en) * 2019-05-27 2019-08-27 牧星机器人(江苏)有限公司 A kind of NOR-FLASH date storage method, computer equipment and storage medium
CN110795606A (en) * 2019-09-02 2020-02-14 西安交大捷普网络科技有限公司 Method for generating log analysis rule
CN111865895A (en) * 2020-05-29 2020-10-30 广西博士海意信息科技有限公司 Data secret transmission method and system based on cloud platform

Similar Documents

Publication Publication Date Title
CN113239106B (en) Excel file export method and device, electronic equipment and storage medium
CN111181769B (en) Network topological graph drawing method, system, device and computer readable storage medium
CN113806434A (en) Big data processing method, device, equipment and medium
CN114640707A (en) Message asynchronous processing method and device, electronic equipment and storage medium
CN108965403B (en) Operation and maintenance monitoring connection establishing method and terminal equipment
CN112486490B (en) Front-end code packaging method and device, electronic equipment and storage medium
CN111984293B (en) Information processing method, device and storage medium
CN113282854A (en) Data request response method and device, electronic equipment and storage medium
CN115409041B (en) Unstructured data extraction method, device, equipment and storage medium
CN115022397B (en) Interface parameter simplifying method and device, electronic equipment and storage medium
CN114727100B (en) Joint debugging method and device for monitoring equipment
CN113672482A (en) Log message transmission method, device, equipment and medium of terminal equipment
CN114840388A (en) Data monitoring method and device, electronic equipment and storage medium
CN114978964A (en) Communication announcement configuration method, device, equipment and medium based on network self-checking
CN114461531A (en) Platform adaptability test method, device, equipment and storage medium of test case
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN114003661A (en) Offline data entry method and device, electronic equipment and storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN112631675A (en) Workflow configuration method, device, equipment and computer readable storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN113657076B (en) Page operation record table generation method and device, electronic equipment and storage medium
CN115002011B (en) Flow bidirectional test method and device, electronic equipment and storage medium
CN110750597A (en) Data processing method and device, storage medium and processor
CN114357534B (en) Classroom training platform construction method, device, equipment and medium based on block chain
CN113452703B (en) Combined communication request response method and device, electronic equipment and readable storage 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