A data processing method, device and electronic device based on spectrum

By converting PDF format files into HTML format files and using convolutional neural network and attention mechanism algorithm to identify spectral data, the problems of garbled code and data missing in traditional recognition methods are solved, and the accurate analysis and automated processing of spectral data are achieved. , improves data management efficiency.

CN118468815BActive Publication Date: 2024-11-12SHANDONG YUANLIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410930958.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-11-12
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

Traditional spectral data recognition methods are prone to garbled code, reading failure or character misalignment when identifying PDF files, resulting in accurate positioning and missing data information.

Method used

Convert PDF format files to HTML format files, parse HTML files to obtain spectrum information and non-spectral information, and determine the database storage template according to the detection project category, associate spectrum information, non-spectral information and actual business data, and use volumes The accumulative neural network and attention mechanism algorithm recognize peak positions and shapes and perform image processing to improve data accuracy.

Benefits of technology

It improves the analytical accuracy and management efficiency of spectrum data, realizes the automated processing of spectrum data of large-scale instruments in the laboratory, abandons paper data information, and improves the accuracy of information management and data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468815B_ABST
    Figure CN118468815B_ABST
Patent Text Reader

Abstract

The present application proposes a data processing method, device and electronic device based on spectrogram, which relates to the technical field of spectrogram analysis. The data processing method based on spectrogram includes: obtaining a PDF format file and converting it into an HTML format file; parsing the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least a detection item category; determining an information storage template in a database according to the detection item category; according to the information storage template, associating the spectrogram information, non-spectrogram information and actual business data to obtain an original record file. The present application can improve the accuracy of spectrogram data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of spectrum data analysis, and in particular to a spectrum-based data processing method, device and electronic equipment. Background Art

[0002] At present, the carrier of spectrum data is usually a PDF file. When the spectrum data needs to be analyzed, it is usually necessary to use some recognition tools to identify the spectrum data in the PDF format file and then analyze the spectrum data.

[0003] However, traditional spectrum data recognition methods usually have problems such as garbled characters, reading failures, or character misalignment. When using some recognition tools based on optical character recognition algorithms to recognize PDF files, the PDF files may be recognized out of order, and the target data information cannot be accurately located, and the recognition data information may be missing. Summary of the invention

[0004] In view of the above, it is necessary to propose a data processing method, device and electronic device based on spectrogram to solve the technical problem of low accuracy in making production scheduling plans. Among them, the relevant equipment includes a data processing device and electronic device based on spectrogram.

[0005] The present application provides a spectrogram-based data processing method, which is applied to electronic devices, and the method includes: obtaining a PDF format file and converting it into an HTML format file; parsing the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least a detection item category; determining an information storage template in a database according to the detection item category; and according to the information storage template, associating the spectrogram information, non-spectrogram information and actual business data to obtain an original record file.

[0006] In some embodiments, when the spectrogram information, non-spectrogram information and actual business data are associated, the spectrogram information is saved in first form information and second form information respectively, wherein the first form information is in picture format and the second form information is in text format.

[0007] In some embodiments, the second form information includes a plurality of first data points equally spaced on the experimental data curve, and a horizontal coordinate and a vertical coordinate corresponding to each first data point, wherein the spacing between adjacent first data points is a first spacing.

[0008] In some embodiments, the method also includes: using a convolutional neural network to identify multiple peak positions in the experimental data curve; identifying the main peak position among the multiple absorption peaks in the experimental data curve and the main peak area formed on both sides of the main peak position through an attention mechanism algorithm; converting the main peak area into multiple equally spaced second data points, each of the second data points corresponds to a horizontal coordinate and a vertical coordinate, and a vertical coordinate error range, wherein the spacing between adjacent second data points is a second spacing, and the second spacing is smaller than the first spacing.

[0009] In some embodiments, the method further includes: in response to receiving an instruction to output the original record file, generating third form information in a picture format according to the second form information; comparing the third form information with the first form information, and if the shape change of the main peak area exceeds a preset range, correcting the second form information using the second data point and then outputting the third form information until the shape change of the main peak area is within the preset range.

[0010] In some embodiments, the non-spectral information also includes one or more of experimental methods, instrument setting parameters, and operator information.

[0011] In some embodiments, when the spectrum is an infrared spectrum, the horizontal axis of the experimental data curve is the wave number, and the vertical axis of the experimental data curve is the absorbance, or the horizontal axis of the experimental data curve is the wavelength, and the vertical axis of the experimental data curve is the transmittance.

[0012] In some embodiments, the method further includes: denoising and enhancing the first form information based on a preset image processing algorithm.

[0013] An embodiment of the present application also provides a spectrogram-based data processing device, which includes: an acquisition module, used to acquire a PDF format file and convert it into an HTML format file; a parsing module, used to parse the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least a detection item category; a determination module, used to determine an information storage template in a database according to the detection item category; an association module, used to associate the spectrogram information, non-spectrogram information and actual business data according to the information storage template to obtain an original record file.

[0014] An embodiment of the present application also provides an electronic device, comprising: a memory storing at least one instruction; and a processor executing the instruction stored in the memory to implement the spectrogram-based data processing method.

[0015] It can be seen from the above technical scheme that the embodiment of the present application first obtains a PDF format file and converts it into an HTML format file, and obtains spectrogram information and non-spectrogram information by parsing the HTML format file, thereby being able to improve the accuracy of the parsed spectrogram information and non-spectrogram information. The information storage template in the database is determined according to the detection item category in the non-spectrogram information, and then the spectrogram information, non-spectrogram information and actual business data are associated according to the information storage template to obtain the original record file. In this way, automated processing is achieved for the spectrogram data of large instruments in the laboratory, and paper data information can be abandoned, thereby improving information management efficiency and the accuracy of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is an application scenario diagram of a spectrogram-based data processing method provided in one embodiment of the present application.

[0017] Figure 2 It is a flow chart of a spectrogram-based data processing method provided in one embodiment of the present application.

[0018] Figure 3 It is a functional module diagram of a spectrogram-based data processing device provided in one embodiment of the present application.

[0019] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.

[0021] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0023] The embodiment of the present application provides a spectrogram-based data processing method, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0024] like Figure 1 As shown, a spectrogram-based data processing method provided by the present application can be applied to an electronic device 100, and the electronic device 100 is communicatively connected with a server 200. The electronic device 100 is used to obtain a PDF format file from the server 200 and convert it into an HTML format file; parse the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least a detection item category; determine an information storage template in a database according to the detection item category; and associate the spectrogram information, non-spectrogram information, and actual business data according to the information storage template to obtain an original record file.

[0025] like Figure 2 As shown, it is a flow chart of a data processing method based on a spectrogram provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. A data processing method based on a spectrogram provided in an embodiment of the present application includes the following steps.

[0026] S20, obtaining a PDF format file and converting the file into an HTML format file.

[0027] In an embodiment of the present application, since PDF format files can maintain data consistency and accuracy, are easy to store and transmit, and can also be encrypted to ensure data security, PDF format files are usually used to store spectrogram data. However, the layout of PDF format files is fixed and cannot be edited once created (unless a special PDF editing tool is used). Although this feature helps prevent the data in the PDF format file from being accidentally modified or damaged during transmission or viewing, this method may cause inconvenience in parsing the data in the PDF file, thereby causing the problem of low efficiency in data parsing.

[0028] In one embodiment of the present application, in order to improve the accuracy of spectrogram information processing, the data in PDF format containing spectrogram information can be converted into data in HTML format. In this way, the reading experience and editing convenience when the spectrogram data is used can be improved, and the HTML format has a high degree of freedom, can automatically adjust the layout according to different devices and screen sizes, can adapt to a variety of different devices, and ensure that the spectrogram data can be fully displayed on multiple device platforms, thereby improving the reading experience. Compared with data in PDF format, data in HTML format is easier to edit and modify, so it is easier to update and maintain the content. And through data in HTML format, spectrogram data can be more directly embedded in a web page, and can be shared and disseminated online through methods such as links and nested codes, so as to expand the influence and availability of data. In addition, spectrogram data in HTML format are easier to be crawled and indexed by search engines, which helps to improve the discoverability and dissemination efficiency of data. Secondly, converting spectrogram data in PDF format to HTML format helps to improve the search engine's ability to parse data, especially to improve the efficiency of search engines' indexing of elements such as pictures and charts. In addition, after converting PDF format files to HTML format files, the file size may be reduced by compression and optimization, thereby saving storage space to a certain extent.

[0029] In one embodiment of the present application, spectrogram data can be a visual representation of light, sound or other signals, and the spectrogram data changes with time or other variables, and can show the distribution of signals at different frequencies or times. Specifically, spectrogram data includes multiple types such as spectrograms and spectrograms, each of which is suitable for different signal analysis scenarios. And spectrogram data can be applied to many different fields, including: in the field of physics, spectrograms are often used to analyze the optical properties of substances, such as absorption spectra, emission spectra, etc., and the composition and structure of substances can be understood through spectrograms; in the field of electronic engineering, in electronic engineering, spectrum analyzers are used to convert the sound waves of notes into visual displays of component frequencies. This visual display is a spectrogram, which helps in the analysis and processing of audio signals; in the field of mathematics, the spectrogram of a matrix is ​​a multiple set of eigenvalues ​​of a matrix, which is used to study the properties and characteristics of the matrix; in the field of computer science, Spectral Graph Theory is an effective method for studying the characteristics of graphs. By fusing the underlying features and advanced features of an image through a spectrogram framework, the efficiency and accuracy of image processing can be improved.

[0030] In one embodiment of the present application, the spectrogram data may be in multiple types, including but not limited to bar graphs, line graphs, scatter graphs, pie charts, etc. Multiple types of spectrogram data are suitable for different analysis needs and scenarios.

[0031] In one embodiment of the present application, in order to parse the spectral data in a PDF format file to improve the efficiency of spectral data analysis, the PDF format file can be converted into an HTML format file, including: identifying text and non-text in the PDF format; converting the text and non-text into HTML format respectively; optimizing the HTML format data to obtain an optimized HTML format file.

[0032] For example, the PDF structure can be parsed to identify text and non-text in the PDF format. Specifically, PDF files usually contain multiple elements such as text, images, and tables. The conversion tool can be used to parse the internal structure of the PDF file to identify the text content therein. Text recognition technology (Optical Character Recognition) can also be used for PDF files containing scanned images or handwritten text to identify the text in the image and convert it into an editable text format.

[0033] For example, when converting the format of the text, the format in the original PDF file, such as font format, color format, size format, etc., can be retained based on a preset conversion tool. Alternatively, the conversion tool can generate corresponding HTML tags based on the extracted text content and format information. For example, a text paragraph will be converted to Tags, titles may be converted to <h1>、< / h1> <h2>etc. Title tags.

[0034] For example, non-text includes images, tables, etc., and the format conversion of non-text includes: extracting images, combining The tag and the image URL or Base64 encoding are embedded into the HTML file; by combining the

[0035]

[0036]

[0037]

[0038] <canvas>Tags), SVG ( <svg>tags) or other specific elements; extract non-spectral information, which may include text, links, tables, etc.

[0039] In one embodiment of the present application, the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least the category of the detection item. The experimental data curve can be used to characterize the trend of experimental data changing over time.

[0040] In one embodiment of the present application, the non-spectral information also includes one or more of experimental methods, instrument setting parameters, and operator information.

[0041] S22, determining an information storage template in a database according to the detection item category.

[0042] In one embodiment of the present application, in order to associate spectral information, non-spectral information and actual business data, the corresponding information storage template in the database can be determined according to the category of the detection item of the spectral information, including: different categories of spectral information (such as mass spectrometry, gene expression spectrum, X-ray diffraction pattern, etc.) may have significant differences in data structure, information density and query requirements, so the specific category of the detection item can be determined, such as chemical analysis, bioinformatics, materials science, etc., and the characteristics of the spectral information under these categories; according to the complexity and diversity of the spectral information, the data type (such as numerical type, text type, image type, etc.) and data structure (such as table, graph, network, etc.) to be stored are determined; how users query and retrieve through spectral information is analyzed, such as whether it is necessary to support rapid positioning of specific features, comparison of similarities between different spectra, etc.; consider the data update frequency, maintenance difficulty and whether it is necessary to support concurrent access, etc.; determine the database type, for example, the database type includes relational database, NoSQL database, graph database, etc.; according to the category and characteristics of the spectral information, determine the corresponding data table or collection to store information. For example, you can design a "spectrum basic information table" to store basic information such as the name, type, and source of the spectrum, and design a "spectrum data table" to store specific spectrum data (such as peak value, wavelength, etc.). Apply the preset storage template to the database, create the corresponding data table, collection or graph structure, and import the actual spectrum information data for testing; test by simulating actual usage scenarios to verify whether the storage template meets the requirements, including data integrity, query accuracy and efficiency, etc.; make necessary adjustments and optimizations based on the test results to ensure the practicality and efficiency of the storage template.

[0043] S23, according to the information storage template, associating the spectral information, non-spectral information and actual business data to obtain an original record file.

[0044] In one embodiment of the present application, according to the information storage template, associating the spectral information, non-spectral information and actual business data includes: standardizing the spectral information, non-spectral information and actual business data to ensure consistency in data format, unit, naming convention, etc.; performing data cleaning on the spectral information, non-spectral information and actual business data to remove duplicates, outliers or invalid data to improve data quality; using the primary key and foreign key in the database to associate data, determining the unique identifier of each data record based on the primary key (Primary Key), and using foreign keys (Foreign Key) to establish an association relationship between different data tables. For example, any field in the non-spectral information table can be set as the foreign key of the spectral information table, thereby associating two spectral information tables; During or after the data association process, data verification can be performed to ensure the correctness and completeness of the association. For example, data consistency, integrity constraints (such as non-empty fields, data type matching, etc.) and business rules (such as date range, data range, etc.) can be checked based on preset data verification algorithms or data verification tools; the associated data is stored in a database or file system to ensure that the database table or file structure meets the requirements of the information storage template; indexes are set to optimize query performance; for fields with higher query frequencies (such as sample ID, analysis date, etc.), indexes can be created to speed up data retrieval.

[0045] In one embodiment of the present application, when the spectrogram information, non-spectrogram information and actual business data are associated, the spectrogram information is saved in first form information and second form information respectively, wherein the first form information is in picture format and the second form information is in text format.

[0046] For example, the first form information may be a curve image used to represent the temperature change over time at a certain temperature observation point; the second form information may be information in text format associated with the curve image, wherein the second form information is used to explain the first form information.

[0047] In one embodiment of the present application, in order to improve the confidence of the accuracy of the third form information determined based on the first information, the first form information may be denoised and enhanced based on a preset image processing algorithm. The preset image processing algorithm may be a convolutional neural network algorithm, a fully connected neural network, etc., which is not limited in the present application.

[0048] In one embodiment of the present application, the second form information includes a plurality of first data points equally spaced on the experimental data curve, and a horizontal coordinate and a vertical coordinate corresponding to each first data point, wherein the spacing between adjacent first data points is a first spacing.

[0049] Exemplarily, when the second form information includes three first data points, and the experimental data curve is used to characterize the curve of temperature change over time at a certain temperature observation point, the horizontal and vertical coordinates corresponding to the multiple first data points can be: (00:00, 20 degrees Celsius), (01:00, 22 degrees Celsius), (02:00, 24 degrees Celsius); the above three first data points respectively represent that the temperature observed at the temperature observation point at 0 o'clock in the morning is 20 degrees Celsius, the temperature observed at the temperature observation point at 1 o'clock in the morning is 22 degrees Celsius, and the temperature observed at the temperature observation point at 2 o'clock in the morning is 23 degrees Celsius.

[0050] In one embodiment of the present application, the method also includes: using a convolutional neural network to identify multiple peak positions in the experimental data curve; identifying the main peak position among the multiple absorption peaks in the experimental data curve and the main peak area formed on both sides of the main peak position through an attention mechanism algorithm; converting the main peak area into a plurality of equally spaced second data points, and each of the second data points corresponds to a horizontal coordinate and a vertical coordinate, as well as a vertical coordinate error range, wherein the spacing between adjacent second data points is a second spacing, and the second spacing is smaller than the first spacing.

[0051] Among them, using a convolutional neural network to identify multiple peak positions in the experimental data curve includes: by plotting the time series data into a grayscale image, converting the one-dimensional experimental data curve into a two-dimensional image form, wherein the horizontal axis represents time or sample points, the vertical axis represents data values, and the grayscale value corresponds to the size of the data value; normalizing the image data to ensure that the data values ​​are distributed between 0 and 1; extracting features from the normalized image based on multiple convolutional layers, in the peak detection process, the convolutional layer can be used to identify local patterns in the curve, such as rising edges, falling edges, and platforms, etc., which are related to the peak position connection; by performing pooling operation on the normalized image, the dimension of the feature map is reduced to improve the generalization ability of the model; by analyzing the feature map output by the convolution layer, the highlight area in the feature map is determined, and then the features related to the peak position are determined; in order to further determine the peak position, the features related to the peak position can be post-processed to improve the accuracy of the output peak position, for example, the post-processing can be threshold processing, non-maximum suppression (NMS), etc., among which, threshold processing of the features related to the peak position can filter out non-significant peak candidate points; NMS can be used to eliminate adjacent redundant peak points.

[0052] In one embodiment of the present application, the method also includes: in response to receiving an instruction to output the original record file, generating third form information in a picture format according to the second form information; comparing the third form information with the first form information, and if the shape change of the main peak area exceeds a preset range, correcting the second form information using the second data point and then outputting the third form information until the shape change of the main peak area is within the preset range.

[0053] Among them, since the second form information is the descriptive text information corresponding to the first form information, the third form information in the picture format can be regenerated according to the second form information, wherein the third form information is an image associated with the second form information. For example, when the second form information is used to describe a curve of temperature changes over time at a certain temperature observation point, the third form information is an image of the curve of temperature changes over time at the temperature observation point. When the shape change of the main peak area of ​​the third form information in the first form information exceeds a preset range, it indicates that the difference between the image data generated by the second form information and the original image data in the spectrogram information is large, and therefore the data accuracy in the third form information is low, then the second form information can be corrected according to the second data point used to characterize the main peak position, and then the third form information is output. This ensures that the content in the output third form information is more accurate.

[0054] In one embodiment of the present application, when the spectrum is an infrared spectrum, the horizontal axis of the experimental data curve is the wave number, and the vertical axis of the experimental data curve is the absorbance, or the horizontal axis of the experimental data curve is the wavelength, and the vertical axis of the experimental data curve is the transmittance.

[0055] It can be seen from the above technical scheme that the embodiment of the present application first obtains a PDF format file and converts it into an HTML format file, and obtains spectrogram information and non-spectrogram information by parsing the HTML format file, thereby being able to improve the accuracy of the parsed spectrogram information and non-spectrogram information. The information storage template in the database is determined according to the detection item category in the non-spectrogram information, and then the spectrogram information, non-spectrogram information and actual business data are associated according to the information storage template to obtain the original record file. In this way, automated processing is achieved for the spectrogram data of large instruments in the laboratory, and paper data information can be abandoned, thereby improving information management efficiency and the accuracy of data processing.

[0056] See also Figure 3 , Figure 3 1 is a functional module diagram of a data processing device based on a spectrogram provided in an embodiment of the present application. A data processing device based on a spectrogram 31 includes an acquisition module 310, a parsing module 311, a determination module 312 and an association module 313. The module / unit referred to in the present application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete a fixed function, which is stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0057] The acquisition module 310 is used to acquire a PDF format file and convert it into an HTML format file;

[0058] The parsing module 311 is used to parse the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes the experimental data curve and the coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least the detection item category;

[0059] A determination module 312, configured to determine an information storage template in a database according to the detection item category;

[0060] The association module 313 is used to associate the spectral information, non-spectral information and actual business data according to the information storage template to obtain an original record file.

[0061] See also Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is used to execute the computer-readable instructions stored in the memory to implement a data processing method based on a spectrogram described in any of the above embodiments.

[0062] In an embodiment of the present application, the electronic device 100 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as a spectrogram-based data processing program.

[0063] Figure 4 Only the electronic device 100 having the memory 12 and the processor 13 is shown, and those skilled in the art can understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 100 , and the electronic device 100 may include fewer or more components than shown in the figure, or combine some components, or arrange the components differently.

[0064] Combination Figure 2 The memory 12 in the electronic device 100 stores a plurality of computer-readable instructions to implement a data processing method based on a spectrum, and the processor 13 can execute the plurality of instructions to implement: obtaining a PDF format file and converting it into an HTML format file; parsing the HTML format file to obtain spectrum information and non-spectrum information, wherein the spectrum information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrum information includes at least a detection item category; determining an information storage template in a database according to the detection item category; according to the information storage template, associating the spectrum information, non-spectrum information and actual business data to obtain an original record file.

[0065] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0066] Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. The electronic device 100 may be a bus-type structure or a star-type structure. The electronic device 100 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the electronic device 100 may also include input and output devices, network access devices, etc.

[0067] It should be noted that the electronic device 100 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

[0068] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium can be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 12 can be an internal storage unit of the electronic device 100 in some embodiments, such as a mobile hard disk of the electronic device 100. The memory 12 can also be an external storage device of the electronic device 100 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 100. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 100, such as a code of a data processing program based on a spectrum, etc., but also can be used to temporarily store data that has been output or is to be output.

[0069] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 100, and uses various interfaces and lines to connect various components of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing programs or modules stored in the memory 12 (for example, executing a data processing program based on a spectrum, etc.), and calling data stored in the memory 12.

[0070] The processor 13 executes the operating system of the electronic device 100 and various installed applications. The processor 13 executes the applications to implement the steps in each of the above-mentioned embodiments of the data processing method based on the spectrum, for example Figure 2 Steps shown.

[0071] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 100. For example, the computer program may be divided into an acquisition module 310, a parsing module 311, a determination module 312, and an association module 313.

[0072] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a plurality of instructions for enabling a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of a spectrogram-based data processing method described in each embodiment of the present application.

[0073] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware devices to complete through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.

[0074] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory and other memory, etc.

[0075] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0076] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. Figure 4 Only one arrow is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.

[0077] An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable storage medium is stored computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement a spectrogram-based data processing method described in any of the above embodiments.

[0078] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0079] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.< / svg> < / canvas> The URL or Base64 encoding of the tag and the table is embedded in the HTML file, and the row and column structure and style of the table are retained. In this way, by extracting and formatting the text and non-text in the PDF format file respectively, an HTML format file is obtained, which can improve the usability and editability of the spectrogram data in the PDF format file. S21, parse the HTML format file to obtain spectrogram information and non-spectrogram information. In one embodiment of the present application, parsing the HTML file to obtain specific information therein (such as spectrogram information and non-spectrogram information) includes: loading HTML content, parsing HTML structure, and extracting required data. The above method can be implemented based on the commonly used libraries in Python programs. For example, the BeautifulSoup library in the Python program can be used to parse HTML format files. Exemplarily, parsing HTML format files using libraries in the Python program includes: installing necessary libraries; loading HTML content; reading HTML content, for example, reading from a file or obtaining from the network; inputting HTML content into the Python program library to parse HTML; extracting spectrogram information, wherein the spectrogram information may be in the form of pictures (tags), Canvas ( < / h2>

Claims

1. A data processing method based on spectrogram, applied to electronic equipment, characterized in that: The method comprises: Get PDF files and convert them into HTML files; Parsing the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least a detection item category; Determine an information storage template in a database according to the detection item category; According to the information storage template, associating the spectral information, non-spectral information and actual business data to obtain an original record file; and A convolutional neural network is used to identify multiple peak positions in the experimental data curve; a main peak position among multiple absorption peaks in the experimental data curve and a main peak area formed on both sides of the main peak position are identified by an attention mechanism algorithm; the main peak area is converted into multiple second data points at equal intervals, and each second data point corresponds to a horizontal coordinate and a vertical coordinate, as well as an error range of the vertical coordinate, wherein the spacing between adjacent second data points is a second spacing, and the second spacing is smaller than the first spacing; wherein the first spacing is the spacing between multiple first data points on the experimental data curve; In response to receiving an instruction to output the original record file, third form information in a picture format is generated according to the second form information; the third form information is compared with the first form information, and if the shape change of the main peak area exceeds a preset range, the second form information is corrected using the second data point and then the third form information is output until the shape change of the main peak area is within the preset range.

2. The data processing method based on spectrogram according to claim 1, characterized in that: When the spectrogram information, non-spectrogram information and actual business data are associated, the spectrogram information is saved in the first form information and the second form information respectively, wherein the first form information is in a picture format and the second form information is in a text format.

3. The data processing method based on spectrogram according to claim 2, characterized in that: The second form information includes a plurality of first data points equally spaced on the experimental data curve, and a horizontal coordinate and a vertical coordinate corresponding to each first data point, wherein the spacing between adjacent first data points is a first spacing.

4. The data processing method based on spectrogram according to claim 1, characterized in that: The non-spectral information also includes one or more of experimental methods, instrument setting parameters, and operator information.

5. The spectrogram-based data processing method according to claim 3, characterized in that: When the spectrum is an infrared spectrum, the horizontal axis of the experimental data curve is the wave number, and the vertical axis of the experimental data curve is the absorbance, or the horizontal axis of the experimental data curve is the wavelength, and the vertical axis of the experimental data curve is the transmittance.

6. The spectrogram-based data processing method according to claim 2, characterized in that: The method further includes: denoising and enhancing the first form information based on a preset image processing algorithm.

7. A data processing device based on spectrogram, characterized in that: The device comprises a module for implementing the spectrogram-based data processing method according to any one of claims 1 to 6, and the device comprises: The acquisition module is used to acquire the PDF format file and convert it into the HTML format file; A parsing module, used for parsing the HTML format file to obtain spectrogram information and non-spectrogram information, wherein the spectrogram information includes an experimental data curve and coordinate information of at least some points on the experimental data curve, and the non-spectrogram information includes at least a detection item category; A determination module, used to determine the information storage template in the database according to the detection item category; An association module is used to associate the spectral information, non-spectral information and actual business data according to the information storage template to obtain an original record file.

8. An electronic device, characterized in that: The electronic device comprises a processor and a memory, and the processor is used to implement the spectrogram-based data processing method as described in any one of claims 1 to 6 when executing a computer program stored in the memory.