CN115858325B - Project log adjusting method, device, equipment and storage medium - Google Patents

Project log adjusting method, device, equipment and storage medium Download PDF

Info

Publication number
CN115858325B
CN115858325B CN202310055374.2A CN202310055374A CN115858325B CN 115858325 B CN115858325 B CN 115858325B CN 202310055374 A CN202310055374 A CN 202310055374A CN 115858325 B CN115858325 B CN 115858325B
Authority
CN
China
Prior art keywords
log
probability function
function model
item
specified index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310055374.2A
Other languages
Chinese (zh)
Other versions
CN115858325A (en
Inventor
胡伟
梁玫娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Youtejie Information Technology Co ltd
Original Assignee
Beijing Youtejie 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 Beijing Youtejie Information Technology Co ltd filed Critical Beijing Youtejie Information Technology Co ltd
Priority to CN202310055374.2A priority Critical patent/CN115858325B/en
Publication of CN115858325A publication Critical patent/CN115858325A/en
Application granted granted Critical
Publication of CN115858325B publication Critical patent/CN115858325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for adjusting an item log. Comprising the following steps: collecting logs of standard projects; acquiring a specified index probability function model and a general expression of a log descriptor according to the log of the standard item; and acquiring the log of the target item in the system, and adjusting the log of the target item according to the specified index probability function model and the general representation of the log descriptor. The standard project log which is high in quality and fully verified is adopted to obtain the appointed index probability function model and the general representation of the log descriptor, so that the log of the target project in the current system is adjusted by adopting the related information obtained based on the log of the target project, and the log output format is standardized, and the readability of the project log is improved.

Description

Project log adjusting method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for adjusting a project log.
Background
The log data is the basis of many enterprise applications such as fault removal, monitoring or electronic evidence collection, and the log data generally contains information such as date, IP address, running operation and the like, so that enterprises can reasonably use the log data according to the information contained in the log data.
However, for specific items, since the record content and the record format of each item are often inconsistent, the log of each item lacks a unified log output specification, so that it is difficult to maintain the readability and consistency of the item log, which causes trouble in the analysis of the subsequent log.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for adjusting project logs, which are used for realizing standard adjustment of each target project log in a system and improving the readability of the project logs.
According to a first aspect of the present invention, there is provided a method for adjusting an item log, including: collecting logs of standard projects;
acquiring a specified index probability function model and a general expression of a log descriptor according to the log of the standard item;
and acquiring a log of the original target item in the system, and adjusting the log of the original target item according to the specified index probability function model and the general representation of the log descriptor.
According to another aspect of the present invention, there is provided an adjustment apparatus for item logs, including: the log acquisition module of the standard item is used for acquiring the log of the standard item;
the model and general representation acquisition module is used for acquiring a specified index probability function model and general representation of the log descriptor according to the log of the standard item;
and the log adjustment module is used for acquiring the log of the original target item in the system and adjusting the log of the original target item according to the specified index probability function model and the general representation of the log descriptor.
According to another aspect of the present invention, there is provided an electronic apparatus including:
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 any one of the embodiments of the present invention.
According to another aspect of the invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to perform the method according to any of the embodiments of the invention.
According to the technical scheme, the specified index probability function model and the general expression of the log descriptor are obtained by adopting the standard item log which is high in quality and fully verified, so that the log of the original target item in the current system is adjusted by adopting the related information obtained based on the standard item log, and the log output format is standardized, and the readability of the item log is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for adjusting project logs according to a first embodiment of the present invention;
FIG. 2 is a flowchart of another method for adjusting project logs according to a first embodiment of the present invention;
FIG. 3 is a flowchart of a method for adjusting an item log according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an adjusting device for project logs according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for adjusting an item log according to an embodiment of the present invention, where the method may be performed by an adjusting device for an item log, and the device may be implemented in hardware and/or software. As shown in fig. 1, the method includes:
step S101, collecting a log of standard projects.
The standard item in this embodiment may be specifically obtained from a host platform gitub facing open source and private software items, and the standard item may be specifically star, watch, fork, etc., which is, of course, merely illustrative, and not limiting the specific type of the standard item in this embodiment. And the standard project is good and fully verified by practice, and the log expression thereof is toward best practice.
It should be noted that, in this embodiment, the items may be specifically distinguished according to the operation type or implementation function, and may include a plurality of files under each item, and a plurality of logs under each file, for example, the logs of the standard item may be an item a and an item B, and under the item a, the standard item may be divided into a file a and a file B according to the difference of storage paths, and the file a includes 100 logs, and the file B includes 500 logs; the method is divided into a file c and a file d according to the execution object, wherein 450 logs are included in the file c, and 550 logs are included in the file d, however, the type of the standard item, the number of files included in each standard item, and the number of logs included in each file are not limited, and the number of logs of the standard item collected in practical application is usually very huge.
And step S102, acquiring a specified index probability function model and a general representation of the log descriptor according to the log of the standard item.
Optionally, obtaining the specified index probability function model and the log description universal representation according to the log of the standard item includes: carrying out statistics on logs of all standard items to obtain specified indexes, wherein the specified indexes comprise log language, code quantity, log templates, the number of the log templates, the code quantity of files and the number of the templates in the files; acquiring a specified index probability function model according to the specified index; and carrying out semantic analysis on the logs of each standard item to obtain a log description universal representation.
Specifically, in this embodiment, the log language, the code amount, the log template, the number of log templates, the number of file codes, and the number of templates in the file of each standard item are obtained by counting the log of each standard item. Wherein the log language refers to the type of language used for the log, e.g., c, c++, java, python, golang, js, etc.; the code quantity refers to the total code quantity of each standard item, and the number of the log templates refers to the result of counting the number of the log templates adopted by all logs in the standard item; the file code amount refers to the code amount contained in each file in the standard item; the number of the templates in the file refers to the result of counting the number of the log templates adopted by the logs in each file in each standard item. For example, the standard item a contains a file a and a file b, 100 logs are contained in the file a, 500 logs are contained in the file b, and the standard item a has a log language c, a code amount of 5000, log templates of X-mode and Y-mode, a log template number of 2, a file code amount in the file a of 2000, a file code amount in the file b of 3000, a file template number in the file a of 2, and a file template number in the file b of 1. Of course, in this embodiment, only the standard item a is taken as an example for statistics, and the manner of obtaining each standard item by statistics for other standard items is substantially the same as that, and will not be described in detail in this embodiment.
It should be noted that, when the log templates of each standard item are counted, the log templates adopted by the log need to be identified, and the specific process of the identification mode of the log templates is as follows: the final source of the log format is a log or printf statement in the program source code, which consists of a fixed text handwritten by a programmer and a variable value generated in the running process of the program respectively, and if the source code is identified, the set text is directly matched; if there is no source code, a pattern recognition algorithm is used, i.e. the source code is pushed back from the original log text, and the log-fixed feature is obtained in reverse, called a template.
In one specific implementation, there are two logs, log 1:2015-09-18 07:50:58,035 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: receiving BP-1578427263-10.0.52.144-1441855472637:blk_1073741853_1029 src:/10.0.52.146:56860 dest:/10.0.52.145:50010, and Log 2:2015-09-18 07:50:59,143 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: receivedBP-1578427263-10.0.52.144-1441855472637:blk_1073741853_1029 src:/10.0.52.146:56860 dest:/10.0.52.145:50010 of size 134217728. The two logs have the same log template: < DATETIME > INFOorg. Apache. Hadoop.
hdfs.server.datanode.DataNode: * BP-<NUM>-<IP>-<NUM>:blk_<NUM>_
< NUM > src:/< IP >: < NUM > dest:/< IP >: < NUM >. Of course, this embodiment is merely illustrative, and the specific form of the log template is not limited.
Optionally, acquiring the specified index probability function model according to the specified index includes: grouping the logs of each standard item according to the log language to obtain a log cluster of the standard item; constructing a first appointed index probability function model according to the number of log templates and the code quantity in the log cluster of each standard item; and constructing a second specified index probability function model according to the file code quantity and the template quantity in the file in the log cluster of each standard item, wherein the first specified index probability function model and the second specified index probability function model are respectively matched with one type of log language.
Specifically, in this embodiment, the logs of each standard item are grouped according to the log language, so as to obtain a log cluster of the standard item, and statistics is performed on each standard item in the log cluster, so as to obtain an array including information such as the log language, the code amount, the log template, the number of log templates, the number of file codes, and the number of templates in the file. Then constructing a first specified index probability function model according to the file code quantity/the template quantity in the file of each standard item, namely constructing a coordinate system by taking the log template quantity as an abscissa and taking the code quantity as an ordinate, determining one point in the coordinate system according to the log template quantity and the code quantity, and sequentially connecting the determined points to form a curve serving as the first specified index probability function model; and similarly, constructing a second specified index probability function model according to the file code quantity and the number of the files in the log cluster of each standard item, wherein the first specified index probability function model and the second specified index probability function model which are acquired in the embodiment are in accordance with normal distribution. And each type of log language is provided with a corresponding first appointed index probability function model and a corresponding second appointed index probability function model respectively.
Optionally, performing semantic analysis on the log of each standard item to obtain a log description universal representation, including: calculating log descriptions adopted by the same semantics in the logs of each standard item, and counting the use frequency of each log description; and taking the log description with the highest semantic use frequency as a log description universal representation.
In this embodiment, the journals of the captured standard items are subjected to semantic analysis, and the journal descriptions adopted by the same semantics in the journals of the standard items are calculated, for example, for the address, some journals adopt the journal description as address, but some journals adopt the journal description as aad, and the statistics of the two journals can result in that the use frequency of aad is higher than that of address, and aad is used as a general representation of the address.
Step S103, acquiring the log of the original target item in the system, and adjusting the log of the original target item according to the specified index probability function model and the general representation of the log descriptor.
As shown in fig. 2, a flowchart of another method for adjusting an item log in this embodiment is shown, and step S103 mainly includes:
step S1031, obtaining a log of the original target item in the system, obtaining a log language matched with the log of the original target item, and determining a specified index probability function model corresponding to the matched log language.
The log of the original target item may be a log collected in the current system, and the collected log of the target item is usually nonstandard, and since the corresponding first specified index probability function model and the corresponding second specified index probability function model have been constructed for each type of log language, in this embodiment, the log of the original target item is first identified, and the matched log language is obtained, for example, when the language is determined to be c, the first specified index probability function model and the second specified index probability function model matched with c are obtained.
Step S1032, the log of the original target item is adjusted according to the specified index probability function model, so as to obtain the log of the first target item.
Optionally, the adjusting the log of the original target item according to the specified index probability function model includes: acquiring the number of to-be-adjusted log templates, the amount of to-be-adjusted codes, the amount of to-be-adjusted file codes and the number of templates in the to-be-adjusted file, which are contained in the log of the original target item; determining the number of log templates to be adjusted and the first distribution position of the code quantity to be adjusted in a first appointed index probability function model; determining the code quantity of the file to be adjusted and the second distribution position of the template quantity in the file to be adjusted in a second specified index probability function model; and according to the first distribution position and the second distribution position, the log of the original target item is adjusted according to the specified index, so that the log of the first target item is obtained.
In this embodiment, after determining the specific index probability function model, the determined specific index probability function model is adopted to adjust according to the specific index, where the specific index may specifically be a code amount, a log template amount, a file code amount, or a template amount in a file. Thereby adjusting the log of the standard item from the number of the specified indexes.
Step S1033, format adjustment is performed on the log of the first target item according to the log description general representation to obtain the log of the second target item.
Optionally, the adjusting the format of the log of the first target item according to the log description general representation to obtain the log of the second target item includes: carrying out semantic recognition on the logs of the first target item to obtain an original description mode adopted by each log semantic; when the original description mode adopted by each log semantic is different from the log description general representation, replacing the original description mode by the log description general representation to acquire the log of the second target item.
Specifically, after the standard item is adjusted from the number of the specified indexes, the adjusted log of the first target item is subjected to semantic recognition, for example, when the fact that the semantics comprise the address is determined, but the original description mode adopted by the address is address, because the address is determined to be the add in the prior general expression, the address is replaced by the add to obtain the log of the second target item, so that the original target log is adjusted to the log of the second target item with the standard format, the readability of the log of the item is improved, and the user can conveniently and accurately and efficiently perform log analysis according to the log of the second target item.
According to the embodiment of the invention, the standard project log which is high in quality and fully verified is adopted to obtain the specified index probability function model and the general representation of the log descriptor, so that the log of the original target project in the current system is adjusted by adopting the related information obtained based on the log of the target project, and the log output format is standardized, thereby improving the readability of the project log.
Example two
Fig. 3 is a flowchart of a method for adjusting an item log according to a second embodiment of the present invention, and the embodiment is based on the above embodiment, and the step S1032 is specifically described. As shown in fig. 3, the method includes:
step S201, obtaining the number of to-be-adjusted log templates, the amount of to-be-adjusted codes, the amount of to-be-adjusted file codes and the number of templates in the to-be-adjusted file, which are contained in the log of the original target item.
Step S202, determining first distribution positions of the number of log templates to be adjusted and the code quantity to be adjusted in a first specified index probability function model.
Specifically, since the first specified index probability function model accords with normal distribution, the number of log templates to be adjusted and the first distribution position of the code amount to be adjusted can be determined according to the first specified index probability function model, a better log is determined when the first distribution position is determined to fall within 1 standard deviation, and a worse log is determined when the first distribution position falls outside 1 standard deviation.
And step S203, determining the code quantity of the file to be adjusted and the second distribution position of the template quantity in the file to be adjusted in the second specified index probability function model.
The second distribution position of the code quantity of the file to be adjusted and the number of templates in the file to be adjusted can be determined according to the second specified index probability function model, and a good log is determined when the second distribution position is determined to be within 1 standard deviation, and a poor log is determined when the second distribution position is determined to be outside 1 standard deviation.
Step S204, the log of the original target item is adjusted according to the specified index according to the first distribution position and the second distribution position.
The first distribution position is determined from the whole item, and the second distribution position is determined from the file, for example, when it is determined that the first position falls outside 1 standard deviation, it is determined that the code amount or the number of log templates needs to be reduced, but since the code amount is specifically configured by the code amount of the file, it is possible to determine according to the second position, for example, when it is determined that the second position corresponding to the code amount of the file a and the number of templates in the file a is outside 1 standard deviation, it is determined that the code amount of the file a or the number of templates in the file a is reduced.
According to the embodiment of the invention, the standard project log which is high in quality and fully verified is adopted to obtain the specified index probability function model and the general representation of the log descriptor, so that the log of the original target project in the current system is adjusted by adopting the related information obtained based on the log of the target project, and the log output format is standardized, thereby improving the readability of the project log. And determining the adjusting direction on the whole through the acquired first distribution position, and precisely determining the adjusting position through the acquired second distribution position, so that the accuracy of adjusting the original target item is further improved.
Example III
Fig. 4 is a schematic structural diagram of an adjustment device for item logs according to a third embodiment of the present invention. As shown in fig. 4, the apparatus includes: a standard project journal acquisition module 310, a model and generic representation acquisition module 320, and a journal adjustment module 330.
A log collection module 310 of standard items, configured to collect logs of the standard items;
a model and general representation acquisition module 320, configured to acquire a specified index probability function model and a general representation of a log descriptor according to a log of a standard item;
the log adjustment module 330 is configured to obtain a log of the original target item in the system, and adjust the log of the original target item according to the specified index probability function model and the universal representation of the log descriptor.
Optionally, the model and generic representation acquisition module includes:
the specified index acquisition sub-module is used for carrying out statistics on the logs of each standard item to acquire specified indexes, wherein the specified indexes comprise log languages, code amounts, log templates, the number of the log templates, the code amounts of files and the number of the templates in the files;
the specified index probability function model acquisition sub-module is used for acquiring a specified index probability function model according to the specified index;
and the log description general representation acquisition sub-module is used for carrying out semantic analysis on the logs of all standard items to acquire log description general representation.
Optionally, the specified index probability function model obtaining submodule is used for grouping the logs of each standard item according to the log language to obtain a log cluster of the standard item;
constructing a first appointed index probability function model according to the number of log templates and the code quantity in the log cluster of each standard item;
and constructing a second specified index probability function model according to the file code quantity and the template quantity in the file in the log cluster of each standard item, wherein the first specified index probability function model and the second specified index probability function model are respectively matched with one type of log language.
Optionally, the log description general representation acquisition submodule is used for calculating log descriptions adopted by the same semantics in the logs of all standard items and counting the use frequency of each log description;
and taking the log description with the highest semantic use frequency as a log description universal representation.
Optionally, the log adjustment module includes: the log language acquisition sub-module is used for acquiring log languages matched with the log of the original target item and determining a specified index probability function model corresponding to the matched log languages;
the log acquisition sub-module is used for adjusting the log of the original target item according to the specified index probability function model so as to acquire the log of the first target item;
and the log acquisition sub-module is used for carrying out format adjustment on the log of the first target item according to the log description universal representation so as to acquire the log of the second target item.
Optionally, the log obtaining submodule of the first target item is used for obtaining the number of to-be-adjusted log templates, the to-be-adjusted code amount, the to-be-adjusted file code amount and the number of templates in the to-be-adjusted file, which are contained in the log of the original target item;
determining the number of log templates to be adjusted and the first distribution position of the code quantity to be adjusted in a first appointed index probability function model;
determining the code quantity of the file to be adjusted and the second distribution position of the template quantity in the file to be adjusted in a second specified index probability function model;
and according to the first distribution position and the second distribution position, the log of the original target item is adjusted according to the specified index.
Optionally, the log obtaining sub-module of the second target item is configured to perform semantic recognition on the log of the first target item, and obtain an original description mode adopted by each log semantic;
when the original description mode adopted by each log semantic is different from the log description general representation, replacing the original description mode by the log description general representation to acquire the log of the second target item.
The device for adjusting the project log provided by the embodiment of the invention can execute the method for adjusting the project log provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, the adjustment method of the item log.
In some embodiments, the method of adjusting the project log may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the above-described adjustment method of the item log may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of adjustment of the project log in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method for adjusting an item log, comprising:
collecting logs of standard projects;
acquiring a specified index probability function model and a general expression of a log descriptor according to the log of the standard item;
acquiring a log of an original target item in a system, and adjusting the log of the original target item according to the specified index probability function model and the general representation of the log descriptor;
the method for obtaining the specified index probability function model and the general representation of the log description according to the log of the standard item comprises the following steps:
carrying out statistics on logs of each standard item to obtain specified indexes, wherein the specified indexes comprise log language, code quantity, log templates, log template quantity, file code quantity and template quantity in a file;
acquiring the specified index probability function model according to the specified index;
carrying out semantic analysis on the logs of each standard item to obtain the log description universal representation;
the obtaining the specified index probability function model according to the specified index comprises the following steps:
grouping the logs of each standard item according to the log language to obtain a log cluster of the standard item;
constructing a first specified index probability function model according to the number of the log templates and the code quantity in the log clusters of each standard item;
and constructing a second specified index probability function model according to the file code quantity and the template quantity in the file in the log cluster of each standard item, wherein the first specified index probability function model and the second specified index probability function model are respectively matched with one type of log language.
2. The method of claim 1, wherein said semantically analyzing the log of each of the standard items to obtain the log description generic representation comprises:
calculating log descriptions adopted by the same semantics in the logs of each standard item, and counting the use frequency of each log description;
and taking the log description with the highest semantic use frequency as the general representation of the log description.
3. The method of claim 2, wherein said adjusting the log of the original target item according to the specified-index probability function model and the log descriptor generic representation comprises:
acquiring log languages matched with the log of the original target item, and determining a specified index probability function model corresponding to the matched log languages;
according to the specified index probability function model, the log of the original target item is adjusted according to specified indexes, so that the log of the first target item is obtained;
and carrying out format adjustment on the log of the first target item according to the log description universal representation so as to acquire the log of the second target item.
4. A method according to claim 3, wherein said adjusting the log of the original target item according to the specified index probability function model according to the specified index comprises:
acquiring the number of to-be-adjusted log templates, the amount of to-be-adjusted codes, the amount of to-be-adjusted file codes and the number of templates in the to-be-adjusted file, which are contained in the log of the original target item;
determining the number of the log templates to be adjusted and the first distribution position of the code quantity to be adjusted in the first specified index probability function model;
determining the code quantity of the file to be adjusted and the second distribution position of the template quantity in the file to be adjusted in the second specified index probability function model;
and according to the first distribution position and the second distribution position, the log of the original target item is adjusted according to a specified index.
5. A method according to claim 3, wherein said formatting the log of the first target item according to the log description generic representation to obtain a log of a second target item comprises:
carrying out semantic recognition on the log of the first target item to obtain an original description mode adopted by each log semantic;
when the original description mode adopted by each log semantic is different from the log description general representation, replacing the original description mode by the log description general representation to acquire the log of the second target item.
6. An adjustment device for an item log, comprising:
the log acquisition module of the standard item is used for acquiring the log of the standard item;
the model and general representation acquisition module is used for acquiring a specified index probability function model and general representation of the log descriptor according to the log of the standard item;
the log adjustment module is used for acquiring the log of the original target item in the system and adjusting the log of the original target item according to the specified index probability function model and the general representation of the log descriptor;
the model and generic representation acquisition module includes:
the specified index acquisition submodule is used for carrying out statistics on the logs of each standard item to acquire specified indexes, wherein the specified indexes comprise log languages, code amounts, log templates, the number of the log templates, the code amounts of files and the number of the templates in the files;
the specified index probability function model acquisition sub-module is used for acquiring the specified index probability function model according to the specified index;
the log description general representation acquisition sub-module is used for carrying out semantic analysis on the logs of the standard items to acquire the log description general representation;
the specified index probability function model acquisition submodule is used for grouping the logs of each standard item according to the log language to acquire a log cluster of the standard item;
constructing a first specified index probability function model according to the number of the log templates and the code quantity in the log clusters of each standard item;
and constructing a second specified index probability function model according to the file code quantity and the template quantity in the file in the log cluster of each standard item, wherein the first specified index probability function model and the second specified index probability function model are respectively matched with one type of log language.
7. An electronic device, the 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 any one of claims 1-5.
8. A computer readable storage medium storing computer instructions for causing a processor to perform the method of any one of claims 1-5.
CN202310055374.2A 2023-01-17 2023-01-17 Project log adjusting method, device, equipment and storage medium Active CN115858325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310055374.2A CN115858325B (en) 2023-01-17 2023-01-17 Project log adjusting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310055374.2A CN115858325B (en) 2023-01-17 2023-01-17 Project log adjusting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115858325A CN115858325A (en) 2023-03-28
CN115858325B true CN115858325B (en) 2023-08-11

Family

ID=85657518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310055374.2A Active CN115858325B (en) 2023-01-17 2023-01-17 Project log adjusting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115858325B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815306A (en) * 2016-12-16 2017-06-09 中铁程科技有限责任公司 Daily record analysis method and device
CN111221521A (en) * 2019-12-31 2020-06-02 奇安信科技集团股份有限公司 Method and device for generating log code, computer system and readable storage medium
CN113297051A (en) * 2021-07-26 2021-08-24 云智慧(北京)科技有限公司 Log analysis processing method and device
CN113986643A (en) * 2020-07-27 2022-01-28 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for analyzing log file
CN114428715A (en) * 2020-10-29 2022-05-03 卫宁健康科技集团股份有限公司 Log processing method, device and system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815306A (en) * 2016-12-16 2017-06-09 中铁程科技有限责任公司 Daily record analysis method and device
CN111221521A (en) * 2019-12-31 2020-06-02 奇安信科技集团股份有限公司 Method and device for generating log code, computer system and readable storage medium
CN113986643A (en) * 2020-07-27 2022-01-28 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for analyzing log file
CN114428715A (en) * 2020-10-29 2022-05-03 卫宁健康科技集团股份有限公司 Log processing method, device and system and storage medium
CN113297051A (en) * 2021-07-26 2021-08-24 云智慧(北京)科技有限公司 Log analysis processing method and device

Also Published As

Publication number Publication date
CN115858325A (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN109471783B (en) Method and device for predicting task operation parameters
CN111414376A (en) Data early warning method and device
CN114461644A (en) Data acquisition method and device, electronic equipment and storage medium
CN114021156A (en) Method, device and equipment for organizing vulnerability automatic aggregation and storage medium
CN115222444A (en) Method, apparatus, device, medium and product for outputting model information
CN114978877A (en) Exception handling method and device, electronic equipment and computer readable medium
CN116309963B (en) Batch labeling method and device for images, electronic equipment and storage medium
CN115048352B (en) Log field extraction method, device, equipment and storage medium
CN115858325B (en) Project log adjusting method, device, equipment and storage medium
CN115544010A (en) Mapping relation determining method and device, electronic equipment and storage medium
CN115563310A (en) Method, device, equipment and medium for determining key service node
CN115330540A (en) Method and device for processing transaction data
CN115249043A (en) Data analysis method and device, electronic equipment and storage medium
CN113076254A (en) Test case set generation method and device
CN117150215B (en) Assessment result determining method and device, electronic equipment and storage medium
CN116431698B (en) Data extraction method, device, equipment and storage medium
CN117272970B (en) Document generation method, device, equipment and storage medium
CN115511014B (en) Information matching method, device, equipment and storage medium
CN117742900B (en) Method, device, equipment and storage medium for constructing service call graph
CN115686517A (en) Front-end page point burying method and device based on mobile development platform, electronic equipment and storage medium
CN115129673A (en) Log processing method and device, electronic equipment and storage medium
CN116401269A (en) Data query method and device, electronic equipment and storage medium
CN117573491A (en) Positioning method, device, equipment and storage medium for performance bottleneck
CN111159010A (en) Defect collecting method, defect reporting method and related device
CN116089499A (en) Data statistics method, device and medium based on kafka data volume

Legal Events

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