Word cloud picture determination method and device of text data, equipment and storage medium

By performing semantic expansion and comparison of word segmentation results on text data, keywords are determined and filled into outline diagrams, the inefficiency problem caused by single word cloud shapes in the prior art is solved, and efficient generation of multiple shape word cloud diagrams is achieved .

CN119089897APending Publication Date: 2024-12-06BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411032936.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the existing word cloud generation scheme, the word cloud shape is single, resulting in low efficiency in generating word cloud maps of different shapes.

Method used

By performing semantic expansion of word segmentation results on the target text data, the feature vector is extracted and the keyword model library is compared for similarity, keywords are determined, and keywords are filled into multiple outline diagrams to generate multiple word cloud diagrams with different shapes.

Benefits of technology

The efficiency of generating word cloud maps with different shapes is improved, keyword omissions are avoided, and word cloud map generation is realized in multiple shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089897A_ABST
    Figure CN119089897A_ABST
Patent Text Reader

Abstract

The invention relates to a word cloud picture generation method and device of text data, computer equipment, a storage medium and a computer program product. The method comprises the steps of performing semantic expansion on each word segmentation result of target text data to obtain an expansion result after each word segmentation result is expanded; performing feature extraction on each word segmentation result and the corresponding expansion result to obtain a first feature vector; performing similarity comparison on the first feature vector and a corresponding second feature vector in a keyword model library to obtain a comparison result; determining keywords allowed to be highlighted in the target text data according to a comparison result; and filling the plurality of contour diagrams with the keywords, and highlighting the keywords in the contour diagrams to obtain a plurality of word cloud diagrams of the text data. The method can be applied to the field of big data, and can improve the efficiency of generating the word cloud atlases with different shapes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method, device, computer equipment, storage medium and computer program product for determining a word cloud graph of text data. Background Art

[0002] As society becomes more and more information-based, information technology and the Internet industry develop rapidly, "word cloud" has become one of the important applications of major social media, and more and more social media display vocabulary through word cloud. Word cloud is to form a "keyword cloud layer" or "keyword rendering" to visually highlight the "keywords" that appear frequently in online texts or can express the main idea of ​​the text, thereby filtering out a large amount of text information, so that viewers can understand the main idea of ​​the text by just scanning the text.

[0003] In the existing word cloud generation scheme, the shape of the word cloud is generated according to a preset word cloud shape template, and the preset word cloud shape template is drawn manually. The template is relatively simple. When word clouds of different shapes need to be generated, it takes more time to draw the template, which will result in low efficiency in generating word cloud diagrams of different shapes. Summary of the invention

[0004] Based on this, it is necessary to provide a word cloud determination method, device, computer equipment, computer-readable storage medium and computer program product for text data that can improve the efficiency of generating word cloud diagrams of different shapes in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for generating a word cloud diagram of text data, the method comprising:

[0006] Performing semantic expansion on each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded;

[0007] Performing feature extraction on each of the word segmentation results and the corresponding expansion results to obtain a first feature vector;

[0008] Comparing the first feature vector with the corresponding second feature vector in the keyword model library for similarity to obtain a comparison result;

[0009] Determining keywords in the target text data that are allowed to be highlighted according to the comparison result;

[0010] The keywords are filled into a plurality of outline graphs, and the keywords are highlighted in the outline graphs to obtain a plurality of word cloud graphs of the text data.

[0011] In one embodiment, before semantic expansion is performed on each word segmentation result of the target text data, the process includes:

[0012] Determine text data, and perform text scanning on the text data to obtain a scanning result representing the location of each identifier in the text data;

[0013] Based on the scanning result, the identifiers in the text data are removed to obtain target text data;

[0014] The target text data is segmented to obtain multiple segmentation results of the target text data.

[0015] In one embodiment, the semantic expansion of each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded includes:

[0016] Performing semantic analysis on each of the word segmentation results to obtain the semantics represented by each of the word segmentation results;

[0017] According to the semantics represented by each of the word segmentation results, semantic expansion is performed on each of the word segmentation results to obtain expansion results corresponding to each of the word segmentation results.

[0018] In one embodiment, the process of determining the contour map includes:

[0019] Determine a plurality of target images, and obtain a pixel value of each pixel in each of the target images;

[0020] Identifying pixel points whose pixel values ​​change between adjacent pixel points in each of the target images, to obtain a plurality of initial pixel points of each of the target images;

[0021] Using a filtering operator to perform filtering processing on the initial pixel points in each of the target images to obtain a plurality of target pixel points in each of the target images;

[0022] Connecting processing is performed on the plurality of target pixel points in each of the target images to obtain a plurality of contour images.

[0023] In one embodiment, the process of determining the contour map further includes:

[0024] Determine a plurality of target images, and based on an edge recognition method, detect the position of a first edge pixel point in each of the target images to obtain an edge detection result of each of the target images;

[0025] Based on the edge detection results of each of the target images, a contour image corresponding to each of the target images is determined.

[0026] In one embodiment, the process of determining the contour map further includes:

[0027] Determine a plurality of target images, and perform binarization processing on each of the target images to obtain a plurality of binarized images;

[0028] Taking a black dot in each of the binary images as a target point, detecting pixel points adjacent to the target point to obtain a detection result of each of the target images;

[0029] Based on the detection results of each of the target images, respectively determine a plurality of second edge pixel points of each of the target images from the black dots;

[0030] Each second edge pixel point of each of the target images is connected to obtain a contour image corresponding to each of the target images.

[0031] In a second aspect, the present application provides a device for generating a word cloud diagram of text data, the device comprising:

[0032] A semantic expansion module, used for semantically expanding each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded;

[0033] A feature extraction module, used to extract features from each of the word segmentation results and the corresponding expansion results to obtain a first feature vector;

[0034] A feature comparison module, used to compare the first feature vector with the corresponding second feature vector in the keyword model library for similarity to obtain a comparison result;

[0035] A keyword determination module, used for determining keywords in the target text data that are allowed to be highlighted according to the comparison result;

[0036] The word cloud diagram generating module is used to fill the keywords into a plurality of outline diagrams and highlight the keywords in the outline diagrams to obtain a plurality of word cloud diagrams of the text data.

[0037] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0038] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0039] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0040] The above-mentioned word cloud map generation method, device, computer equipment, storage medium and computer program product for text data, by semantically expanding the word segmentation results of the target text data, can use the first feature vector of the word segmentation result and the first feature vector of the extended result with the same meaning as the word segmentation result to perform similarity comparison with the second feature vector in the keyword model library to avoid keyword omission; by combining the obtained keywords and multiple contour maps representing the outline of the picture, multiple word cloud maps with different shapes can be obtained at the same time, thereby improving the efficiency of generating word cloud maps of different shapes. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A diagram of an application environment of a method for generating a word cloud graph of text data in one embodiment;

[0042] Figure 2 A schematic diagram of a flow chart of a method for generating a word cloud diagram of text data in one embodiment;

[0043] Figure 3 A schematic diagram of a flow chart of a method for generating a word cloud diagram of text data in another embodiment;

[0044] Figure 4 A structural block diagram of a device for generating a word cloud diagram of text data in one embodiment;

[0045] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] The word cloud diagram generation method of text data provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 performs semantic expansion according to the meaning of each word segmentation result of the target text data, and obtains the expansion result after each word segmentation result is expanded. The server 104 extracts the features of each word segmentation result and the corresponding expansion result, and obtains the first feature vector of each word segmentation result and each expansion result. The server 104 compares the extracted first feature vector with the second feature vector in the keyword model library for similarity to obtain a comparison result. According to the comparison result, the server 104 determines the word segmentation results with relatively large similarity in the target text data as keywords that are allowed to be highlighted. The server 104 fills the keywords into multiple outline graphs, highlights the keywords in the outline graphs, and obtains multiple word cloud graphs of the target text data. Among them, the terminal 102 can be; but not limited to various personal computers, laptops, tablet computers, Internet of Things devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0048] In one embodiment, Figure 2 As shown, a method for generating a word cloud diagram of text data is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0049] Step 202 , semantic expansion is performed on each word segmentation result of the target text data to obtain an expanded result of each word segmentation result.

[0050] Among them, semantic expansion can be performed by expanding synonyms according to the interpretation of the word segmentation result. For example, if the interpretation of the word segmentation result is to increase, it can be expanded to expansion results such as add, increase, fill, and fill. Semantic expansion can also be performed by expanding synonyms according to the meaning of the word segmentation result. For example, if the meaning of the word segmentation result is "I folded the quilt", it can be expanded to "The quilt was folded by me".

[0051] Optionally, the server performs synonym expansion according to the respective interpretations of each word segmentation result of the target text data to obtain an expansion result after each word segmentation result is expanded.

[0052] Optionally, the server performs synonym expansion according to the meaning of each word segmentation result of the target text data to obtain an expansion result after each word segmentation result is expanded.

[0053] Step 204: extract features from each word segmentation result and the corresponding expansion result to obtain a first feature vector.

[0054] Optionally, the server performs feature extraction on each word segmentation result and the corresponding expansion result to obtain a first feature vector of each word segmentation result and the corresponding expansion result.

[0055] Step 206: perform a similarity comparison between the first feature vector and the corresponding second feature vector in the keyword model library to obtain a comparison result.

[0056] The similarity comparison is based on the distance between the first eigenvector and the second eigenvector. The distance mainly includes Hamming distance, Euclidean distance, etc.

[0057] Optionally, the server uses the distance between the first feature vectors of the word segmentation result and the corresponding expansion result and the corresponding second feature vectors in the keyword model library to perform a similarity comparison to obtain a comparison result indicating whether the first feature vector is similar to the second feature vector.

[0058] Step 208: Determine the keywords in the target text data that are allowed to be highlighted according to the comparison result.

[0059] Among them, the keyword is the word segmentation result corresponding to the first feature vector when the comparison result representation has a greater similarity with the second feature vector. For example, if the first feature vector of the word segmentation result A is similar to the second feature vector X in the keyword model library, the word segmentation result A is a keyword that is allowed to be highlighted in the target text data. For another example, if the first feature vector of the extended result of the word segmentation result A is similar to the second feature vector X in the keyword model library, the word segmentation result A is also a keyword that is allowed to be highlighted in the target text data.

[0060] Optionally, the server determines keywords that are allowed to be highlighted from the target text data according to a similarity comparison result between the first feature vector of each word segmentation result and the second feature vector of the keyword model library.

[0061] Optionally, the server determines keywords that are allowed to be highlighted from the target text data according to a similarity comparison result between a first feature vector of an expansion result of each word segmentation result and a second feature vector of a keyword model library.

[0062] Step 210 , fill the keywords into a plurality of outline graphs, and highlight the keywords in the outline graphs to obtain a plurality of word cloud graphs of the target text data.

[0063] Among them, the outline image is a picture that represents the outer contour of an object. For example, the outline image corresponding to a penguin is a picture in the shape of a penguin. Filling means covering the entire outline image with text. The shape of each outline image is different. By filling keywords into outline images of different shapes, you can get word cloud images of different shapes.

[0064] Optionally, the server fills the keywords to be highlighted into a plurality of contour diagrams of different shapes respectively, and highlights them, thereby obtaining a plurality of word cloud diagrams of different shapes of the target text data.

[0065] In the above-mentioned word cloud generation method for text data, by semantically expanding the word segmentation results of the target text data, the first feature vector of the word segmentation result and the first feature vector of the extended result with the same meaning as the word segmentation result can be used to perform similarity comparison with the second feature vector in the keyword model library to avoid keyword omission; by combining the obtained keywords and multiple contour maps representing the contours of the picture, multiple word cloud maps with different shapes can be obtained at the same time, thereby improving the efficiency of generating word cloud maps of different shapes.

[0066] In one embodiment, it is characterized in that before semantic expansion is performed on each word segmentation result of the target text data, the following steps are included:

[0067] The text data is determined, and a text scan is performed on the text data to obtain a scan result representing the location of each identifier in the text data.

[0068] Based on the scanning results, the identifiers in the text data are removed to obtain the target text data.

[0069] The target text data is segmented to obtain multiple segmentation results of the target text data.

[0070] Among them, identifiers refer to symbols that do not need to be retained, such as line breaks and tabs in text data. By first determining the position of each identifier and then removing the identifier, it can be ensured that every identifier scanned is removed, avoiding omitted identifiers remaining in the text and interfering with the word segmentation of the text. The tools used for word segmentation mainly include Chinese lexical analysis system, Chinese lexical analysis program, language technology platform, etc.

[0071] Optionally, after determining the text data, the server performs a text scan on each word and character in the text data, thereby obtaining a scan result representing the position of each identifier in the text data. The server removes each identifier in turn according to the position of each identifier, obtains the target text data, and uses a word segmentation tool to segment the target text data. A plurality of word segmentation results are obtained after the target text data is segmented.

[0072] In this embodiment, by first determining the position of each identifier and then removing the identifier, it can be ensured that every scanned identifier is removed, avoiding omitted identifiers from remaining in the text and interfering with the word segmentation of the text, thereby improving the accuracy of word segmentation.

[0073] In one embodiment, semantic expansion is performed on each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded, including:

[0074] Perform semantic analysis on each word segmentation result to obtain the semantics represented by each word segmentation result.

[0075] According to the semantics represented by each word segmentation result, each word segmentation result is semantically expanded to obtain an expansion result corresponding to each word segmentation result.

[0076] Optionally, the server performs semantic analysis on each segmentation result after the target text data is segmented, thereby obtaining the meaning of each segmentation result. The server performs semantic expansion according to the meaning of each segmentation result, thereby obtaining an expansion result that is closer to the semantics of each segmentation result.

[0077] In this embodiment, by expanding each word segmentation result, an expanded result that is closer in semantics to each word segmentation result is obtained, thereby avoiding omissions in keyword screening due to different text when performing similarity comparison with feature vectors in the keyword model library, so as to achieve highlighting of each keyword.

[0078] In one embodiment, Figure 3 As shown, the process of determining the contour map includes:

[0079] Step 302: determine a plurality of target images, and obtain the pixel value of each pixel in each target image.

[0080] Among them, the outer contour of each target image is different.

[0081] Step 304 , identifying the pixel points whose pixel values ​​have changed between adjacent pixel points in each target image, and obtaining a plurality of initial pixel points of each target image.

[0082] The pixel value change refers to the obvious difference in color or brightness between two adjacent pixels. For example, if the pixel value of A of two adjacent pixels is 600 and the pixel value of B of two adjacent pixels is 24, it means that the pixel value has changed significantly, and these two pixels are initial pixels.

[0083] Optionally, the server identifies pixel points in each target image where the color or brightness between two adjacent pixel points is significantly different, and obtains a plurality of initial pixel points of each target image.

[0084] Step 306: Use a filtering operator to perform filtering processing on the initial pixel points in each target image to obtain multiple target pixel points in each target image.

[0085] Among them, the filtering operators mainly include Canny operator and Marr-Hildreth operator. The filtering mainly filters the non-edge pixels in the initial pixels. By filtering the initial pixels, the interference of non-edge pixels in the image can be eliminated, so that the target pixels obtained in the end are all edge pixels of the target image, thereby obtaining an accurate contour map.

[0086] Step 308 , performing connection processing on multiple target pixel points in each target image respectively to obtain multiple contour images.

[0087] Optionally, the server connects the target pixel points identified in each target image using a curve, thereby obtaining a contour map corresponding to each target image.

[0088] In this embodiment, by filtering the initial pixels, interference from non-edge pixels can be eliminated, so that the target pixels finally obtained are all edge pixels of the target image, thereby obtaining an accurate contour map.

[0089] In one embodiment, the process of determining the contour map further includes:

[0090] A plurality of target images are determined, and based on an edge recognition method, a position of a first edge pixel point in each target image is detected to obtain an edge detection result of each target image.

[0091] Based on the edge detection results of each target image, a contour image corresponding to each target image is determined.

[0092] Optionally, after determining a plurality of target images with outer contours of different shapes, the server detects the position of edge pixels in each target image by edge recognition, thereby obtaining the position of each edge pixel in the target image. The server connects the edge pixels in each target image using a curve according to the position of each edge pixel in the edge detection result, thereby obtaining a contour map of each target image.

[0093] In this embodiment, the first edge pixel points in each target image are detected by edge recognition, thereby eliminating interference from non-edge pixel points, so that the pixels finally obtained are all edge pixel points of the target image, thereby obtaining an accurate contour map.

[0094] In one embodiment, the process of determining the contour map further includes:

[0095] A plurality of target images are determined, and each target image is binarized to obtain a plurality of binarized images.

[0096] The black dots in each binary image are taken as target points, and the pixel points adjacent to the target points are detected to obtain the detection results of each target image.

[0097] Based on the detection result of each target image, a plurality of second edge pixel points of each target image are determined from the black dots.

[0098] Each second edge pixel point of each target image is connected to obtain a contour image corresponding to each target image.

[0099] Among them, binarization is the process of segmenting the target image according to the grayscale value of each pixel, that is, setting the grayscale value of the pixel on the image to 0 or 255, so that the entire image presents an obvious black and white effect. Each pixel in the binary image has only two values: either pure black or pure white. By binarizing the image, the shape and outline of the object can be better analyzed.

[0100] In the detection result, if the adjacent pixels of a black dot are all black dots, it means that the black dot is not a second edge pixel. If there is a white dot among the adjacent pixels of the black dot, it means that the black dot is a second edge pixel.

[0101] Optionally, after determining multiple target images, the server sets the grayscale value of the pixel points on each target image to 0 or 255 to present an obvious black and white effect, thereby obtaining multiple binary images. The server detects each black point in each binary image as a target point to obtain a pixel value detection result representing the adjacent pixel points of each target point. Based on the detection result, the server uses the black point with a white point in the adjacent pixel points of the target point as the second edge pixel point, and uses a curve to connect the second edge pixel points in each target image to obtain a contour map corresponding to each target image.

[0102] In this embodiment, the second edge pixel points in each target image are obtained by using a binarization method, so that the interference of non-edge pixel points can be eliminated, so that the pixels finally obtained are all edge pixel points of the target image, thereby obtaining an accurate contour map.

[0103] The present application also provides an application scenario, which applies the above-mentioned word cloud diagram generation method for text data. Specifically, the application of the word cloud diagram generation method for text data in the application scenario is as follows: determine the text data, perform text scanning on each character and identifier in the text data, so as to obtain a scanning result representing the position of each identifier in the text data. According to the position of each identifier, each identifier is removed in turn to obtain the target text data. Use a word segmentation tool to segment the target text data. Obtain multiple word segmentation results after the target text data is segmented. Perform semantic analysis on each word segmentation result after the target text data is segmented, so as to obtain the meaning of each word segmentation result. Perform semantic expansion according to the meaning of each word segmentation result, so as to obtain an expansion result that is closer to the meaning of each word segmentation result. According to the comparison result between the first feature vector of each word segmentation result and the second feature vector of the keyword model library, determine the keywords that are allowed to be highlighted from the target text data. According to the comparison result between the first feature vector of the expansion result of each word segmentation result and the second feature vector of the keyword model library, determine the keywords that are allowed to be highlighted from the target text data. Determine multiple target images with contours of different shapes, and use edge recognition to detect the position of edge pixels in each target image, thereby obtaining the position of each edge pixel in the target image. According to the position of each edge pixel in the edge detection result, connect the edge pixels in each target image to obtain the contour map corresponding to each target image. Fill the keywords that need to be highlighted into multiple contour maps of different shapes, and highlight them, thereby obtaining multiple word cloud maps of different shapes.

[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0105] Based on the same inventive concept, the embodiment of the present application also provides a device for generating a word cloud diagram of text data for implementing the method for generating a word cloud diagram of text data involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for generating a word cloud diagram of text data provided below can refer to the limitations of the method for generating a word cloud diagram of text data above, and will not be repeated here.

[0106] In one embodiment, Figure 4 As shown, a word cloud diagram generating device for text data is provided, comprising:

[0107] The semantic expansion module 402 is used to perform semantic expansion on each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded.

[0108] The feature extraction module 404 is used to extract features from each word segmentation result and the corresponding expansion result to obtain a first feature vector.

[0109] The feature comparison module 406 is used to perform a similarity comparison between the first feature vector and the corresponding second feature vector in the keyword model library to obtain a comparison result.

[0110] The keyword determination module 408 is used to determine the keywords that are allowed to be highlighted in the target text data according to the comparison result.

[0111] The word cloud diagram generating module 410 is used to fill keywords into multiple outline diagrams and highlight the keywords in the outline diagrams to obtain multiple word cloud diagrams of the text data.

[0112] In one embodiment, the semantic expansion module includes:

[0113] The text scanning unit is used to determine the text data and perform text scanning on the text data to obtain a scanning result representing the location of each identifier in the text data.

[0114] The noise processing unit is used to remove identifiers in the text data based on the scanning result to obtain target text data.

[0115] The word segmentation unit is used to perform word segmentation processing on the target text data to obtain multiple word segmentation results of the target text data.

[0116] In one embodiment, the semantic expansion module includes:

[0117] The semantic analysis unit is used to perform semantic analysis on each word segmentation result to obtain the semantics represented by each word segmentation result.

[0118] The semantic expansion unit is used to perform semantic expansion on each word segmentation result according to the semantics represented by each word segmentation result to obtain an expansion result corresponding to each word segmentation result.

[0119] In one embodiment, the word cloud graph generation module includes:

[0120] The pixel value determination unit is used to determine a plurality of target images and obtain the pixel value of each pixel point in each target image.

[0121] The initial pixel point determination unit is used to identify the pixel points whose pixel values ​​have changed between adjacent pixel points in each target image, and obtain a plurality of initial pixel points of each target image.

[0122] The target pixel point determination unit is used to use a filtering operator to perform filtering processing on the initial pixel points in each target image to obtain multiple target pixel points in each target image.

[0123] The first contour determination unit is used to perform connection processing on multiple target pixel points in each target image respectively to obtain multiple contour images.

[0124] In one embodiment, the word cloud graph generation module further includes:

[0125] The edge recognition unit is used to determine multiple target images, and based on the edge recognition method, detect the position of the first edge pixel point in each target image to obtain the edge detection result of each target image.

[0126] The first contour determining unit is used to determine a contour map corresponding to each target image based on the edge detection result of each target image.

[0127] In one embodiment, the word cloud graph generation module further includes:

[0128] The binarization processing unit is used to determine multiple target pictures and perform binarization processing on each target picture to obtain multiple binarized pictures.

[0129] The pixel point detection unit is used to take the black point in each binary image as the target point, detect the pixel points adjacent to the target point, and obtain the detection result of each target image.

[0130] The edge pixel point determination unit is used to determine a plurality of second edge pixel points of each target image from the black dots based on the detection result of each target image.

[0131] The second contour determining unit is used to connect each second edge pixel point of each target image to obtain a contour image corresponding to each target image.

[0132] Each module in the above-mentioned word cloud diagram generating device for text data can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0133] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store word segmentation results, expansion results, a first feature vector, a second feature vector, comparison results, keywords, word cloud diagrams and outline map data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a word cloud diagram generation method for text data is implemented.

[0134] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0135] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0136] Perform semantic expansion on each word segmentation result of the target text data to obtain the expanded results of each word segmentation result; perform feature extraction on each word segmentation result and the corresponding expanded result to obtain a first feature vector; perform similarity comparison between the first feature vector and the corresponding second feature vector in the keyword model library to obtain a comparison result; determine the keywords that are allowed to be highlighted in the target text data according to the comparison result; fill the keywords into multiple outline graphs, and highlight the keywords in the outline graphs to obtain multiple word cloud graphs of the text data.

[0137] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0138] Determine text data and perform text scanning on the text data to obtain scanning results representing the locations of various identifiers in the text data; based on the scanning results, remove the identifiers in the text data to obtain target text data; perform word segmentation on the target text data to obtain multiple word segmentation results of the target text data.

[0139] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0140] Perform semantic analysis on each word segmentation result to obtain the semantics represented by each word segmentation result; perform semantic expansion on each word segmentation result according to the semantics represented by each word segmentation result to obtain the expansion results corresponding to each word segmentation result.

[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0142] Determine multiple target images and obtain the pixel value of each pixel in each target image; identify the pixel points whose pixel values ​​between adjacent pixel points in each target image change to obtain multiple initial pixel points of each target image; use a filtering operator to filter the initial pixel points in each target image to obtain multiple target pixel points of each target image; connect the multiple target pixel points in each target image to obtain multiple contour maps.

[0143] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0144] Determine multiple target images, and based on the edge recognition method, detect the position of the first edge pixel point in each target image to obtain the edge detection result of each target image; based on the edge detection result of each target image, determine the contour map corresponding to each target image.

[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0146] Determine a plurality of target images, and perform binarization processing on each target image to obtain a plurality of binary images; take a black dot in each binary image as a target point, detect pixel points adjacent to the target point, and obtain a detection result of each target image; based on the detection result of each target image, determine a plurality of second edge pixel points of each target image from the black dot; connect each second edge pixel point of each target image to obtain a contour map corresponding to each target image.

[0147] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0148] Perform semantic expansion on each word segmentation result of the target text data to obtain the expanded results of each word segmentation result; perform feature extraction on each word segmentation result and the corresponding expanded result to obtain a first feature vector; perform similarity comparison between the first feature vector and the corresponding second feature vector in the keyword model library to obtain a comparison result; determine the keywords that are allowed to be highlighted in the target text data according to the comparison result; fill the keywords into multiple outline graphs, and highlight the keywords in the outline graphs to obtain multiple word cloud graphs of the text data.

[0149] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0150] Determine text data and perform text scanning on the text data to obtain scanning results representing the locations of various identifiers in the text data; based on the scanning results, remove the identifiers in the text data to obtain target text data; perform word segmentation on the target text data to obtain multiple word segmentation results of the target text data.

[0151] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0152] Perform semantic analysis on each word segmentation result to obtain the semantics represented by each word segmentation result; perform semantic expansion on each word segmentation result according to the semantics represented by each word segmentation result to obtain the expansion results corresponding to each word segmentation result.

[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0154] Determine multiple target images and obtain the pixel value of each pixel in each target image; identify the pixel points whose pixel values ​​between adjacent pixel points in each target image change to obtain multiple initial pixel points of each target image; use a filtering operator to filter the initial pixel points in each target image to obtain multiple target pixel points of each target image; connect the multiple target pixel points in each target image to obtain multiple contour maps.

[0155] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0156] Determine multiple target images, and based on the edge recognition method, detect the position of the first edge pixel point in each target image to obtain the edge detection result of each target image; based on the edge detection result of each target image, determine the contour map corresponding to each target image.

[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0158] Determine a plurality of target images, and perform binarization processing on each target image to obtain a plurality of binary images; take a black dot in each binary image as a target point, detect pixel points adjacent to the target point, and obtain a detection result of each target image; based on the detection result of each target image, determine a plurality of second edge pixel points of each target image from the black dot; connect each second edge pixel point of each target image to obtain a contour map corresponding to each target image.

[0159] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0160] Perform semantic expansion on each word segmentation result of the target text data to obtain the expanded results of each word segmentation result; perform feature extraction on each word segmentation result and the corresponding expanded result to obtain a first feature vector; perform similarity comparison between the first feature vector and the corresponding second feature vector in the keyword model library to obtain a comparison result; determine the keywords that are allowed to be highlighted in the target text data according to the comparison result; fill the keywords into multiple outline graphs, and highlight the keywords in the outline graphs to obtain multiple word cloud graphs of the text data.

[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0162] Determine text data and perform text scanning on the text data to obtain scanning results representing the locations of various identifiers in the text data; based on the scanning results, remove the identifiers in the text data to obtain target text data; perform word segmentation on the target text data to obtain multiple word segmentation results of the target text data.

[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0164] Perform semantic analysis on each word segmentation result to obtain the semantics represented by each word segmentation result; perform semantic expansion on each word segmentation result according to the semantics represented by each word segmentation result to obtain the expansion results corresponding to each word segmentation result.

[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0166] Determine multiple target images and obtain the pixel value of each pixel in each target image; identify the pixel points whose pixel values ​​between adjacent pixel points in each target image change to obtain multiple initial pixel points of each target image; use a filtering operator to filter the initial pixel points in each target image to obtain multiple target pixel points of each target image; connect the multiple target pixel points in each target image to obtain multiple contour maps.

[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0168] Determine multiple target images, and based on the edge recognition method, detect the position of the first edge pixel point in each target image to obtain the edge detection result of each target image; based on the edge detection result of each target image, determine the contour map corresponding to each target image.

[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0170] Determine a plurality of target images, and perform binarization processing on each target image to obtain a plurality of binary images; take a black dot in each binary image as a target point, detect pixel points adjacent to the target point, and obtain a detection result of each target image; based on the detection result of each target image, determine a plurality of second edge pixel points of each target image from the black dot; connect each second edge pixel point of each target image to obtain a contour map corresponding to each target image.

[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0172] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0174] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating a word cloud graph of text data, characterized in that: The method comprises: Performing semantic expansion on each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded; Performing feature extraction on each of the word segmentation results and the corresponding expansion results to obtain a first feature vector; Comparing the first feature vector with the corresponding second feature vector in the keyword model library for similarity to obtain a comparison result; Determining keywords in the target text data that are allowed to be highlighted according to the comparison result; The keywords are filled into a plurality of outline graphs, and the keywords are highlighted in the outline graphs to obtain a plurality of word cloud graphs of the text data.

2. The method according to claim 1, characterized in that Before semantic expansion is performed on each word segmentation result of the target text data, the following steps are included: Determine text data, and perform text scanning on the text data to obtain a scanning result representing the location of each identifier in the text data; Based on the scanning result, the identifiers in the text data are removed to obtain target text data; The target text data is segmented to obtain multiple segmentation results of the target text data.

3. The method according to claim 1, characterized in that The semantic expansion of each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded includes: Performing semantic analysis on each of the word segmentation results to obtain the semantics represented by each of the word segmentation results; According to the semantics represented by each of the word segmentation results, semantic expansion is performed on each of the word segmentation results to obtain expansion results corresponding to each of the word segmentation results.

4. The method according to claim 1, characterized in that: The process of determining the contour map includes: Determine a plurality of target images, and obtain a pixel value of each pixel in each of the target images; Identifying pixel points whose pixel values ​​change between adjacent pixel points in each of the target images, to obtain a plurality of initial pixel points of each of the target images; Using a filtering operator to perform filtering processing on the initial pixel points in each of the target images to obtain a plurality of target pixel points in each of the target images; Connecting processing is performed on the plurality of target pixel points in each of the target images to obtain a plurality of contour images.

5. The method according to claim 1, characterized in that The process of determining the contour map also includes: Determine a plurality of target images, and based on an edge recognition method, detect the position of a first edge pixel point in each of the target images to obtain an edge detection result of each of the target images; Based on the edge detection results of each of the target images, a contour image corresponding to each of the target images is determined.

6. The method according to claim 1, characterized in that The process of determining the contour map also includes: Determine a plurality of target images, and perform binarization processing on each of the target images to obtain a plurality of binarized images; Taking a black dot in each of the binary images as a target point, detecting pixel points adjacent to the target point to obtain a detection result of each of the target images; Based on the detection results of each of the target images, respectively determine a plurality of second edge pixel points of each of the target images from the black dots; Each second edge pixel point of each of the target images is connected to obtain a contour image corresponding to each of the target images.

7. A word cloud diagram generating device for text data, characterized in that: The device comprises: A semantic expansion module, used for semantically expanding each word segmentation result of the target text data to obtain an expanded result after each word segmentation result is expanded; A feature extraction module, used to extract features from each of the word segmentation results and the corresponding expansion results to obtain a first feature vector; A feature comparison module, used to compare the first feature vector with the corresponding second feature vector in the keyword model library for similarity to obtain a comparison result; A keyword determination module, used for determining keywords in the target text data that are allowed to be highlighted according to the comparison result; The word cloud diagram generating module is used to fill the keywords into a plurality of outline diagrams and highlight the keywords in the outline diagrams to obtain a plurality of word cloud diagrams of the text data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.