Data processing method and device, electronic equipment and storage medium
By obtaining the downloaded files of the nuclear power instrumentation and control system and analyzing them based on the parsed configuration file, the accuracy problem of downloaded file verification is solved, a fast and accurate verification process is achieved, the consumption of labor and hardware resources is reduced, and the nuclear power efficiency is improved. Configuration reliability of instrumentation and control systems.
Patent Information
- Application Number
- CN202410891707.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-15
AI Technical Summary
The verification of downloaded files in the existing technology has problems such as heavy workload, long inspection time, and human errors, which affect accuracy. In addition, the hardware download verification method has excessive resource consumption, long inspection waiting time, cumbersome and complicated processes, and testing. Use case coverage is incomplete and defect location is difficult.
By obtaining the downloaded files of the nuclear power instrumentation and control system, determine the target analysis configuration file based on basic information, use the analysis configuration files to analyze the downloaded files, and generate analysis reports to achieve rapid analysis and accuracy verification, avoiding manual assistance and hardware resource consumption. .
Complete the analysis of data within 2 seconds and generate a complete analysis and verification report, which significantly reduces the tester's workload and time, improves the accuracy and efficiency of verification, and enables the ability to locate unconfigured abnormal data.
Smart Images

Figure CN118779233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of nuclear power instrumentation and control system data processing, and in particular to a data processing method, device, electronic equipment and storage medium. Background Art
[0002] At present, the configuration of the instrumentation and control system is often performed on a specific software system to generate a download file for configuration. The download file is transferred to the corresponding computer hardware by burning or wired transmission to realize the configuration of the system.
[0003] The accuracy and reliability of the downloaded files become an important step to ensure the reliability of the system configuration. Currently, the accuracy of the downloaded files is usually verified by manually assisting the verification of the consistency between the bytecodes and the requirements one by one. Since the downloaded files are binary files composed of multiple bytecodes, the verification in the above way has problems such as large workload, long verification time, and human error, which affect the accuracy of the verification. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a data processing method, device, electronic device and storage medium to solve the problem of affecting the accuracy of downloaded file verification in the prior art.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] A first aspect of an embodiment of the present invention shows a data processing method, the method comprising:
[0007] Obtain the download file of the nuclear power instrumentation and control system configuration;
[0008] Determining a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration;
[0009] Parsing the downloaded file according to the target parsing configuration file to obtain a parsing result;
[0010] An analysis report is constructed based on the analysis results.
[0011] Optionally, determining a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration includes:
[0012] Searching a pre-built configuration database based on the basic information of the nuclear power instrumentation and control system configuration to determine whether a corresponding parsing configuration file exists;
[0013] If it exists, the parsing configuration file found is used as the target parsing configuration file;
[0014] The process of pre-building the configuration database includes:
[0015] For a nuclear power instrumentation and control system, obtain the download file design documents corresponding to each configuration, as well as the corresponding interface design documents;
[0016] For each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document;
[0017] A configuration database is constructed based on the parsed configuration file.
[0018] Optionally, for each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document, including:
[0019] Determine the first field corresponding to the download file design document and the second field corresponding to the corresponding interface design document according to a preset format;
[0020] Acquire data corresponding to the first field in the download file design document, and acquire data corresponding to the second field in the interface design document;
[0021] The data corresponding to the first field and the data corresponding to the second field are written into a preset configuration template to obtain a corresponding parsing configuration file.
[0022] Optionally, also include:
[0023] In response to a parsing configuration file selected from a drop-down menu of a user interface UI, a target parsing configuration file is obtained;
[0024] or,
[0025] Respond to the triggering of the import parsing configuration file button in the user interface UI to respond to the parsing configuration file written by the user.
[0026] Optionally, the download file is parsed according to the target parsing configuration file to obtain a parsing result, including:
[0027] Performing a serialization operation based on the format of the target parsing configuration file to obtain a first file;
[0028] Obtaining a single piece of configuration data in the download file;
[0029] For each single piece of configuration data, determine the starting position and byte length of the corresponding byte data segment from the first file according to the single piece of configuration data;
[0030] Searching for byte data corresponding to the byte data segment in the download file using the start position and the byte length;
[0031] The first file is used to perform text parsing on the byte data to obtain a parsing result.
[0032] Optionally, a serialization operation is performed based on the format of the target parsing configuration file to obtain a first file, including:
[0033] Determine whether the format of the target parsing configuration file is the target format;
[0034] If yes, serialize the target parsing configuration file to obtain the first file;
[0035] If not, the format of the target parsing configuration file is converted into a target format, and a serialization operation is performed on the target parsing configuration file to obtain a first file.
[0036] Optionally, performing text parsing on the byte data using the first file to obtain a parsing result includes:
[0037] Convert the byte data into target data;
[0038] Comparing the target data with the operation function in the first file to obtain a corresponding first result;
[0039] Comparing the target data with the values in the first file to obtain a corresponding second result;
[0040] The first result, the second result, the byte data, and the bytes corresponding to the original position are taken as parsing results.
[0041] A second aspect of an embodiment of the present invention shows a data processing device, the device comprising:
[0042] An acquisition unit is used to acquire the download file of the nuclear power instrumentation and control system configuration;
[0043] A determination unit, configured to determine a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration;
[0044] A processing unit, configured to parse the download file according to the target parsing configuration file to obtain a parsing result;
[0045] A construction unit is used to construct a parsing report based on the parsing result.
[0046] The electronic device shown in the third aspect of the present invention is used to run a program, wherein the program, when running, executes a data processing method as shown in the first aspect of the embodiment of the present invention.
[0047] A fourth aspect of an embodiment of the present invention shows a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute a data processing method as shown in the first aspect of the embodiment of the present invention.
[0048] Based on the above-mentioned embodiment of the present invention, a data processing method, device, electronic device and storage medium are provided, the method includes: obtaining the download file of the nuclear power instrumentation and control system configuration; determining the corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration; parsing the download file according to the target parsing configuration file to obtain the parsing result; and constructing a parsing report based on the parsing result. In the embodiment of the present invention, no human assistance is required, and the download files are scanned one by one through the target parsing configuration file to achieve rapid parsing of the data meaning of the download files and accuracy verification of the download files, thereby avoiding problems that affect the accuracy of the verification of the download files. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0050] Figure 1 A schematic flow chart of a data processing method according to an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of a process for generating a parsing configuration file according to an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of the process of selecting and parsing a configuration file and importing a download file according to an embodiment of the present invention;
[0053] Figure 4 This is a schematic diagram of the architecture of a user UI interface shown in an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of a parsing process according to an embodiment of the present invention;
[0055] Figure 6 A byte position diagram of a compilation status mark under an example shown in an embodiment of the present invention;
[0056] Figure 7 A detailed diagram of a parsing report according to an embodiment of the present invention;
[0057] Figure 8A schematic diagram of a process of storing and analyzing reports according to an embodiment of the present invention;
[0058] Fig. 9 The present invention is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0062] In this application, 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 also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0063] From the background technology, it can be known that a hardware download verification method can also be used, which requires verifying the downloaded files by checking the hardware functions one by one. This method has the problems of excessive consumption of hardware resources, long waiting time for inspection, cumbersome and complicated verification process, incomplete coverage of test cases, difficulty in locating defects, etc. In other words, the hardware download verification method also has the problem of affecting the accuracy of the downloaded file verification.
[0064] The applicant found that when parsing a binary file of 722KB in size through hardware download verification, at least two qualified testers are required to spend several hours to check the parameters and status of the hardware devices one by one. When the present invention is used to parse it, under the window 10 operating system and the test machine environment of the CPU i7-12700, the parsing time can be kept within 2 seconds, and a complete parsing verification report can be generated at the same time.
[0065] In the prior art, when checking a single data overrun problem, it often takes several hours to build the environment, locate data anomalies, and locate the data overrun problem inaccurately, making it difficult to fully cover the problematic data. When parsing the download file, the tool implemented by the present invention finds and marks all 20 unconfigured abnormal data contained in each board within 3 seconds. The specific parsing process is as follows.
[0066] See also Figure 1 , is a flow chart of a data processing method according to an embodiment of the present invention, the method comprising:
[0067] Step S101: Obtain the download file of the nuclear power instrumentation and control system configuration.
[0068] Optionally, the instrumentation and control system is configured on a specific software system to generate a download file for configuration.
[0069] Configuration means "configure", "set", "set up", etc. It is used to refer to completing the required software functions through a simple method similar to "building blocks" without writing computer programs.
[0070] Configuration software can monitor and control automation processes and equipment. It can collect various information from automation processes and equipment, display the information in a more understandable way such as graphics, transmit important information to relevant personnel by various means, perform necessary analysis and processing and storage on the information, issue control instructions, etc.
[0071] The download file is a binary file composed of multiple bytecodes.
[0072] Step S102: Determine a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration.
[0073] It should be noted that there are multiple implementation methods for the specific process of generating step S102.
[0074] The first implementation method includes the following steps:
[0075] Step S11: Search a pre-built configuration database based on the basic information of the nuclear power instrumentation and control system configuration to determine whether there is a corresponding parsing configuration file. If so, execute step S12; if not, execute step S13.
[0076] The preset configuration database includes multiple parsing configuration files, and the specific process of constructing the configuration database includes the following steps:
[0077] Step S21: For a certain nuclear power instrumentation and control system, obtain the download file design document corresponding to each configuration and the corresponding interface design document.
[0078] In the process of implementing step S21, according to each model, version and brand of nuclear power instrumentation and control system, the download file design document corresponding to each configuration under the nuclear power instrumentation and control system corresponding to the model, version and brand, and the corresponding interface design document already stored in the document database are obtained.
[0079] It should be noted that the document database pre-stores the correspondence between the model, version and brand of the nuclear power instrumentation and control system, the download file design document and the interface design document.
[0080] Step S22: For each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document.
[0081] It should be noted that the specific implementation of step S22 includes the following steps:
[0082] Step S31: determining the first field corresponding to the download file design document and the second field corresponding to the corresponding interface design document according to a preset format;
[0083] It should be noted that the preset configuration template corresponding to each preset format has fixed fields.
[0084] There is a corresponding relationship between the preset configuration templates and the preset formats, that is, each preset format has a corresponding preset configuration template.
[0085] In the process of specifically implementing step S31, the download file design document and the corresponding interface design document are traversed to determine the fields in the download file design document and the corresponding interface design document that are identical to the fixed fields, that is, determine the first field corresponding to the download file design document and the second field corresponding to the corresponding interface design document.
[0086] The preset format may be in the form of an Excel file or a JSON file.
[0087] The spreadsheet Excel file format is easier to read and write, and can annotate the itemized parsing information configuration, but it cannot be used as a direct input for the next stage of data serialization.
[0088] The Json file format is difficult to read and is cumbersome and error-prone to fill out; however, it facilitates data serialization and can be used directly as input for the serialization of parsing configuration data in the next stage.
[0089] Step S32: acquiring data corresponding to the first field in the download file design document, and acquiring data corresponding to the second field in the interface design document;
[0090] It should be noted that there are multiple first fields and multiple second fields, and there may be duplicate fields in the first field and the second field, for example, both have the field "compilation status mark".
[0091] In the specific implementation process of step S32, data corresponding to the first field is extracted from the download file design document, and data corresponding to the second field is extracted from the interface design document.
[0092] Step S33: writing the data corresponding to the first field and the data corresponding to the second field into a preset configuration template to obtain a corresponding parsing configuration file.
[0093] In the process of implementing step S33, according to the positions of the first field and the second field in the preset configuration template, the data corresponding to the first field and the data corresponding to the second field are written in sequence to obtain the corresponding parsing configuration file.
[0094] It should be noted that the preset configuration template corresponds to the preset format, that is, each preset format has a corresponding preset configuration template.
[0095] The parsing configuration file of the table Excel file format includes the name, byte length, data description, byte starting position, maximum data value, minimum data value, and operation function.
[0096] As shown in Table (1), it is a sample diagram of a parsing configuration file corresponding to a parsing configuration file A in a certain Excel file format.
[0097] Table (1):
[0098]
[0099] Optionally, the specific process of implementing step S21 to step S22 can be as follows: Figure 2 shown.
[0100] Figure 2 In the process, a specific parsing file for the downloaded binary file is written through the download file design document of a nuclear power instrumentation and control system and the interface design document of a nuclear power instrumentation and control system. That is, the parsing configuration file can be in Excel format and Json format.
[0101] Step S23: constructing a configuration database based on the parsed configuration file.
[0102] In the process of implementing step S23, a configuration database is constructed by using the parsing configuration files corresponding to each configuration in each nuclear power instrumentation and control system. That is, the corresponding parsing configuration files can be found through the basic information of each configuration.
[0103] Step S12: taking the found parsing configuration file as the target parsing configuration file.
[0104] Step S13: triggering the import parsing configuration file button in response to the parsing configuration file written by the user.
[0105] In the specific implementation of step S13, the button for importing parsing configuration files can be triggered according to the preset format, for example, according to the format of the parsing configuration files to be imported, click the button for importing in EXCEL format or the button for importing in JSON format. This allows the user to write the parsing configuration files that have been constructed, such as Figure 3 shown.
[0106] In addition to the above-mentioned method for obtaining the parsing configuration file, there are other methods for determining the target parsing configuration file; another implementation method includes the following steps:
[0107] Step S41: In response to a parsing configuration file selected from a drop-down menu of the user interface UI, a target parsing configuration file is obtained.
[0108] It should be noted that the parsing configuration files in the drop-down menu are all parsing configuration files contained in the configuration database.
[0109] Optionally, the user enters the tool user interface UI, clicks the drop-down menu for selecting a parsing configuration file, and selects the parsing configuration file corresponding to the downloaded file, such as Figure 3 As shown, if the drop-down menu contains the required parsing configuration file, the parsing configuration file selected by the user is selected as the target parsing configuration file; if not, step S42 is executed.
[0110] Step S42: responding to the triggering of the button for importing the parsing configuration file in the user interface UI, so as to respond to the parsing configuration file written by the user.
[0111] It should be noted that the specific implementation process of step S42 is the same as the specific implementation process of the above-mentioned specific implementation step S13 and can refer to each other.
[0112] Step S41 and step S42 are in an OR relationship. If the response is to the parsing configuration file selected in the drop-down menu of the user interface UI, step S41 is executed. If the response is to the import parsing configuration file button in the user interface UI, step S42 is executed.
[0113] The present invention can parse different types and configurations of download files. For files that are too large, it can switch to 4 types of parsing configuration files with a size of less than 1MB, and can complete the import within seconds; and the parsing time of the download file can be controlled within seconds. Compared with manual verification or hardware download verification, it directly saves testers several hours of learning the parsing verification process.
[0114] For example: The user UI interface can be Figure 4 As shown, Figure 4 It can be called an interface file parsing tool.
[0115] Users can obtain the download file of the nuclear power instrumentation and control system configuration by selecting the file button. Figure 3 The interface file parsing tool shown is only applicable to binary parsing of program files .Prg.
[0116] Figure 4 The user is prompted to select the corresponding project and file type before importing the file to avoid parsing errors.
[0117] Figure 4 The process also includes the drop-down menu for parsing the configuration file shown in step S41 and step S42, and an EXCEL format button or a JSON format button.
[0118] After the user triggers the Parse button, the processor performs the following steps.
[0119] Step S103: parsing the download file according to the target parsing configuration file to obtain a parsing result;
[0120] It should be noted that the specific process of implementing step S103 includes the following steps:
[0121] Step S51: performing a serialization operation based on the format of the target parsing configuration file to obtain a first file.
[0122] It should be noted that the specific process of implementing step S51 includes the following steps:
[0123] Step S61: Determine whether the format of the target parsing configuration file is the target format, if so, execute step S62, if not, execute step S63.
[0124] It should be noted that, since the target parsing configuration file in Excel format cannot be directly parsed, it is necessary to determine the target format of the target parsing configuration file that can be processed.
[0125] The target format is pre-set according to the actual situation, for example, it can be set to Json format.
[0126] Step S62: performing a serialization operation on the target parsing configuration file to obtain a first file;
[0127] In the process of implementing step S62, if it is determined that the format of the target parsing configuration file is the target format, the target parsing configuration file is directly serialized, and the serialized data includes the parsing name, byte length, data description, byte starting position, data maximum value, data minimum value, and operation function to obtain the first serialized file.
[0128] Step S63: converting the format of the target parsing configuration file into a target format, and performing a serialization operation on the target parsing configuration file to obtain a first file.
[0129] In the process of implementing step S63, since other formats cannot be serialized directly, it is necessary to convert the corresponding format first and then parse it. The parsing process can refer to step S62 to obtain the first file.
[0130] Optionally, if the data volume of the target parsing configuration file is greater than a preset amount, in the case where the parsing configuration file is too large and there is too much parsed data, the interface file parsing tool provides a data reading and writing interface for the parsing configuration file based on the MySql database, thereby reducing problems such as long running time and excessive memory consumption caused by data reading and writing.
[0131] Step S52: Obtain a single piece of configuration data in the download file.
[0132] In the specific implementation of step S52, a single piece of data in the downloaded file is scanned to retrieve data information contained in the piece of configuration data, that is, a byte data segment.
[0133] Step S53: for each single piece of configuration data, determine the start position and byte length of the corresponding byte data segment from the first file according to the single piece of configuration data;
[0134] In the specific implementation of step S53, the first file is traversed using the byte data segment in the single configuration data to find the start position and byte length of the corresponding byte data segment;
[0135] Step S54: Use the starting position and byte length to search for byte data corresponding to the byte data segment in the download file.
[0136] In the specific implementation of step S54, the byte data segment is marked in the download file according to the starting position, and byte data having the same length as the byte length is obtained from the starting position.
[0137] Step S55: using the first file to perform text parsing on the byte data to obtain a parsing result;
[0138] The specific implementation process of step S55 includes the following steps:
[0139] Step S71: Convert the byte data into target data.
[0140] In the specific implementation of step S71, since the byte data is generally binary data, it needs to be converted into an integer in decimal format, that is, the target data.
[0141] Step S72: Compare the target data with the operation function in the first file to obtain a corresponding first result;
[0142] In the specific implementation of step S72, based on the operation functions in the first file, they are compared and verified with the target data one by one to determine whether there is a function mapped to the target data. If so, it is used as the first result.
[0143] The present invention can realize rapid interpretation of the data meaning of the bytecode by serializing the entry information in the target parsing configuration file and then scanning the bytecode data one by one, thereby improving the parsing verification time of the tester.
[0144] The method of the present invention can verify the bytecodes of the downloaded files one by one from the software level, thereby effectively ensuring the reliability of the downloaded files before hardware testing, and locating problems at the software level of the downloaded files in advance, greatly reducing the process of manual hardware debugging and effectively reducing the consumption of human resources and hardware resources.
[0145] Step S73: Compare the target data with the values in the first file to obtain a corresponding second result;
[0146] In the process of implementing step S73, the target data is judged based on the values in the first file, i.e., the maximum value and the minimum value, to determine whether the target data is less than or equal to the maximum value and greater than or equal to the minimum value. If the target data is less than or equal to the maximum value and greater than or equal to the minimum value, it means that there is no data anomaly in the data. At this time, the data anomaly can be expressed as "error FALSE". Otherwise, it means that there is a data anomaly in the data and a red warning is issued.
[0147] The present invention verifies the validity of target data, adds data range restrictions and operation function determination information in parsing the target configuration file, i.e., the first file, to detect the data range and data meaning, issues an early warning for data exceeding the data setting range, and provides positioning byte position information.
[0148] Step S74: taking the first result, the second result, the byte data, and the bytes corresponding to the original position as parsing results.
[0149] The byte corresponding to the original position refers to the byte at the original position corresponding to the byte data obtained from the downloaded file.
[0150] Optionally, after writing any byte data segment into the preset report template, it is determined whether there is configuration data that has not been parsed, that is, a byte data segment that has not yet been processed. If so, it returns to execute the next single configuration data for new parsing processing, such as Figure 5 shown.
[0151] Figure 5 The specific processing diagram of steps S52 to S54 is shown in FIG.
[0152] In order to better understand the process from step S52 to step S54, the following takes the byte data segment "compile status mark" in a single configuration data as an example.
[0153] The byte data segment "compilation status mark" is used to determine from the first file A that the starting position of the corresponding byte data segment is 1 and the byte length is 4, wherein the first file A is a file in EXCEL format.
[0154] The byte data segment is marked in the download file according to the starting position, the current marked byte starting position is 1, and the byte data of the specified byte length of 4 is read from the byte position 1.
[0155] The 4-byte length is read from position 1, so the result is 00000000, as follows Figure 6 shown.
[0156] Convert the read content "00000000" into a decimal number to get the integer 0, which means the target data is 0; based on the operation function "0: full compilation; 1: incremental compilation" in the first file, compare and verify with the target data 0 one by one to determine whether there is a function mapped to the target data. If so, use the function "full compilation" corresponding to the target data 0 as the first result.
[0157] Based on the values in the first file, i.e., the maximum value 1 and the minimum value 0, the target data 0 is judged to determine whether the target data is less than or equal to the maximum value and greater than or equal to the minimum value. If the target data is less than or equal to the maximum value and greater than or equal to the minimum value, it means that there is no data anomaly in the data. At this time, the data anomaly can be expressed as "false FALSE".
[0158] Fill the "Data Description" field in the first file A into the "Data Information" field of the generated result, and write the module name, i.e. "Compile Status Mark", the original data "00000000", the parsed data "Full Compile", the number of bytes "4", the data starting byte point "4", the data information "0-Full Compile; 1-Incremental Compile", and the data exception "FALSE" into the preset template to obtain a parsing report, such as Figure 7 shown.
[0159] Step S104: constructing an analysis report based on the analysis results.
[0160] In the specific implementation process of step S104, first, for each byte data segment, the corresponding parsing result, byte length, and field combination of the corresponding data description in the first file are written into a preset report template to obtain a parsing report.
[0161] For example, the content of the analysis report may be as shown in Table (2).
[0162] Table (2):
[0163]
[0164]
[0165] It should be noted that the preset report template is set in advance according to actual conditions, and may generally include the module name, i.e., the byte data segment, the original data, i.e., the byte data, the parsed data, i.e., the first result, the number of bytes, i.e., the field end, the data starting byte point, i.e., the byte corresponding to the original position, the data information, i.e., the field corresponding to the data description in the first file, and data anomalies, etc.
[0166] The format of the preset template can be a document file.
[0167] Optional options include:
[0168] Step S81: temporarily save the analysis report to the same path as the download file.
[0169] Specifically, for the analysis report to be saved, check whether there is a folder named "after analysis" in the current download file path. If not, create a "after analysis" folder under the download file path; if it exists, check whether there is a analysis report with the same name in the "after analysis" folder. If there is a analysis report with the same name, create a different suffix file of the analysis report with the same name in the "after analysis" folder, and save the analysis report in the "after analysis" folder to complete the generation of the analysis report; if there is no analysis report with the same name, directly save the analysis report in the "after analysis" folder to complete the generation of the analysis report, such as Figure 8 shown.
[0170] In the embodiment of the present invention, no human assistance is required. The target parsing configuration file corresponding to the current downloaded file is first determined, and the downloaded files are scanned one by one through the target parsing configuration file to achieve rapid parsing of the data meaning of the downloaded files. Then, the parsing results are organized into a parsing report to achieve accuracy verification of the downloaded files, thereby avoiding problems that affect the accuracy of the downloaded file verification.
[0171] Based on the data processing method shown in the above embodiment of the present invention, correspondingly, the embodiment of the present invention also discloses another data processing device, such as Fig. 9 As shown, the device comprises:
[0172] The acquisition unit 901 is used to acquire the download file of the nuclear power instrumentation and control system configuration;
[0173] A determination unit 902 is used to determine a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration;
[0174] The processing unit 903 is used to parse the download file according to the target parsing configuration file to obtain a parsing result;
[0175] The constructing unit 904 is used to construct an analysis report based on the analysis result.
[0176] Optionally, the data processing device shown in the present application may be a processing tool.
[0177] The specific principles and execution processes of each unit in the data processing device disclosed in the above embodiment of the present invention are the same as the corresponding contents in the data processing method provided in the above embodiment of the present invention. Please refer to the corresponding parts of the data processing method disclosed in the above embodiment of the present invention, and will not be repeated here.
[0178] In the embodiment of the present invention, no human assistance is required. The target parsing configuration file corresponding to the current downloaded file is first determined, and the downloaded files are scanned one by one through the target parsing configuration file to achieve rapid parsing of the data meaning of the downloaded files. Then, the parsing results are organized into a parsing report to achieve accuracy verification of the downloaded files, thereby avoiding problems that affect the accuracy of the downloaded file verification.
[0179] Optionally, based on the data processing device shown in the above embodiment of the present invention, the determining unit 902 is specifically configured to:
[0180] Searching a pre-built configuration database based on the basic information of the nuclear power instrumentation and control system configuration to determine whether a corresponding parsing configuration file exists;
[0181] If it exists, the parsing configuration file found is used as the target parsing configuration file;
[0182] The process of pre-building the configuration database includes:
[0183] For a nuclear power instrumentation and control system, obtain the download file design documents corresponding to each configuration, as well as the corresponding interface design documents;
[0184] For each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document;
[0185] A configuration database is constructed based on the parsed configuration file.
[0186] For each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document, including:
[0187] Determine the first field corresponding to the download file design document and the second field corresponding to the corresponding interface design document according to a preset format;
[0188] Acquire data corresponding to the first field in the download file design document, and acquire data corresponding to the second field in the interface design document;
[0189] The data corresponding to the first field and the data corresponding to the second field are written into a preset configuration template to obtain a corresponding parsing configuration file.
[0190] Optionally, based on the data processing device shown in the above embodiment of the present invention, the processing unit 903 further includes:
[0191] In response to a parsing configuration file selected from a drop-down menu of a user interface UI, a target parsing configuration file is obtained;
[0192] or,
[0193] Respond to the triggering of the import parsing configuration file button in the user interface UI to respond to the parsing configuration file written by the user.
[0194] Optionally, based on the data processing device shown in the above embodiment of the present invention, the processing unit 903 is specifically configured to:
[0195] Performing a serialization operation based on the format of the target parsing configuration file to obtain a first file;
[0196] Obtaining a single piece of configuration data in the download file;
[0197] For each single piece of configuration data, determine the starting position and byte length of the corresponding byte data segment from the first file according to the single piece of configuration data;
[0198] Searching for byte data corresponding to the byte data segment in the download file using the start position and the byte length;
[0199] The first file is used to perform text parsing on the byte data to obtain a parsing result.
[0200] Optionally, based on the data processing device shown in the above embodiment of the present invention, a processing unit 903 for obtaining a first file performs a serialization operation based on the format of the target parsing configuration file, and is specifically used for:
[0201] Determine whether the format of the target parsing configuration file is the target format;
[0202] If yes, serialize the target parsing configuration file to obtain the first file;
[0203] If not, the format of the target parsing configuration file is converted into a target format, and a serialization operation is performed on the target parsing configuration file to obtain a first file.
[0204] Optionally, based on the data processing device shown in the above embodiment of the present invention, the processing unit 903 that performs text parsing on the byte data using the first file to obtain the parsing result is specifically configured to:
[0205] Convert the byte data into target data;
[0206] Comparing the target data with the operation function in the first file to obtain a corresponding first result;
[0207] Comparing the target data with the values in the first file to obtain a corresponding second result;
[0208] The first result, the second result, the byte data, and the bytes corresponding to the original position are taken as parsing results.
[0209] An embodiment of the present application provides an electronic device, which includes a processor and a memory, the memory is used for program codes and data for data processing, and the processor is used to call program instructions in the memory to execute the steps shown in the data processing method in the above embodiment.
[0210] An embodiment of the present application provides a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the data processing method shown in the above embodiment.
[0211] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0212] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0213] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one 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 invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized in that: The method comprises: Obtain the download file of the nuclear power instrumentation and control system configuration; Determining a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration; Parsing the downloaded file according to the target parsing configuration file to obtain a parsing result; A parsing report is constructed based on the parsing results.
2. The method according to claim 1, characterized in that: Determine the corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration, including: Searching a pre-built configuration database based on the basic information of the nuclear power instrumentation and control system configuration to determine whether a corresponding parsing configuration file exists; If it exists, the parsing configuration file found is used as the target parsing configuration file; The process of pre-building the configuration database includes: For a nuclear power instrumentation and control system, obtain the download file design documents corresponding to each configuration, as well as the corresponding interface design documents; For each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document; A configuration database is constructed based on the parsed configuration file.
3. The method according to claim 2, characterized in that For each configuration, a parsing configuration file in a preset format is written based on the download file design document and the corresponding interface design document, including: Determine the first field corresponding to the download file design document and the second field corresponding to the corresponding interface design document according to a preset format; Acquire data corresponding to the first field in the download file design document, and acquire data corresponding to the second field in the interface design document; The data corresponding to the first field and the data corresponding to the second field are written into a preset configuration template to obtain a corresponding parsing configuration file.
4. The method according to claim 2, characterized in that Also includes: In response to a parsing configuration file selected from a drop-down menu of a user interface UI, a target parsing configuration file is obtained; or, Respond to the triggering of the import parsing configuration file button in the user interface UI to respond to the parsing configuration file written by the user.
5. The method according to claim 1, characterized in that The download file is parsed according to the target parsing configuration file to obtain a parsing result, including: Performing a serialization operation based on the format of the target parsing configuration file to obtain a first file; Obtaining a single piece of configuration data in the download file; For each single piece of configuration data, determine the starting position and byte length of the corresponding byte data segment from the first file according to the single piece of configuration data; Searching for byte data corresponding to the byte data segment in the download file using the start position and the byte length; The first file is used to perform text parsing on the byte data to obtain a parsing result.
6. The method according to claim 5, characterized in that A serialization operation is performed based on the format of the target parsing configuration file to obtain a first file, including: Determine whether the format of the target parsing configuration file is the target format; If yes, serialize the target parsing configuration file to obtain the first file; If not, the format of the target parsing configuration file is converted into a target format, and a serialization operation is performed on the target parsing configuration file to obtain a first file.
7. The method according to claim 5, characterized in that The byte data is parsed using the first file to obtain a parsing result, including: Convert the byte data into target data; Comparing the target data with the operation function in the first file to obtain a corresponding first result; Comparing the target data with the values in the first file to obtain a corresponding second result; The first result, the second result, the byte data, and the bytes corresponding to the original position are taken as parsing results.
8. A data processing device, characterized in that: The device comprises: An acquisition unit is used to acquire the download file of the nuclear power instrumentation and control system configuration; A determination unit, configured to determine a corresponding target parsing configuration file based on the basic information of the nuclear power instrumentation and control system configuration; A processing unit, configured to parse the download file according to the target parsing configuration file to obtain a parsing result; A construction unit is used to construct a parsing report based on the parsing result.
9. An electronic device, characterized in that: The electronic device is used to run a program, wherein the program executes the data processing method according to any one of claims 1 to 7 when running.
10. A storage medium, characterized in that: The storage medium includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 7.
