New energy power data processing method and device
By extracting and integrating the keyword feature vectors of new energy power data, the problem of data isolation on different system platforms is solved, and effective data integration and management efficiency are improved.
Patent Information
- Application Number
- CN202410993536.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-24
AI Technical Summary
Due to the inconsistent and isolation of data information formats between different system platforms, new energy power data is difficult to integrate data and cannot effectively support management and decision-making.
By obtaining new energy power data from multiple power system platforms, extracting keywords and converting them into feature vectors, computing the distance between feature vectors to determine the associated text and images, and fusing them into a fusion feature vector, based on presets The format file processes the data.
The text and image correlation of new energy power data is realized, which reduces the complexity of data management, improves data processing efficiency and reduces processing time.
Smart Images

Figure CN118982833A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for processing new energy power data. Background Art
[0002] New energy refers to clean and renewable energy generated by using constantly updated resources in nature, such as solar energy, wind energy, etc., as well as biomass energy, geothermal energy, etc. Compared with traditional thermal power generation, new energy power generation has the advantages of environmental protection and sustainability, and is an important direction for future power development.
[0003] Renewable energy power generation involves many system platforms, and the data information formats generated by each system platform are inconsistent. In addition, the data information between different system platforms is isolated from each other, and the data between different system platforms cannot be accessed by each other, which makes it difficult to integrate new energy data and cannot effectively support management and decision-making. Therefore, how to achieve data integration of new energy power to improve the efficiency of management and decision-making has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, the present application provides a new energy power data processing method and device, which can
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a new energy power data processing method, including:
[0007] Acquire new energy power data, the power data including multiple texts and multiple images, and the power data comes from multiple power system platforms;
[0008] Extracting a first keyword from each text, converting the first keyword extracted from each text into a first preset format file, and converting the first keyword of each text into a first feature vector;
[0009] Extracting second keywords from each image, converting the second keywords extracted from each image into a second preset format file, and converting the second keywords of each image into a second feature vector;
[0010] Calculating the distance between each first feature vector and each second feature vector, and determining the associated text and image according to the distance;
[0011] The first feature vector and the second feature vector corresponding to the associated text and image are fused to obtain a fused feature vector, and the new energy power data is processed based on the first preset format file, the second preset format file and the fused feature vector.
[0012] Based on the first aspect, in some embodiments, extracting the second keyword from each image includes:
[0013] Filter and reduce noise on the image;
[0014] Inputting image samples containing label information into an image segmentation model to train the image segmentation model; wherein the label information includes image category and segmentation position of the image area;
[0015] Using the trained image segmentation model to segment the image that has been filtered and denoised, to obtain at least one image region;
[0016] Text is recognized from the image region, and a second keyword is extracted from the recognized text.
[0017] Based on the first aspect, in some embodiments, there are multiple image categories, and each category of images corresponds to a segmentation position of an image area, and the image area contains text or pictures, and the segmentation position of the image area containing text is different from the segmentation position of the image area containing pictures.
[0018] Based on the first aspect, in some embodiments, the image category is determined based on text in a preset area in the image;
[0019] The trained image segmentation model is used to segment the image after filtering and noise reduction to obtain at least one image region, including:
[0020] Input the filtered and denoised image into the trained image segmentation model;
[0021] The image segmentation model extracts text from a preset area of the image, determines the image category based on the text, and retrieves the segmentation position of the image area corresponding to the image category;
[0022] The image segmentation model segments the image based on the segmentation position of the image region to obtain at least one image region.
[0023] Based on the first aspect, in some embodiments, extracting the first keyword from each text includes:
[0024] Segment the text to determine the first frequency and position of each word in the text;
[0025] Determine the first span of each word in the text according to the distance between the first position and the second position of each word in the text; wherein the first position is the position where the word first appears in the text, the second position is the position where the word last appears in the text, and the distance between the first position and the second position is the number of words between the first position and the second position;
[0026] Determine a target word whose first frequency is greater than a threshold, and use a first preset number of words with the largest first span among the target words as candidate keywords of the text, where the number of candidate keywords is a first preset number;
[0027] Determine the second frequency and second span of each candidate keyword appearing in other texts;
[0028] The product of the first frequency and the first span, and the product of the second frequency and the second fast reading are calculated, and the candidate keyword with the largest product difference is recorded as the first keyword of the text. The number of first keywords is the second preset number, and the second preset number is less than the first preset number.
[0029] Based on the first aspect, in some embodiments, calculating the distance between each first feature vector and each second feature vector, and determining the associated text and image according to the distance includes:
[0030] For any first eigenvector, calculate the cosine similarity between the first eigenvector and each second eigenvector;
[0031] The first feature vector is associated with the second feature vector with the smallest cosine similarity to obtain associated text and image.
[0032] Based on the first aspect, in some embodiments, converting the first keyword of each text into a first feature vector includes: there are multiple first keywords, each row of elements in the first feature vector corresponds to a first keyword, and according to the frequency of each first keyword appearing in the target text multiplied by the span and a preset weight, the value of the element corresponding to each first keyword is calculated to obtain the first feature vector;
[0033] The method of converting the second keyword of each image into a second feature vector includes: there are multiple second keywords, each row of elements in the second feature vector corresponds to a second keyword, and the value of the element corresponding to each second keyword is calculated according to the frequency of occurrence of each second keyword in the target image multiplied by the span and the preset weight to obtain the second feature vector.
[0034] Based on the first aspect, in some embodiments, fusing the first feature vector and the second feature vector corresponding to the associated text and image to obtain the fused feature vector includes:
[0035] Calculate the sum of two elements at the same position of the first eigenvector and the second eigenvector, the two elements correspond to two weight values respectively, and the weight value of the element of the first eigenvector is greater than the weight value of the element of the second eigenvector;
[0036] The sum of the two elements is used as the value of the element at the corresponding position of the fused feature vector;
[0037] The sum of the two elements at each position is calculated in turn to obtain the value of the element at each position of the fused feature vector.
[0038] Based on the first aspect, in some embodiments, the processing of the new energy power data based on the first preset format file, the second preset format file and the fused feature vector includes:
[0039] Associating the first preset format file, the second preset format file and the fused feature vector, and setting preset feature identification information; wherein the preset feature identification information is set based on a preset rule;
[0040] Obtaining a new energy power data query request input by a user, the new energy power data query request packet characteristic identifier;
[0041] In response to the new energy power data query request, determine the target preset characteristic identification information consistent with the characteristic identification;
[0042] The first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identification information are displayed to the user.
[0043] In a second aspect, an embodiment of the present application provides a new energy power data processing device, including:
[0044] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0045] In the embodiment of the present application, the new energy power data of multiple power systems can be acquired in advance, and then keywords can be extracted from the new energy power data and converted into feature vectors, and the new energy power data can be converted into a preset format file, and then the associated text and image in the new energy power data can be determined according to the distance between the feature vectors, and finally the feature vectors of the associated image and text are fused, and then the new energy power data is processed according to the fused feature vector and the preset format file. When it is necessary to process the new energy power data of certain sites or certain businesses, the corresponding new energy power data can be retrieved for processing, so that the text and image in the new energy power data can be associated, reducing the complexity of new energy power data management, and the above processing can be performed on the new energy power data in advance, so that the time required for processing the new energy power data can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0047] Figure 1 It is a flowchart of a new energy power data processing method provided in an embodiment of the present application;
[0048] Figure 2 is a structural schematic diagram of a new energy power data processing device provided in an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The present application is described more clearly below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the effects of the present application, but are not intended to limit the present application in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present application. These all fall within the scope of protection of the present application.
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0052] See also Figure 1 The new energy power data processing method provided in the embodiment of the present application may include the following steps:
[0053] Step 101, obtaining new energy power data.
[0054] The power data includes multiple texts and multiple images, and the power data comes from multiple power system platforms.
[0055] In some embodiments, step 101 may specifically include: sending a request for obtaining new energy power data to each system platform associated with the new energy power business, the request may include filtering information such as a business identifier or a site identifier; receiving new energy power data sent by each system platform associated with the new energy power business, the new energy power data is obtained by each system platform responding to the new energy power data acquisition request to retrieve power data corresponding to the filtering information. The filtering information may be one or more. In the case where there are multiple business identifiers or site identifiers, after obtaining the new energy power data, the filtering information of the new energy power data is determined and each new energy power data containing the same filtering information is combined into a new energy power data set.
[0056] In some other embodiments, step 101 may specifically include: sending a new energy power data acquisition request to each system platform associated with the new energy power business, the request including a time period and a business identifier or a site identifier; receiving new energy power data sent by each system platform associated with the new energy power business, the new energy power data being obtained by each system platform in response to the new energy power data acquisition request to retrieve the new energy power data within the time period; extracting the business identifier or site identifier from each new energy power data; in the case where there are multiple business identifiers or site identifiers, synthesizing each new energy power data containing the same business identifier or site identifier into a new energy power data set to obtain multiple new energy power data sets.
[0057] In the embodiment of the present application, a request for obtaining new energy power data can be sent to each system platform through a terminal device, and the request includes a service identifier or a site identifier. At this time, each system platform can send the new energy power data corresponding to the service identifier or the site identifier to the terminal device. Alternatively, a request for obtaining new energy power data can be sent to each system platform through a terminal device, and the request for obtaining new energy power data includes a time period. The new energy power data in each system platform does not directly include a service identifier or a site identifier. Keywords of the service identifier or the site identifier in each new energy power data can be extracted first, and the service identifier or the site identifier of each new energy power data can be determined according to the keywords of the service identifier or the site identifier. Each system platform then sends the new energy power data within the time period to the terminal device.
[0058] For example, the embodiment of the present application can send the new energy power data in a certain time period to the terminal device in advance, or send the new energy power data of certain services to the terminal device, or send the new energy power data of certain sites to the terminal device, and the terminal device processes it to realize the subsequent processing of the new energy power data. When it is necessary to process the new energy power data of a certain time period or certain services or certain sites, the new energy power data obtained by subsequent processing can be retrieved for processing.
[0059] Step 102: extract the first keyword from each text, convert the first keyword extracted from each text into a first preset format file, and convert the first keyword of each text into a first feature vector.
[0060] In some embodiments, the above process of extracting the first keyword from each text may include: segmenting the text to determine the first frequency and position of each word in the text; determining the first span of each word in the text according to the distance between the first position and the second position of each word in the text; wherein the first position is the position of the first appearance in the text, the second position is the position of the last appearance in the text, and the distance between the first position and the second position is the number of words between the first position and the second position; determining a target word whose first frequency is greater than a threshold, and taking a first preset number of words with the largest first span in the target word as candidate keywords for the text, and the number of candidate keywords is the first preset number; determining the second frequency and second span of each candidate keyword in other texts; calculating the product of the first frequency and the first span, and the product of the second frequency and the second span, and recording the candidate keyword with the largest product difference as the first keyword of the text, and the number of first keywords is the second preset number, which is less than the first preset number.
[0061] Exemplarily, the first frequency is the number of times a word appears in a text, the second frequency is the number of times the candidate keyword appears in other texts, and the span is the number of words between the first position and the second position.
[0062] Step 103: extract the second keyword from each image, convert the second keyword extracted from each image into a second preset format file, and convert the second keyword of each image into a second feature vector.
[0063] In some embodiments, the process of extracting the second keyword from each of the above-mentioned images may include: filtering and denoising the image; inputting image samples containing marking information into an image segmentation model to train the image segmentation model; wherein the marking information includes the image category and the segmentation position of the image area; using the trained image segmentation model to segment the image that has been filtered and denoised to obtain at least one image area; identifying text from the image area, and extracting the second keyword from the identified text.
[0064] Exemplarily, the above-mentioned filtering and denoising of images can be implemented based on convolutional neural networks. Specifically, in order to train a filtering and denoising model with excellent performance, a large number of noisy images need to be prepared as training sets. At the same time, corresponding noise-free images need to be prepared as labels. The image denoising model based on convolutional neural networks consists of multiple convolutional layers, pooling layers, and fully connected layers. Among them, the convolutional layer is responsible for learning features from the input image, the pooling layer is responsible for reducing the feature dimension, and the fully connected layer is responsible for mapping the learned features to the labels. During the training process, the input image is convolved with the filter learned by the convolutional layer to obtain a denoised image; by comparing the difference between the denoised image and the label, the loss function is calculated and the filter parameters are updated by backpropagation; the above process is repeated until the model performance meets the expected requirements.
[0065] In this embodiment, there may be multiple image categories, and each category of images corresponds to a segmentation position of an image area. The image area contains text or pictures, and the segmentation position of the image area containing text is different from the segmentation position of the image area containing pictures.
[0066] For example, the image category can be determined based on the site, image content, etc. For example, the image categories of the images of renewable energy power data generated by different sites are different; or, the image content in the image is different, and the corresponding image category is also different. Among them, the image content can be the model of the equipment in the image, or the header title of the table in the image, etc., which is not limited.
[0067] In some embodiments, the image category is determined based on text in a preset area of the image, for example, based on the header text of a table in the image. The above-mentioned use of a trained image segmentation model to segment the image after filtering and denoising to obtain at least one image area may include: inputting the image after filtering and denoising to the trained image segmentation model; the image segmentation model extracts text from a preset area of the image, determines the image category based on the text, and retrieves the segmentation position of the image area corresponding to the image category; the image segmentation model segments the image based on the segmentation position of the image area to obtain at least one image area.
[0068] In this embodiment, for a specific image category, the position of the text contained therein in the image is fixed, so the segmentation position of the image region can be set in advance according to the image category. Specifically, the segmentation position of the image region can be set manually, or the segmentation position of the image region can be set by learning through a neural network model.
[0069] In this step, the image may be an image of some standard file. For the image of the standard file, the image area where the content to be extracted is located can be extracted from the image first, and then keyword extraction is performed in the extracted image area.
[0070] Specifically, the implementation process of "recognizing text from an image region and extracting a second keyword from the recognized text" may include: converting the image region into a text image to be recognized, extracting connected regions from the text image to be recognized, and obtaining multiple connected regions; determining the contour of each character in each connected region, segmenting the contour to obtain multiple characters and recording the positional relationship of each character in the connected region; recognizing each character, and generating the text to be extracted based on the positional relationship of each character in the connected region; and extracting the second keyword from the text to be extracted. Among them, converting the image region into a text image to be recognized may be converting the image region into a grayscale image to obtain a text image to be recognized.
[0071] Exemplarily, the standard file usually includes the file name and the specific content of the file, so in this step, the second keyword can be extracted from the text corresponding to the file name part, or the second keyword can be extracted from the text corresponding to the file name and the specific content of the file. The process of extracting the second keyword can refer to the relevant content in step 102, which will not be repeated here.
[0072] Exemplarily, connected region extraction is performed on a text image to be recognized to obtain multiple connected regions, which may include: determining the grayscale value of each pixel in the text image to be recognized, and determining a pixel cluster in each row of pixels in the text image to be recognized based on the grayscale value of each pixel, wherein each pixel in the pixel cluster is connected and the grayscale values are preset grayscale values; determining pixel clusters that are interconnected between pixels in different rows based on the positions of each pixel cluster to obtain connected regions; wherein, in the same connected region, there are pixels located in the same column between pixel clusters in adjacent rows.
[0073] Specifically, in the text image to be recognized, the grayscale values of the pixels corresponding to the text characters are the same. Therefore, the grayscale values of the pixels in each row of the text image to be recognized can be compared with the preset grayscale value, and the pixels with the same grayscale value as the preset grayscale value can be found to find the pixels of the text characters. If these pixels are connected, they form a pixel cluster. Thus, the pixel clusters in each row of pixels are found, and it is determined that the connected pixel clusters form multiple connected areas, which are the areas where the text characters are located.
[0074] Step 104: Calculate the distance between each first feature vector and each second feature vector, and determine the associated text and image according to the distance.
[0075] In some embodiments, the implementation process of step 104 may include: for any first feature vector, calculating the cosine similarity between the first feature vector and each second feature vector; associating the first feature vector with the second feature vector with the smallest cosine similarity to obtain associated text and image.
[0076] Among them, cosine similarity is the cosine value of the angle between two vectors, which is used to measure the consistency of the directions of the two vectors. The larger the cosine similarity, the smaller the angle between the two vectors and the higher the directional consistency; the smaller the cosine similarity, the larger the angle between the two vectors and the lower the directional consistency.
[0077] In some embodiments, the process of converting the first keyword of each text into a first feature vector may include: there are multiple first keywords, each row of elements in the first feature vector corresponds to a first keyword, and the value of the element corresponding to each first keyword is calculated according to the frequency of occurrence of each first keyword in the target text multiplied by the span and the preset weight to obtain the first feature vector.
[0078] The process of converting the second keyword of each image into a second feature vector may include: there are multiple second keywords, each row of elements in the second feature vector corresponds to a second keyword, and the value of the element corresponding to each second keyword is calculated according to the frequency of occurrence of each second keyword in the target image multiplied by the span and the preset weight to obtain the second feature vector.
[0079] Step 105: fuse the first feature vector and the second feature vector corresponding to the associated text and image to obtain a fused feature vector, and process the new energy power data based on the first preset format file, the second preset format file and the fused feature vector.
[0080] In some embodiments, the above-mentioned fusion of the first feature vector and the second feature vector corresponding to the associated text and image to obtain the fused feature vector may include: calculating the sum of two elements at the same position of the first feature vector and the second feature vector, the two elements respectively corresponding to two weight values, and the weight value of the element of the first feature vector is greater than the weight value of the element of the second feature vector; taking the sum of the two elements as the value of the element at the corresponding position of the fused feature vector; and calculating the sum of the two elements at each position in turn to obtain the value of the element at each position of the fused feature vector.
[0081] Specifically, two elements at the same position of the first eigenvector and the second eigenvector are multiplied by their corresponding weight values respectively, and then the two products are added to obtain the value of the element at the corresponding position of the fused eigenvector.
[0082] In addition, the values of the elements at the corresponding positions of the first eigenvector and the second eigenvector can be synthesized into a new value. For example, if the value of an element of the first eigenvector is ab, and the value of the element at the corresponding position of the second eigenvector is cd, then the synthesized new value is abcd, where a, b, c, and d are all numerical values.
[0083] In some embodiments, the above-mentioned processing of the new energy power data based on the first preset format file, the second preset format file and the fused feature vector may include: associating the first preset format file, the second preset format file and the fused feature vector, and setting preset feature identification information; wherein the preset feature identification information is set based on preset rules; obtaining a new energy power data query request input by a user, the new energy power data query request packet feature identification; responding to the new energy power data query request, determining the target preset feature identification information consistent with the feature identification; and displaying the first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identification information to the user.
[0084] Exemplarily, a first preset format file is generated from the first keyword extracted from each text, thereby converting each text into a first preset format file with a unified format, which can be convenient for post-processing, searching, and display. Similarly, a second preset format file is generated from the second keyword extracted from each image, thereby converting each image into a second preset format file with a unified format, which can be convenient for post-processing, searching, and display.
[0085] In this embodiment, after obtaining the fused feature vector of the associated text and image, the first preset format file of the associated text and the second preset format file of the image are associated with the fused feature vector, and then the preset feature identification information is set. The preset feature identification information can be a feature identification that facilitates users to search for new energy power data, such as a feature identification containing site information or a feature identification containing business information.
[0086] When a user needs to search for new energy power data related to a certain site or a certain business, he or she can input a new energy power data query request containing a feature identifier through the user terminal, and the terminal device can respond to the new energy power data query request and determine the target preset feature identifier information consistent with the feature identifier in the request. After that, the first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identifier information are sent to the user terminal of the user for display.
[0087] In addition, the user can apply preset operations on the display interface of the user terminal, and the user terminal can send an original data viewing request to the terminal device. The terminal device responds to the original data viewing request and sends the text corresponding to the first preset format file and the image corresponding to the second preset format file to the user terminal for the user to view.
[0088] Further, the above-mentioned new energy power data processing method may also include: setting access rights for the first preset format file, the second preset format file and the fused feature vector associated with each group based on the preset feature identification information. Specifically, the MAC (Media Access Control Address) address of the user terminal with access rights corresponding to each preset feature identification information and the MAC address of the user terminal without access rights can be set. When the user wants to access the new energy power data related to a certain site or a certain business through the user terminal, the user terminal inputs a new energy power data query request containing a feature identification, and the terminal device responds to the new energy power data query request to determine the target preset feature identification information consistent with the feature identification. Afterwards, the terminal device determines whether the user terminal has the authority to access the new energy power data corresponding to the target preset feature identification information according to the MAC address of the user terminal. If the authority is available, the first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identification information are sent to the user terminal for display; otherwise, the first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identification information are not sent to the user terminal.
[0089] The above-mentioned new energy power data processing method can obtain new energy power data of multiple power systems in advance, then extract keywords from the new energy power data and convert them into feature vectors, and convert the new energy power data into a preset format file, and then determine the associated text and image in the new energy power data according to the distance between the feature vectors, and finally fuse the feature vectors of the associated image and text, and then process the new energy power data according to the fused feature vector and the preset format file. When it is necessary to process the new energy power data of certain sites or certain businesses, the corresponding new energy power data can be retrieved for processing, so that the text and image in the new energy power data can be associated, reducing the complexity of new energy power data management, and the above processing can be performed on the new energy power data in advance, so that the time required for processing the new energy power data can be reduced.
[0090] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0091] Corresponding to the new energy power data processing method described in the above embodiment, Figure 2 The structural block diagram of the new energy power data processing device provided in the embodiment of the present application is shown. For the convenience of explanation, only the parts related to the embodiment of the present application are shown.
[0092] See also Figure 2 An embodiment of the present application provides a new energy power data processing device, including a data acquisition module 201, a first vector conversion module 202, a second vector conversion module 203, an association module 204 and a fusion module 205.
[0093] Specifically, the data acquisition module 201 is used to acquire new energy power data, the power data includes multiple texts and multiple images, and the power data comes from multiple power system platforms.
[0094] The first vector conversion module 202 is used to extract the first keyword from each text, convert the first keyword extracted from each text into a first preset format file, and convert the first keyword of each text into a first feature vector.
[0095] The second vector conversion module 203 is used to extract the second keyword from each image, convert the second keyword extracted from each image into a second preset format file, and convert the second keyword of each image into a second feature vector.
[0096] The association module 204 is used to calculate the distance between each first feature vector and each second feature vector, and determine the associated text and image according to the distance.
[0097] The fusion module 205 is used to fuse the first feature vector and the second feature vector corresponding to the associated text and image to obtain a fused feature vector, and process the new energy power data based on the first preset format file, the second preset format file and the fused feature vector.
[0098] Optionally, the second vector conversion module 203 is specifically used to: filter and denoise the image; input the image sample containing the marking information into the image segmentation model, and train the image segmentation model; wherein the marking information includes the image category and the segmentation position of the image area; use the trained image segmentation model to segment the image after filtering and denoising to obtain at least one image area; identify text from the image area, and extract the second keyword from the identified text.
[0099] Optionally, there may be multiple image categories, and each category of images corresponds to a segmentation position of an image region, the image region contains text or pictures, and the segmentation position of the image region containing text is different from the segmentation position of the image region containing pictures.
[0100] Optionally, the image category is determined based on text in a preset area of the image; the above-mentioned use of a trained image segmentation model to segment the image that has been filtered and denoised to obtain at least one image area may include: inputting the image that has been filtered and denoised to the trained image segmentation model; the image segmentation model extracts text from a preset area of the image, determines the image category based on the text, and retrieves the segmentation position of the image area corresponding to the image category; the image segmentation model segments the image based on the segmentation position of the image area to obtain at least one image area.
[0101] Optionally, the first vector conversion module 202 can be specifically used to: segment the text to determine the first frequency and position of each word in the text; determine the first span of each word in the text according to the distance between the first position and the second position of each word in the text; wherein the first position is the position of the first appearance in the text, the second position is the position of the last appearance in the text, and the distance between the first position and the second position is the number of words between the first position and the second position; determine the target word whose first frequency is greater than a threshold, and use the first preset number of words with the largest first span in the target word as candidate keywords of the text, and the number of candidate keywords is the first preset number; determine the second frequency and second span of each candidate keyword in other texts; calculate the product of the first frequency and the first span, and the product of the second frequency and the second span, and record the candidate keyword with the largest product difference as the first keyword of the text, and the number of first keywords is the second preset number, which is less than the first preset number.
[0102] Optionally, the association module 204 may be specifically configured to: for any first feature vector, calculate the cosine similarity between the first feature vector and each second feature vector; and associate the first feature vector with the second feature vector having the smallest cosine similarity to obtain associated text and image.
[0103] Optionally, the process of the first vector conversion module 202 converting the first keyword of each text into the first feature vector may include: when there are multiple first keywords, each row of elements in the first feature vector corresponds to one first keyword, and according to the frequency of occurrence of each first keyword in the target text multiplied by the span and a preset weight, the value of the element corresponding to each first keyword is calculated to obtain the first feature vector;
[0104] The process of the second vector conversion module 203 converting the second keyword of each image into a second feature vector may include: there are multiple second keywords, each row of elements in the second feature vector corresponds to a second keyword, and the value of the element corresponding to each second keyword is calculated according to the frequency of occurrence of each second keyword in the target image multiplied by the span and the preset weight to obtain the second feature vector.
[0105] Optionally, the fusion module 205 can be specifically used to: calculate the sum of two elements at the same position of the first eigenvector and the second eigenvector, the two elements correspond to two weight values respectively, and the weight value of the element of the first eigenvector is greater than the weight value of the element of the second eigenvector; use the sum of the two elements as the value of the element at the corresponding position of the fused feature vector; calculate the sum of the two elements at each position in turn to obtain the value of the element at each position of the fused feature vector.
[0106] Optionally, the fusion module 205 can be specifically used to: associate the first preset format file, the second preset format file and the fused feature vector, and set preset feature identification information; wherein the preset feature identification information is set based on preset rules; obtain a new energy power data query request input by a user, and the new energy power data query request packet feature identification; respond to the new energy power data query request, and determine the target preset feature identification information consistent with the feature identification; and display the first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identification information to the user.
[0107] Figure 3 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 3As shown, the terminal device 300 of this embodiment includes a processor 310 and a memory 320, wherein the memory 320 stores a computer program that can be run on the processor 310, such as a new energy power data processing program. When the processor 310 executes the computer program, the steps in the above-mentioned new energy power data processing method embodiment are implemented, such as Figure 1 Alternatively, when the processor 310 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 2 The functions of the data acquisition module 201 to the fusion module 205 are shown.
[0108] The terminal device 300 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud terminal device. The terminal device may include, but is not limited to, a processor 310 and a memory 320. Those skilled in the art will appreciate that Figure 3 It is only an example of the terminal device 300 and does not constitute a limitation of the terminal device 300. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0109] The processor 320 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0110] The memory 320 may be an internal storage unit of the terminal device 300, such as a hard disk or memory of the terminal device 300. The memory 320 may also be an external storage device of the terminal device 300, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 300. Further, the memory 320 may also include both an internal storage unit of the terminal device 300 and an external storage device. The memory 320 is used to store the computer program and other programs and data required by the terminal device. The memory 320 may also be used to temporarily store data that has been output or is to be output.
[0111] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0112] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A new energy power data processing method, characterized in that: include: Acquire new energy power data, the power data including multiple texts and multiple images, and the power data comes from multiple power system platforms; Extracting a first keyword from each text, converting the first keyword extracted from each text into a first preset format file, and converting the first keyword of each text into a first feature vector; Extracting second keywords from each image, converting the second keywords extracted from each image into a second preset format file, and converting the second keywords of each image into a second feature vector; Calculating the distance between each first feature vector and each second feature vector, and determining the associated text and image according to the distance; The first feature vector and the second feature vector corresponding to the associated text and image are fused to obtain a fused feature vector, and the new energy power data is processed based on the first preset format file, the second preset format file and the fused feature vector.
2. The new energy power data processing method according to claim 1 is characterized in that: The step of extracting the second keyword from each image includes: Filter and reduce noise on the image; Inputting image samples containing label information into an image segmentation model to train the image segmentation model; wherein the label information includes image category and segmentation position of the image area; Using the trained image segmentation model to segment the image that has been filtered and denoised, to obtain at least one image region; Text is recognized from the image region, and a second keyword is extracted from the recognized text.
3. The new energy power data processing method according to claim 2 is characterized in that: There are multiple image categories, and each category of images corresponds to a segmentation position of an image region. The image region contains text or a picture, and the segmentation position of the image region containing text is different from the segmentation position of the image region containing a picture.
4. The new energy power data processing method according to claim 3 is characterized in that: The image category is determined based on text in a preset area of the image; The trained image segmentation model is used to segment the image after filtering and noise reduction to obtain at least one image region, including: Input the filtered and denoised image into the trained image segmentation model; The image segmentation model extracts text from a preset area of the image, determines the image category based on the text, and retrieves the segmentation position of the image area corresponding to the image category; The image segmentation model segments the image based on the segmentation position of the image region to obtain at least one image region.
5. The new energy power data processing method according to claim 1, characterized in that: The step of extracting the first keyword from each text includes: Segment the text to determine the first frequency and position of each word in the text; Determine the first span of each word in the text according to the distance between the first position and the second position of each word in the text; wherein the first position is the position where the word first appears in the text, the second position is the position where the word last appears in the text, and the distance between the first position and the second position is the number of words between the first position and the second position; Determine a target word whose first frequency is greater than a threshold, and use a first preset number of words with the largest first span among the target words as candidate keywords of the text, where the number of candidate keywords is a first preset number; Determine the second frequency and second span of each candidate keyword appearing in other texts; The product of the first frequency and the first span, and the product of the second frequency and the second fast reading are calculated, and the candidate keyword with the largest product difference is recorded as the first keyword of the text. The number of first keywords is the second preset number, and the second preset number is less than the first preset number.
6. The method for processing new energy power data according to any one of claims 1 to 5, characterized in that: The step of calculating the distance between each first feature vector and each second feature vector, and determining the associated text and image according to the distance, comprises: For any first eigenvector, calculate the cosine similarity between the first eigenvector and each second eigenvector; The first feature vector is associated with the second feature vector with the smallest cosine similarity to obtain associated text and image.
7. The new energy power data processing method according to claim 6, characterized in that: The converting the first keyword of each text into a first feature vector includes: when there are multiple first keywords, each row of elements in the first feature vector corresponds to one first keyword, and according to the frequency of occurrence of each first keyword in the target text multiplied by the span and a preset weight, the value of the element corresponding to each first keyword is calculated to obtain the first feature vector; The method of converting the second keyword of each image into a second feature vector includes: there are multiple second keywords, each row of elements in the second feature vector corresponds to a second keyword, and the value of the element corresponding to each second keyword is calculated according to the frequency of occurrence of each second keyword in the target image multiplied by the span and the preset weight to obtain the second feature vector.
8. The new energy power data processing method according to claim 7 is characterized in that: The step of fusing the first feature vector and the second feature vector corresponding to the associated text and image to obtain a fused feature vector includes: Calculate the sum of two elements at the same position of the first eigenvector and the second eigenvector, the two elements correspond to two weight values respectively, and the weight value of the element of the first eigenvector is greater than the weight value of the element of the second eigenvector; The sum of the two elements is used as the value of the element at the corresponding position of the fused feature vector; The sum of the two elements at each position is calculated in turn to obtain the value of the element at each position of the fused feature vector.
9. The new energy power data processing method according to claim 8, characterized in that: The processing of the new energy power data based on the first preset format file, the second preset format file and the fused feature vector includes: Associating the first preset format file, the second preset format file and the fused feature vector, and setting preset feature identification information; wherein the preset feature identification information is set based on a preset rule; Obtaining a new energy power data query request input by a user, the new energy power data query request packet characteristic identifier; In response to the new energy power data query request, determine the target preset characteristic identification information consistent with the characteristic identification; The first preset format file, the second preset format file and the fused feature vector corresponding to the target preset feature identification information are sent to a user.
10. A new energy power data processing device, characterized in that: include: A data acquisition module, used to acquire new energy power data, the power data includes multiple texts and multiple images, and the power data comes from multiple power system platforms; A first vector conversion module, used to extract first keywords from each text, convert the first keywords extracted from each text into a first preset format file, and convert the first keyword of each text into a first feature vector; A second vector conversion module, used to extract second keywords from each image, convert the second keywords extracted from each image into a second preset format file, and convert the second keywords of each image into a second feature vector; An association module, used for calculating the distance between each first feature vector and each second feature vector, and determining the associated text and image according to the distance; A fusion module is used to fuse the first feature vector and the second feature vector corresponding to the associated text and image to obtain a fused feature vector, and process the new energy power data based on the first preset format file, the second preset format file and the fused feature vector.
Citation Information
Patent Citations
Image text location method and device based on connective component and support vector machine
CN101266654A
Text subject recommending method and device
CN101315623A
Multi-feature fusion keyword extraction method
CN110188344A
Visual question and answer method for electrical equipment appearance defects, system, equipment and storage medium
CN113095331A
Unstructured electric power big data analysis method based on deep learning
CN114723583A
