Data playback method, device, electronic device and storage medium
The graphical controller program displays the variables and their logical relationships of industrial equipment historical data, which solves the problem that variable association relationships cannot be visually reflected in the existing technology, and improves the accuracy of troubleshooting.
Patent Information
- Application Number
- CN202410027792.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-01-08
AI Technical Summary
When the prior art plays the historical data of industrial equipment operation, it cannot intuitively reflect the correlation between variables, resulting in low troubleshooting accuracy.
The graphical controller program is used to play back historical data, display variables and their logical relationships, and display variables and logical relationships in graphical form to improve intuitiveness.
Improves the intuitiveness of historical data playback and enhances the accuracy of troubleshooting.
Smart Images

Figure CN118132369B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data playback method, device, electronic device, and storage medium. Background Art
[0002] At present, when it is necessary to replay and view the collected historical data of industrial equipment operation to troubleshoot the industrial equipment, the playback method used is to obtain the historical data of a certain time period, and extract the variables corresponding to the historical data, as well as the specific data of the variables at different times, and then replay and display the specific data corresponding to the variables on the time axis. The above playback method can only display the changes of each variable in a certain time period, and cannot intuitively reflect the correlation between each variable. The failure of industrial equipment at a certain moment may be caused by the joint action of multiple variables. Therefore, the data display through the above playback method cannot determine the root cause of the failure based on the displayed content, thereby reducing the accuracy of troubleshooting.
[0003] Therefore, how to play back and display the acquired operating data of industrial equipment to improve the intuitiveness of the operating data playback display and thereby improve the accuracy of troubleshooting is a technical problem that needs to be solved urgently. Summary of the Invention
[0004] In order to solve the above technical problems, the present disclosure provides a data playback method, device, electronic device and storage medium.
[0005] A first aspect of an embodiment of the present disclosure provides a data playback method, including:
[0006] Obtaining a graphical controller program, wherein the graphical controller program is a program for replaying the collected historical data, and the graphical controller program includes at least one variable and a logical relationship between the variables;
[0007] Acquire the collected historical data and replay and display the historical data based on the graphical controller program.
[0008] A second aspect of an embodiment of the present disclosure provides a data playback device, including:
[0009] A program acquisition module is used to acquire a graphical controller program. The graphical controller program is a program for replaying the collected historical data. The graphical controller program includes at least one variable and the logical relationship between the variables.
[0010] The playback and display module is used to obtain the collected historical data and playback and display the historical data based on the graphical controller program.
[0011] A third aspect of the present disclosure provides an electronic device, including:
[0012] processor;
[0013] a memory for storing executable instructions;
[0014] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the data playback method provided in the first aspect above.
[0015] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the data playback method provided by the first aspect above.
[0016] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art:
[0017] The data playback method, device, electronic device and storage medium provided by the embodiments of the present disclosure can obtain a graphical controller program. The graphical controller program is a program for replaying collected historical data. The graphical controller program includes at least one variable and the logical relationship between the variables, and obtains the collected historical data. The historical data is replayed and displayed based on the graphical controller program. Therefore, the historical data collected by the controller can be replayed and displayed in a graphical form through the graphical controller program, which improves the intuitiveness of the historical data playback display. At the same time, it is convenient for users to perform fault troubleshooting of industrial equipment through the variables displayed in a graphical form and the logical relationship between the variables, thereby improving the accuracy of fault troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 is a flow chart of a data playback method provided by an embodiment of the present disclosure;
[0021] Figure 2 This is a flowchart of a method for obtaining a graphical controller program provided by an embodiment of the present disclosure;
[0022] Figure 3is a flow chart of a method for obtaining historical data provided by an embodiment of the present disclosure;
[0023] Figure 4 is a structural diagram of a data playback device provided by an embodiment of the present disclosure;
[0024] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0029] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0030] Normally, when it is necessary to replay and view the collected historical data of industrial equipment operation to troubleshoot the industrial equipment, the replay method used is to obtain the historical data of a certain time period, and extract the variables corresponding to the historical data, as well as the specific data of the variables at different times, and then replay and display the specific data corresponding to the variables on the time axis. The above-mentioned replay method can only display the changes of each variable in a certain time period, and cannot intuitively reflect the correlation between each variable. The failure of industrial equipment at a certain moment may be caused by the joint action of multiple variables. Therefore, the data display through the above-mentioned replay method cannot determine the root cause of the failure based on the displayed content, thereby reducing the accuracy of the troubleshooting. Therefore, how to replay and display the acquired operating data of industrial equipment to improve the intuitiveness of the operating data playback display and thus improve the accuracy of troubleshooting is a technical problem that needs to be solved urgently. In response to this problem, the embodiment of the present disclosure provides a data playback method, which is introduced below in conjunction with specific embodiments.
[0031] Figure 1 This is a flowchart of a data playback method provided by an embodiment of the present disclosure. The method can be executed by a data playback device. The data playback device can be implemented in software and / or hardware. The data playback device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a computer, a tablet computer, etc.
[0032] like Figure 1 As shown, the data playback method provided in this embodiment includes the following steps.
[0033] S110 , obtaining a graphical controller program. The graphical controller program is a program for replaying collected historical data. The graphical controller program includes at least one variable and a logical relationship between the variables.
[0034] In the embodiments of the present disclosure, historical data may be historical operating data of industrial equipment connected to the target controller, collected and acquired by the target controller. The target controller may include any controller that can connect to industrial equipment, acquire operating data of the industrial equipment, and control the industrial equipment, such as a programmable logic controller (PLC) or a distributed control system (DCS), without limitation.
[0035] In some embodiments of the present disclosure, after receiving the playback display instruction sent by the user, the electronic device can parse the playback display instruction, determine the identification information of the program used to play back the collected historical data, and obtain a graphical controller program from a preset database based on the identification information, wherein the playback display instruction can be understood as a request for playback and display of the collected historical data.
[0036] In other embodiments of the present disclosure, after receiving a playback display instruction sent by a user, the electronic device can determine a controller program for replaying and displaying historical data based on the playback display instruction, construct a graphical controller program through a preset program construction method, and then obtain the graphical controller program.
[0037] The graphical controller program can replay the historical data collected and acquired, and can also replay the real-time data collected and acquired.
[0038] In the embodiment of the present disclosure, graphics can be understood as displaying the controller program that can be recognized and read by the computer device in the form of graphics on the playback interface through a graphical tool. The graphics here may include: program blocks, charts, text, etc., which are easy for users to view. For example, text is also a graphic for a computer device.
[0039] Furthermore, the graphical controller program can be understood as a controller program in the form of computer-readable code or programming language, which is displayed on the playback display interface in the form of program blocks, charts, text, etc., so that users can clearly and subjectively view the data.
[0040] Furthermore, the graphical controller program includes programs written in one or more standardized languages such as function block diagram (FBD), sequential function chart (SFC), ladder diagram (LD), instruction list (IL), and structured text (ST).
[0041] Furthermore, the function block diagram includes one or more of information such as function block names, function block addresses, logical relationships between function blocks, variables in the function blocks and logical relationships between variables;
[0042] The sequential function chart includes one or more of the following information: action name, action address, logical relationship between actions, etc.
[0043] The ladder diagram includes one or more of information such as a logic switch name, a logic switch address, a function block name, a function block address, and a logical relationship between logic switches and / or function blocks;
[0044] The instruction table includes one or more of the following information: symbol name, symbol address, operation function corresponding to the symbol, symbol annotation, etc.
[0045] Structured text includes statement information used to describe the behavior of functions, function blocks, and programs.
[0046] The various types of graphical controller programs described above are written in different standardized languages. While their composition and presentation differ, they all demonstrate variables and the logical relationships between them. These standardized languages can be compliant with international, national, or industry standards, or they can be user-defined, universal languages.
[0047] S120: Acquire the collected historical data, and replay and display the historical data based on the graphical controller program.
[0048] Historical data refers to data before the device's current calculation cycle. Real-time data refers to data within the current calculation cycle.
[0049] Historical data is data collected and stored by data acquisition equipment. For example, it can include data from 1 minute before the current calculation period, 1 hour before the current calculation period, or 1 day before the current calculation period.
[0050] The sources of historical data collected include but are not limited to data generated by one or more devices such as PLCs, inverters, cameras, sensors, robots, etc.
[0051] Real-time data refers to data within the current calculation cycle. For example, data within a PLC calculation cycle. If the data within this cycle is not collected and stored, it will be overwritten by the data in the next calculation cycle and disappear.
[0052] Historical data includes variable names, specific values corresponding to variable names, time information corresponding to the values corresponding to variable names, etc.
[0053] In some embodiments of the present disclosure, the playback display instruction sent by the user includes historical data. After receiving the playback display instruction sent by the user, the electronic device parses the playback display instruction to obtain the historical data corresponding to the playback display instruction, and then obtains the collected historical data.
[0054] In other embodiments of the present disclosure, the playback display instruction sent by the user includes the time period corresponding to the historical data and the identification information of the industrial equipment corresponding to the historical data. After receiving the playback display instruction sent by the user, the electronic device parses the playback display instruction, obtains the time period corresponding to the historical data and the identification information of the industrial equipment corresponding to the historical data, and then obtains it from a preset data storage center based on the time period corresponding to the historical data and the identification information of the industrial equipment corresponding to the historical data. The identification information of the industrial equipment can be the unique identification information corresponding to the industrial equipment, such as a MAC address, etc.; it can also be manually set unique identification information, such as a device number.
[0055] Furthermore, after acquiring the historical data, the electronic device inputs the historical data into the graphical controller program, so that the graphical controller program replays the historical data and replays and displays the historical data in a graphical form.
[0056] It should be noted that in the embodiment of the present disclosure, there is no restriction on the execution order of obtaining the graphical controller program and obtaining the collected historical data. The acquisition of the graphical controller program and the acquisition of the collected historical data can be executed simultaneously, or the collected historical data can be obtained after obtaining the graphical controller program, or the collected historical data can be obtained before obtaining the graphical controller program.
[0057] In an embodiment of the present disclosure, a graphical controller program can be obtained. The graphical controller program is a program for replaying collected historical data. The graphical controller program includes at least one variable and the logical relationship between the variables, and obtains the collected historical data. The historical data is replayed and displayed based on the graphical controller program. Thus, the historical data collected by the controller can be replayed and displayed in a graphical form through the graphical controller program, which improves the intuitiveness of the historical data playback display. At the same time, it is convenient for users to troubleshoot industrial equipment through the variables displayed in a graphical form and the logical relationship between the variables, thereby improving the accuracy of troubleshooting.
[0058] Figure 2 This is a flowchart of a method for obtaining a graphical controller program provided by an embodiment of the present disclosure. Figure 2 As shown, obtaining the graphical controller program may specifically include the following steps:
[0059] S210: Obtain the original controller program in the original project file.
[0060] In the embodiment of the present disclosure, the original engineering file may be a file pre-set in the target controller by the manufacturer of the target controller. The original engineering file includes an original controller program, which may be an original control program corresponding to the target controller, and is not limited here.
[0061] The original project file may include information required by the controller program, such as variable tables, user-defined types, data blocks, functions, function blocks, and organization blocks. Different information is stored in corresponding nodes of different structures according to its type. Among them, data blocks are used to store data, functions are used to transmit parameters and calculations in applications, function blocks are used to permanently store input and output parameters in background data blocks, and organization blocks are used to provide an interface between the operating system and the application.
[0062] In some embodiments of the present disclosure, the electronic device establishes a communication connection with the target controller through preset connection software, and obtains the original engineering file from the target controller based on the communication connection.
[0063] In other embodiments of the present disclosure, the original project file is manually downloaded from the target controller and stored in a preset location in the electronic device, so that the electronic device obtains the original project file.
[0064] Furthermore, after obtaining the original project file, the electronic device extracts the preset original controller program from the original project file based on a preset extraction method, wherein the preset extraction method may include extraction based on a preset machine learning model for controller program extraction; it may also include extraction based on attribute information of the original controller program; it may also be an existing method for controller program extraction, which is not limited here.
[0065] S220: Obtain at least one variable and the logical relationship between the variables from the original controller program.
[0066] In an embodiment of the present disclosure, the electronic device reads an original controller program in an original engineering file based on a preset programming language, and then obtains at least one variable and a logical relationship between the variables from the original program file.
[0067] The preset programming language may include programming languages such as C++, which is not limited here.
[0068] In the embodiment of the present disclosure, different target controllers contain original controller programs with different formats, wherein the format of the original controller program refers to the location where the programming elements in the original controller program are stored, that is, different programming elements are stored on different nodes at different locations of the original controller program.
[0069] The programming elements in the original controller program include but are not limited to variables, instructions, data types, logical relationships between variables, logical relationships between variables and instructions, logical relationships between instructions, data types corresponding to variables and instructions, and target programming languages, such as the IF word used to express conditional judgments.
[0070] Variables include variable name, variable type, and control instruction information corresponding to the variable, such as the location coordinates and size of the instruction.
[0071] Logical relationships can be understood as relationships in which variables serve as input or output variables of a function, or the output of one function serves as the input of another function.
[0072] In an embodiment of the present disclosure, the electronic device obtains at least one variable and the logical relationship between the variables from the original controller program, which may specifically include: identifying keywords in the original controller program; extracting at least one corresponding variable in the original controller program and the logical relationship between the variables based on the identified keywords.
[0073] Among them, keywords can be used to classify and search, classify and extract programming elements in the original controller program. Keywords may include the structural path or node position of the programming elements in the original controller program in the original project file, and then variables and the logical relationship between variables can be extracted from the keywords. The keywords corresponding to controller programs in different formats are different.
[0074] Furthermore, extracting at least one corresponding variable in the original controller program and the logical relationship between the variables based on the identified keywords can be understood as obtaining at least one variable in the original controller program based on the keywords, and then determining the logical relationship between the variables based on the structural path or node position of at least one variable in the keywords in the original project file.
[0075] S230: Combine at least one variable and the logical relationship between the variables to construct a controller program.
[0076] In an embodiment of the present disclosure, after obtaining at least one variable and the logical relationship between the variables, the electronic device combines at least one variable and the logical relationship between the variables, that is, establishes an association relationship between at least one variable according to the logical relationship between the variables, and then constructs a controller program.
[0077] In an embodiment of the present disclosure, combining at least one variable and the logical relationship between the variables to construct a controller program may specifically include: based on a preset file structure, combining at least one variable and the logical relationship between the variables to construct a controller program.
[0078] The file structure can be understood as the structural relationship of the controller program formed by the combination of programming elements, including the location information of different programming elements when they are constructed.
[0079] The preset file structure can be a pre-set file structure that complies with international, national or industry standards, or it can be a user-defined file structure, such as converting a non-standard file format into a universal file format. Based on the universality of the preset file structure, the constructed controller program has universality and is applicable to target controllers of different formats.
[0080] Specifically, after obtaining at least one variable and the logical relationship between the variables, the electronic device determines the location information of each variable in the controller program based on a preset file structure, and then constructs the controller program based on the location information of each variable and the logical relationship between the variables.
[0081] In the embodiment of the present disclosure, the controller program includes at least one variable, at least one instruction, the logical relationship between the variables, the logical relationship between the instructions, and the logical relationship between the variables and the instructions; the controller program also includes the position coordinates, shape and size corresponding to the instruction, the input parameter name and type corresponding to the instruction, the output parameter name and type; the name and type corresponding to the variable and other information.
[0082] Among them, instructions can be understood as computer programs corresponding to specific functions or operations, which can include system instructions and user-defined instructions. For example, the variable can be temperature A, and the instruction can be an execution operation to turn XX thermometer on or off.
[0083] Furthermore, combination refers to combining variables according to the logical relationship between the variables, where the variables can be the input parameters of the instruction or the output parameters of the instruction; combination also includes associating the output parameters of one or several instructions as the input parameters of other instructions to form a complete logical call relationship.
[0084] Specifically, the electronic device extracts controller program information from the Function, Program, and Function Block in the original project file, combines at least one variable, at least one instruction, the logical relationship between the variables, the logical relationship between the instructions, the logical relationship between the variables and the instructions, and the controller program information, and then constructs a controller program so that the controller program can directly and visually display various logical call relationships during the operation of the industrial equipment, thereby facilitating users to display variables, instructions, the logical relationship between the variables, the logical relationship between the instructions, and the logical relationship between variables and instructions in a graphical form.
[0085] S240: Perform format conversion processing on the controller program based on a preset graphical tool to obtain a graphical controller program corresponding to the controller program.
[0086] In the embodiment of the present disclosure, the preset graphical tool may be an existing tool capable of performing graphical conversion on a program, and is not limited here.
[0087] Specifically, after acquiring the controller program, the electronic device performs format conversion processing on the controller program based on a preset graphical tool to obtain a graphical controller program corresponding to the controller program.
[0088] In the embodiment of the present disclosure, the original project file can be obtained, and at least one variable corresponding to the original project file and the logical relationship between the variables can be extracted based on preset keywords. Since the preset keywords are pre-set standardized keywords, the at least one variable extracted based on the preset keywords and the logical relationship between the variables are also standardized and universal. Therefore, the controller program constructed based on the at least one variable and the logical relationship between the variables is also a universal controller program, so that the obtained graphical controller program has universality and can be adapted to different devices.
[0089] Figure 3 This is a flow chart of a method for obtaining historical data provided by an embodiment of the present disclosure. Figure 3 As shown, obtaining the collected historical data may specifically include the following steps:
[0090] S310: Send a data acquisition instruction to a preset data storage center, where the data acquisition instruction includes the name of the variable to be acquired and the time period corresponding to the variable.
[0091] In the embodiment of the present disclosure, the preset data storage center may be a preset data storage center for storing historical data, such as a preset cloud storage server, a local storage server, etc., which is not limited here.
[0092] The storage media corresponding to the data storage center may include but are not limited to: mechanical hard disks, solid-state hard disks, optical disks, memory, databases, files, etc.
[0093] Specifically, the electronic device can determine the variable to be acquired based on the time period corresponding to the historical data contained in the playback display instruction sent by the user and the identification information of the industrial equipment corresponding to the historical data, and then generate a data acquisition instruction based on the name and time period of the variable to be acquired, and send the data acquisition instruction to the preset data storage center, so that after the preset data storage center receives the data acquisition instruction, it obtains the data information corresponding to the data acquisition instruction and returns the data information to the electronic device.
[0094] S320: Receive the numerical value and time information corresponding to the variable within the time period returned by the data storage center.
[0095] In the embodiment of the present disclosure, the numerical value corresponding to the variable is the specific numerical value corresponding to the variable to be obtained; the time information is the time point corresponding to the numerical value corresponding to the variable.
[0096] Specifically, the electronic device sends a data acquisition instruction to a preset data storage center, and based on the communication connection with the preset data storage center, receives the numerical value and time information corresponding to the variable within the time period returned by the data storage center, and determines it as historical data for playback display.
[0097] In the embodiment of the present disclosure, by sending a data acquisition instruction to a preset data storage center, the numerical value and time information corresponding to the variable within the time period returned by the data storage center can be acquired, thereby improving the accuracy of the acquired data.
[0098] In an embodiment of the present disclosure, replaying and displaying historical data based on a graphical controller program may specifically include: inputting numerical values corresponding to variables and time information corresponding to the numerical values into the graphical controller program, so that the graphical controller program replays historical data.
[0099] In some embodiments of the present disclosure, if there is only one graphical controller program, the historical data corresponding to the graphical controller program is directly input into the graphical controller program, and the historical data is then played back and displayed in a graphical form.
[0100] In other embodiments of the present disclosure, there is one graphical controller program. When historical data is played back and displayed based on the graphical controller program, the numerical values corresponding to the variables are synchronously displayed on the playback display interface. This can be understood as displaying the numerical values corresponding to the variables corresponding to the historical data in an overlaid form on the time axis on the graphical playback display interface corresponding to the historical data, so that the user can intuitively see the running process of the historical data while also seeing the changes in the variables.
[0101] In some other embodiments of the present disclosure, the number of graphical controller programs is at least two, and the historical data corresponding to at least two graphical controller programs are simultaneously replayed based on the at least two graphical controller programs. That is, each graphical controller program has corresponding historical data to be replayed and displayed, each graphical controller program replays the historical data corresponding to it, and at least two graphical controller programs can simultaneously replay and display the historical data corresponding to them.
[0102] In some embodiments of the present disclosure, the number of graphical controller programs is at least two. When historical data corresponding to at least two graphical controller programs are simultaneously played back based on the at least two graphical controller programs, the numerical values corresponding to the target variables corresponding to the historical data corresponding to the graphical controller programs are synchronously displayed on the playback display interface of the historical data corresponding to each graphical controller program. That is, the numerical values corresponding to the target variables corresponding to the historical data corresponding to the graphical controller programs are synchronously displayed on the playback display interface corresponding to the historical data corresponding to each graphical controller program.
[0103] Furthermore, when there are two graphical controller programs, the playback display interface corresponding to each graphical controller program may be distinguished by a different color, or the playback display interfaces corresponding to at least two graphical controller programs may be distinguished by other methods.
[0104] In the disclosed embodiment, different playback interface display forms can be used to meet the needs of different users, which not only improves the efficiency of historical data playback but also improves the user experience.
[0105] Figure 4 It is a structural diagram of a data playback device provided by an embodiment of the present disclosure.
[0106] In the embodiments of the present disclosure, the data playback device can be provided in an electronic device and can be understood as a functional module of the electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a computer, a tablet computer (mobile terminal), etc., and is not limited here. The implementation of the computer or mobile terminal can include, but is not limited to, native programs or web programs (browsers), etc.
[0107] like Figure 4 As shown, the data playback device 400 may include a program acquisition module 410 and a playback display module 420 .
[0108] The program acquisition module 410 may be used to acquire a graphical controller program. The graphical controller program is a program for replaying collected historical data. The graphical controller program includes at least one variable and the logical relationship between the variables.
[0109] The playback and display module 420 can be used to obtain the collected historical data and playback and display the historical data based on the graphical controller program.
[0110] In an embodiment of the present disclosure, a graphical controller program can be obtained. The graphical controller program is a program for replaying collected historical data. The graphical controller program includes at least one variable and the logical relationship between the variables, and obtains the collected historical data. The historical data is replayed and displayed based on the graphical controller program. Thus, the historical data collected by the controller can be replayed and displayed in a graphical form through the graphical controller program, which improves the intuitiveness of the historical data playback display. At the same time, it is convenient for users to troubleshoot industrial equipment through the variables displayed in a graphical form and the logical relationship between the variables, thereby improving the accuracy of troubleshooting.
[0111] In some embodiments of the present disclosure, the program acquisition module 410 may include a file acquisition unit, a logical relationship acquisition unit, an information combination unit, and a format conversion unit.
[0112] The file acquisition unit can be used to acquire the original controller program in the original project file.
[0113] The logic relationship acquisition unit can be used to acquire at least one variable and the logic relationship between the variables from the original controller program.
[0114] The information combination unit can be used to combine at least one variable and the logical relationship between the variables to construct a controller program.
[0115] The format conversion unit can be used to perform format conversion processing on the controller program based on a preset graphical tool to obtain a graphical controller program corresponding to the controller program.
[0116] In some embodiments of the present disclosure, the logical relationship acquisition unit may be specifically used to identify keywords in the original controller program; and extract at least one corresponding variable in the original controller program and the logical relationship between the variables based on the identified keywords.
[0117] In some embodiments of the present disclosure, the information combination unit may be specifically used to combine at least one variable and the logical relationship between the variables based on a preset file structure to construct a controller program.
[0118] In some embodiments of the present disclosure, the playback display module 420 may include an instruction sending unit and a data receiving unit.
[0119] The instruction sending unit may be configured to send a data acquisition instruction to a preset data storage center, where the data acquisition instruction includes the name of the variable to be acquired and the time period corresponding to the variable.
[0120] The data receiving unit may be used to receive the numerical value and time information corresponding to the variable within the time period returned by the data storage center.
[0121] In some embodiments of the present disclosure, the playback display module 420 may be specifically configured to input the numerical values corresponding to the variables and the time information corresponding to the numerical values into the graphical controller program, so that the graphical controller program can playback historical data.
[0122] In some embodiments of the present disclosure, when there is only one graphical controller program, the playback display module 420 may be specifically configured to synchronously display the values corresponding to the variables on the playback display interface when replaying and displaying historical data based on the graphical controller program.
[0123] In some embodiments of the present disclosure, when there are at least two graphical controller programs, the playback display module 420 may be specifically configured to simultaneously play back historical data corresponding to the at least two graphical controller programs based on the at least two graphical controller programs.
[0124] It should be noted that Figure 4 The data playback device 400 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.
[0125] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure.
[0126] In the embodiments of the present disclosure, Figure 5 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a computer, a tablet computer, etc., which is not limited here.
[0127] like Figure 5 As shown, the electronic device may include a processor 510 and a memory 520 storing computer program instructions.
[0128] Specifically, the processor 510 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0129] Memory 520 may include a large-capacity memory for information or instructions. By way of example, and not limitation, memory 520 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 520 may include removable or non-removable (or fixed) media. Where appropriate, memory 520 may be internal or external to the integrated gateway device. In certain embodiments, memory 520 is non-volatile solid-state memory. In certain embodiments, memory 520 includes read-only memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0130] The processor 510 reads and executes the computer program instructions stored in the memory 520 to perform the steps of the data playback method provided in the embodiment of the present disclosure.
[0131] In one example, the electronic device may further include a transceiver 530 and a bus 540. Figure 5 As shown, the processor 510 , the memory 520 and the transceiver 530 are connected via a bus 540 and communicate with each other.
[0132] The bus 540 includes hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 540 may include one or more buses.
[0133] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the data playback method provided by the embodiments of the present disclosure.
[0134] The above-mentioned storage medium may, for example, include a memory 520 of computer program instructions, and the above-mentioned instructions may be executed by the processor 510 of the electronic device to complete the data playback method provided in the embodiment of the present disclosure. Alternatively, the storage medium may be a non-transitory computer-readable storage medium, for example, a non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0135] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A data playback method, characterized in that: include: Obtaining a graphical controller program, wherein the graphical controller program is a program for replaying the collected historical data, and the graphical controller program includes at least one variable and a logical relationship between the variables; Acquiring the collected historical data, and replaying and displaying the historical data based on the graphical controller program; The step of obtaining a graphical controller program includes: Get the original controller program from the original project file; Obtaining at least one variable and a logical relationship between the variables from the original controller program; Combining the at least one variable and the logical relationships between the variables to construct a controller program; The controller program is format-converted based on a preset graphical tool to obtain a graphical controller program corresponding to the controller program.
2. The method according to claim 1, characterized in that The obtaining of at least one variable and the logical relationship between the variables from the original controller program includes: identifying keywords in the original controller program; extracting the at least one corresponding variable in the original controller program and the logical relationship between the variables based on the identified keyword; The combining of the at least one variable and the logical relationship between the variables to construct a controller program includes: Based on a preset file structure, the at least one variable and the logical relationship between the variables are combined to construct a controller program.
3. The method according to claim 1, characterized in that The graphical controller program includes one or more of a function block diagram, a sequential function diagram, and a ladder diagram.
4. The method according to claim 1, wherein The acquiring of the collected historical data includes: Sending a data acquisition instruction to a preset data storage center, wherein the data acquisition instruction includes the name of the variable to be acquired and the time period corresponding to the variable; Receive the value and time information corresponding to the variable within the time period returned by the data storage center.
5. The method according to claim 4, characterized in that The replaying and displaying of the historical data based on the graphical controller program includes: The numerical value corresponding to the variable and the time information corresponding to the numerical value are input into the graphical controller program, so that the graphical controller program replays the historical data.
6. The method according to claim 1, characterized in that The method further comprises: When the historical data is played back and displayed based on the graphical controller program, the numerical values corresponding to the variables are synchronously displayed on the playback display interface.
7. The method according to claim 1, characterized in that The number of the graphical controller programs is at least two, and the method further includes: Based on the at least two graphical controller programs, historical data corresponding to the at least two graphical controller programs are simultaneously replayed.
8. A data playback device, characterized in that: include: A program acquisition module, configured to acquire a graphical controller program, wherein the graphical controller program is a program for replaying collected historical data, and the graphical controller program includes at least one variable and a logical relationship between the variables; A playback and display module, configured to obtain the collected historical data and playback and display the historical data based on the graphical controller program; The program acquisition module is specifically used to obtain the original controller program in the original engineering file; obtain at least one variable and the logical relationship between the variables from the original controller program; combine the at least one variable and the logical relationship between the variables to construct the controller program; The controller program is format-converted based on a preset graphical tool to obtain a graphical controller program corresponding to the controller program.
9. An electronic device, characterized in that: include: processor; a memory for storing executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the data playback method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the data playback method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Vehicle automatic driving identification data playback method, system and device and storage medium
CN115408387A