CN111290355B - Method for recording and searching log - Google Patents

Method for recording and searching log Download PDF

Info

Publication number
CN111290355B
CN111290355B CN202010123700.5A CN202010123700A CN111290355B CN 111290355 B CN111290355 B CN 111290355B CN 202010123700 A CN202010123700 A CN 202010123700A CN 111290355 B CN111290355 B CN 111290355B
Authority
CN
China
Prior art keywords
log
transaction
execution system
manufacturing execution
system server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010123700.5A
Other languages
Chinese (zh)
Other versions
CN111290355A (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.)
Cec Jiutian Intelligent Technology Co ltd
Original Assignee
Cec Jiutian Intelligent 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 Cec Jiutian Intelligent Technology Co ltd filed Critical Cec Jiutian Intelligent Technology Co ltd
Priority to CN202010123700.5A priority Critical patent/CN111290355B/en
Publication of CN111290355A publication Critical patent/CN111290355A/en
Application granted granted Critical
Publication of CN111290355B publication Critical patent/CN111290355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4184Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by fault tolerance, reliability of production system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/31From computer integrated manufacturing till monitoring
    • G05B2219/31088Network communication between supervisor and cell, machine group
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for recording and searching Log, which is characterized in that a Log query interface is additionally arranged in a client of a manufacturing execution system, a Log view table is displayed on the interface, the Log view table contains transaction ID, Log brief information data in the Log view table is queried on the interface, Log brief information of abnormal transactions is found, the manufacturing execution system server is connected to a server through the Log brief information, a corresponding Log document is read, corresponding Log information is found from the Log document, the Log information is stored in a Log Msg table of a database and is displayed on the interface of the client, the manufacturing execution system operation and maintenance personnel search problems by checking the Log information, the whole Log search operation process does not exceed 30 seconds, the time for searching problems of the manufacturing execution system operation and maintenance personnel is greatly shortened, and the Log information is stored in the Log Msg table of the database and can be directly obtained from the database when the transaction Log is queried again, avoiding occupying server resources.

Description

Method for recording and searching log
Technical Field
The invention relates to the technical field of log record query, in particular to a log recording and searching method.
Background
The equipment module control system controls different production processes or different products according to stages, and a system between the manufacturing execution system and the automation equipment is responsible for transmitting product information of the manufacturing execution system to each equipment machine, controlling the balance of products in process, collecting process data of the products in process, monitoring the data in real time, measuring the data, judging the data and the like and uploading the data to the uploading system.
The manufacturing execution system is a production execution management system in the manufacturing industry. When a real-time event occurs at the factory, the manufacturing execution system can react to it, report it in time, and guide and process it with the current accurate data.
In the operation of the manufacturing execution system, due to configuration problems of certain attributes, a result or a data error occurs after data of a product performs some operation actions, or an error reporting problem occurs in the operation of the manufacturing execution system, if a system operation and maintenance person needs to find out a problem or a reason, a log of an operation transaction needs to be searched in a server of the manufacturing execution system, the searching process is complex, and it takes 5 minutes to 10 minutes to find out the log each time, so that time for finding and solving the problem is prolonged, even when a major problem occurs in the manufacturing execution system, a large amount of data abnormality may be caused due to the 10 minutes which are excessive, and system abnormality or economic loss is caused.
Disclosure of Invention
The present invention is directed to a method for recording and searching logs to solve the above problems.
In order to achieve the above object, the present disclosure provides a method of recording a log, including:
the manufacturing execution system server receives a first message from the equipment terminal, which is processed by the equipment module control system;
the manufacturing execution system server executes the transaction corresponding to the first message, writes the transaction into the log, and generates a second message to be fed back to the equipment module control system after the transaction is finished;
after the transaction is executed, the manufacturing execution system server writes log information into a LogView table of a database through multithreading, wherein the log information comprises a transaction ID;
and if the multithreading queue exceeds the maximum queue number set by the manufacturing execution system server, the manufacturing execution system server forwards the log information to the log server, and the log server writes the log information into a LogView table of the database through multithreading.
The disclosure also provides a method for searching log, based on the log recording method, including the following steps:
the manufacturing execution system server receives a third message from the client and executes a GetLog transaction corresponding to the third message;
according to the transaction ID contained in the GetLog transaction information, a manufacturing execution system server is connected with a server host, and log information generated when the transaction ID runs is read and stored in a LogMsg table of a database;
the manufacturing execution system server feeds back a completion signal to the client.
The invention has the beneficial effects that:
the invention adds an interface for inquiring log in the client of the manufacturing execution system, the interface displays a LogView table and comprises a transaction ID, log brief information data in the LogView table is inquired through the interface, then finding the Log brief information of abnormal affair, then making execution system server to connect to server through Log brief information, reading corresponding Log file, finding out corresponding Log information from Log file, storing in Log Msg table of database, and displayed in the interface of the client, the operation and maintenance personnel of the manufacturing execution system searches for the problem by checking the log information, the whole log searching operation process does not exceed 30 seconds, the time for searching the problem by the operation and maintenance personnel of the manufacturing execution system is greatly shortened, and because the log information is already stored in the LogMsg table of the database, when the transaction log is inquired again, the transaction log can be directly acquired from the database, and the occupation of server resources is avoided.
On the basis of the technical scheme, the invention can be further improved as follows:
preferably, when the manufacturing execution system server executes the transaction, the log information recorded includes the transaction ID and the TimeKey.
Preferably, the client lists a LogView table for querying anomalous transaction data.
Preferably, the client queries the LogMsg table according to the transaction ID, displays the query result if the LogMsg table is found, and sends a third message to the manufacturing execution system server if the LogMsg table is empty of data.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart of a method of recording log according to the present invention;
FIG. 2 is a flow chart of a method of finding log according to the present invention.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
As shown in fig. 1, the method for recording log according to the present invention includes the following steps:
the manufacturing execution system server receives a first message from the equipment terminal, which is processed by the equipment module control system;
the manufacturing execution system server executes the transaction corresponding to the first message, writes the transaction into the log, and generates a second message to be fed back to the equipment module control system after the transaction is finished;
after the transaction is executed, the manufacturing execution system server writes log information into a LogView table of a database through multithreading, wherein the log information comprises a transaction ID;
and if the multithreading queue exceeds the maximum queue number set by the manufacturing execution system server, the manufacturing execution system server forwards the log information to the log server, and the log server writes the log information into a LogView table of the database through multithreading.
Preferably, when the manufacturing execution system server executes the transaction, the log information recorded includes the transaction ID and the TimeKey.
The log recording process of the present invention is as follows:
1. the equipment end sends information to the equipment module control system through a protocol;
2. the equipment module control system sends XML information to the manufacturing execution system server through the TIB after processing;
or the operator operates the client, and after the manufacturing execution system function is executed, the client sends the XML message to the manufacturing execution system server through the TIB;
3. the manufacturing execution system server receives the XML message, starts to execute the corresponding affair according to the messageName of the XML message, writes a log document in the server when the affair is executed, each line of log information has ID and TimeKey for recording the affair, and the recorded log content comprises: the method name and parameters of the transaction call, the return value after each method runs, the self-defined Log information in the method and the Log information of API running;
4. generating XML information after the transaction is finished, and feeding back the operation result and the error information (null information if no error is reported) through the TIB;
5. after the transaction is executed, log information is written into a LogView table of a database through multiple threads, wherein the log information comprises: a transaction ID, a transaction Name, a TimeKey, a UserID (EQname), a manufacturing execution system server Name, received XML information, feedback XML information, an operation result, and error information (null if no error is reported);
6. because the transaction amount of the manufacturing execution system is large, a plurality of servers insert own transaction information in real time, and table lock or database lock may occur when a transaction log is inserted, which affects the stability of the servers, the multithreading queue exceeds the maximum queue amount 10 set by the manufacturing execution system server, so that the log information is generated into XML and is forwarded to the log server, and after receiving the XML, the log server writes the log information into the LogView table of the database through a plurality of threads.
As shown in fig. 2, the log search method according to the present invention, based on the log record method, includes the following steps:
the manufacturing execution system server receives a third message from the client and executes a GetLog transaction corresponding to the third message;
according to the transaction ID contained in the GetLog transaction information, a manufacturing execution system server is connected with a server host, and log information generated when the transaction ID runs is read and stored in a LogMsg table of a database;
the manufacturing execution system server feeds back a completion signal to the client.
Preferably, the client lists a LogView table for querying anomalous transaction data.
Preferably, the client queries the LogMsg table according to the transaction ID, displays the query result if the LogMsg table is found, and sends a third message to the manufacturing execution system server if the LogMsg table is empty of data.
The log searching process of the invention is as follows:
1. if the abnormal affairs occur, an operator queries LogView table data through the client according to conditions such as time range, user ID, affair Name, affair ID and the like, and finds and selects the data of the abnormal affairs;
2. clicking a GetLog button, inquiring a LogMsg table by a client according to the transaction ID, if the LogMsg table is found, displaying the LogMsg table, if no data exists, acquiring the LogMsg table through a manufacturing execution system server, and sending XML of the data of the abnormal transaction to the manufacturing execution system server by the client;
3. the manufacturing execution system server executes the GetLog transaction according to the XML message;
4. according to the transaction information, the GetLog transaction is used for manufacturing an execution system server to be connected with a server host through a Telnetclient, then log information generated when the transaction ID runs is found out according to the received transaction ID, all logs are read through I/O flow, the read logs are stored in a LogMsg table of a database, and the GetLog transaction is ended;
5. the GetLog transaction is finished and is fed back to the client end through the TIB to be normally finished;
6. and the client receives the feedback, then queries the LogMsg table, displays log information in the LogMsg table, XML information received by the manufacturing execution system server and XML information fed back by the manufacturing execution system server on an interface, and finds out the reason of the abnormality by checking the log information of the transaction.
The working principle of the invention is as follows:
1) the manufacturing execution system records log and stores it in the server while executing the transaction, and stores the log's profile information in the LogView table using multithreading.
2) By adding the Log server, the Log View table is saved in a shunting manner, and database locking is avoided.
3) An interface is added in a client of a manufacturing execution system, the interface can inquire a LogView table, operation and maintenance personnel can inquire Log brief information of a problematic transaction through conditions, then the Log brief information of the problematic transaction is connected with a server host through three data of an ID, a TimeKey and a ServerName in the Log brief information of the transaction, then a corresponding Log document is found through I/O stream reading, the corresponding Log information is found from the Log document, the LogMsg table of a database is stored and displayed in the interface of the client, and the operation and maintenance personnel of the manufacturing execution system can find the problem by checking the Log information.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (4)

1. A method of recording log, characterized by: the method comprises the following steps:
the manufacturing execution system server receives a first message from the equipment terminal, which is processed by the equipment module control system;
the manufacturing execution system server executes the transaction corresponding to the first message, writes the transaction into the log, and generates a second message to be fed back to the equipment module control system after the transaction is finished;
after the transaction is executed, the manufacturing execution system server writes log information into a LogView table of a database through multithreading, wherein the log information comprises a transaction ID;
if the multithreading queue exceeds the maximum queue number set by the manufacturing execution system server, the manufacturing execution system server forwards the log information to the log server, and the log server writes the log information into a LogView table of the database through multithreading;
the client lists a LogView table used for inquiring abnormal transaction data, the manufacturing execution system server is connected with the server host, log information generated when the transaction ID runs is read and stored in a LogMsg table of a database, and the client inquires the LogMsg table according to the transaction ID.
2. The method of recording log of claim 1, wherein: when the manufacturing execution system server executes the transaction, the log information recorded comprises the transaction ID and the TimeKey.
3. Method for finding a log, based on the method for recording a log according to claim 1 or 2, characterized in that: the method comprises the following steps:
the manufacturing execution system server receives a third message from the client and executes a GetLog transaction corresponding to the third message;
according to the transaction ID contained in the GetLog transaction information, a manufacturing execution system server is connected with a server host, and log information generated when the transaction ID runs is read and stored in a LogMsg table of a database;
the manufacturing execution system server feeds back a completion signal to the client.
4. The method of looking up log of claim 3, wherein: and the client inquires the LogMsg table according to the transaction ID, if the LogMsg table is found, the inquiry result is displayed, and if no data exists, a third message is sent to the manufacturing execution system server.
CN202010123700.5A 2020-02-27 2020-02-27 Method for recording and searching log Active CN111290355B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010123700.5A CN111290355B (en) 2020-02-27 2020-02-27 Method for recording and searching log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010123700.5A CN111290355B (en) 2020-02-27 2020-02-27 Method for recording and searching log

Publications (2)

Publication Number Publication Date
CN111290355A CN111290355A (en) 2020-06-16
CN111290355B true CN111290355B (en) 2021-06-22

Family

ID=71022452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010123700.5A Active CN111290355B (en) 2020-02-27 2020-02-27 Method for recording and searching log

Country Status (1)

Country Link
CN (1) CN111290355B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1841653A (en) * 2005-03-29 2006-10-04 东京毅力科创株式会社 Substrate processing apparatus, history information recording method, history information recording program, and history information recording system
CN102096623A (en) * 2009-12-14 2011-06-15 深圳速浪数字技术有限公司 Operation log generation method, server and business operational support system
CN102831156A (en) * 2012-06-29 2012-12-19 浙江大学 Distributed transaction processing method on cloud computing platform
CN103490923A (en) * 2013-09-11 2014-01-01 中国联合网络通信集团有限公司 Log file reading and writing method, device and system
CN103679329A (en) * 2012-09-06 2014-03-26 西门子公司 Method and system for handling batch production within ANSI/ISA/95 production scheduling extended with batch production parameter historian
CN104572415A (en) * 2014-12-23 2015-04-29 国云科技股份有限公司 Event log recording method applicable to distributed system
CN107577579A (en) * 2017-09-15 2018-01-12 通鼎互联信息股份有限公司 A kind of log recording method and device
CN108089971A (en) * 2017-11-27 2018-05-29 上海华元创信软件有限公司 Log services method and system based on embedded real time system
CN108847977A (en) * 2018-06-14 2018-11-20 平安科技(深圳)有限公司 A kind of monitoring method of business datum, storage medium and server
CN109241743A (en) * 2018-08-14 2019-01-18 清华大学 Method, apparatus, system and the medium of recording processor operation information
CN109327546A (en) * 2018-11-21 2019-02-12 Oppo(重庆)智能科技有限公司 A kind of method, client, MES and electronic equipment accessing ftp server
CN109739728A (en) * 2019-01-08 2019-05-10 益模(东莞)智能科技有限公司 A kind of MES system performance and daily record data monitoring method
CN110264075A (en) * 2019-06-19 2019-09-20 广州交投机电工程有限公司 A kind of highway workflow management control method and system
JP2019200744A (en) * 2018-05-18 2019-11-21 オムロン株式会社 Controller and data recording method
CN110572467A (en) * 2019-09-17 2019-12-13 中电九天智能科技有限公司 System and method for reporting large amount of process data
CN110674016A (en) * 2018-07-02 2020-01-10 阿里巴巴集团控股有限公司 Method for processing log and positioning error information in mobile terminal, mobile terminal and monitoring device thereof and storage medium
CN110806959A (en) * 2019-10-30 2020-02-18 国云科技股份有限公司 Method for tracking distributed service chain and aggregating logs

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1841653A (en) * 2005-03-29 2006-10-04 东京毅力科创株式会社 Substrate processing apparatus, history information recording method, history information recording program, and history information recording system
CN102096623A (en) * 2009-12-14 2011-06-15 深圳速浪数字技术有限公司 Operation log generation method, server and business operational support system
CN102831156A (en) * 2012-06-29 2012-12-19 浙江大学 Distributed transaction processing method on cloud computing platform
CN103679329A (en) * 2012-09-06 2014-03-26 西门子公司 Method and system for handling batch production within ANSI/ISA/95 production scheduling extended with batch production parameter historian
CN103490923A (en) * 2013-09-11 2014-01-01 中国联合网络通信集团有限公司 Log file reading and writing method, device and system
CN104572415A (en) * 2014-12-23 2015-04-29 国云科技股份有限公司 Event log recording method applicable to distributed system
CN107577579A (en) * 2017-09-15 2018-01-12 通鼎互联信息股份有限公司 A kind of log recording method and device
CN108089971A (en) * 2017-11-27 2018-05-29 上海华元创信软件有限公司 Log services method and system based on embedded real time system
JP2019200744A (en) * 2018-05-18 2019-11-21 オムロン株式会社 Controller and data recording method
CN108847977A (en) * 2018-06-14 2018-11-20 平安科技(深圳)有限公司 A kind of monitoring method of business datum, storage medium and server
CN110674016A (en) * 2018-07-02 2020-01-10 阿里巴巴集团控股有限公司 Method for processing log and positioning error information in mobile terminal, mobile terminal and monitoring device thereof and storage medium
CN109241743A (en) * 2018-08-14 2019-01-18 清华大学 Method, apparatus, system and the medium of recording processor operation information
CN109327546A (en) * 2018-11-21 2019-02-12 Oppo(重庆)智能科技有限公司 A kind of method, client, MES and electronic equipment accessing ftp server
CN109739728A (en) * 2019-01-08 2019-05-10 益模(东莞)智能科技有限公司 A kind of MES system performance and daily record data monitoring method
CN110264075A (en) * 2019-06-19 2019-09-20 广州交投机电工程有限公司 A kind of highway workflow management control method and system
CN110572467A (en) * 2019-09-17 2019-12-13 中电九天智能科技有限公司 System and method for reporting large amount of process data
CN110806959A (en) * 2019-10-30 2020-02-18 国云科技股份有限公司 Method for tracking distributed service chain and aggregating logs

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TDCS-y调度指挥***日志记录模块程序设计;张涛等;《铁路计算机应用》;20151231;第24卷(第5期);第47-48、52页 *

Also Published As

Publication number Publication date
CN111290355A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
US8898294B2 (en) Reporting the state of an apparatus to a remote computer
US6757714B1 (en) Reporting the state of an apparatus to a remote computer
CN110941532A (en) MES monitoring method, monitoring device and readable storage medium
CN111539633A (en) Service data quality auditing method, system, device and storage medium
US7099736B2 (en) Operation management system
WO2018201997A1 (en) Method and device for calculating household appliance faults
CN107239502B (en) Database error daily record monitoring system based on salt
CN109347665A (en) A kind of Website Usability alarm method and its system based on web log
US20120072589A1 (en) Information Processing Apparatus and Method of Operating the Same
CN111290355B (en) Method for recording and searching log
CN113298486A (en) Big data-based government affair supervision and supervision method and system
CN111198804A (en) Gateway-based industrial internet platform third-party micro-service monitoring and early warning method
JP2002312021A (en) Management system for semiconductor equipment
CN113127290B (en) Service operation index monitoring method, device and server
JP4025597B2 (en) Data communication apparatus and method, data communication program and recording medium recording the program
CN111431733A (en) Service alarm coverage information evaluation method and device
CN110989537A (en) Production data processing method, apparatus, medium, and system
CN115408460A (en) Information integration system for vaccine production process
CN112910683B (en) Method and terminal for acquiring key data state
CN112422314A (en) Method and system for collecting and reporting alarm performance data
CN114500231B (en) Early warning method and system for flow fluctuation, electronic equipment and storage medium
CN110750421B (en) Subscription mode-based software system task monitoring and early warning processing method
CN116841836B (en) One-key log collecting tool
CN115827678B (en) Method, device, medium and electronic equipment for acquiring service data
CN112346672B (en) Log dyeing method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant