Word cloud picture generation method and device, equipment, medium and program product

By using the map data and publishing address of the preset area in the word cloud map generation method, the location of the keywords in the display area is determined and the target word cloud map is generated, which solves the problem that word cloud map cannot analyze word frequency information in the prior art, and improves the problem of The convenience and utilization of analysis.

CN119106175APending Publication Date: 2024-12-10BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411170543.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing word cloud map can only analyze the word frequency of keywords, and cannot analyze information other than word frequency, resulting in low utilization and cannot meet the analysis needs.

Method used

By determining the boundaries of the display area based on the map data of the preset area, combining the publishing address and word frequency, determining the location of the keywords in the display area, and generating a target word cloud map to achieve intuitive and convenient display and analysis of keywords.

Benefits of technology

It improves the utilization rate of word cloud maps, can view keywords and their location distribution at the same time, enhances the convenience and intuitiveness of information analysis, and partially solves the problem that the existing technology cannot analyze information other than word frequency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106175A_ABST
    Figure CN119106175A_ABST
Patent Text Reader

Abstract

The invention provides a word cloud picture generation method and device, equipment, a medium and a program product, and can be applied to the technical field of computers and big data. The method comprises the steps that the boundary of a display area is determined based on map data of a preset area, the display area is used for displaying N keywords appearing in a network, and N is a positive integer larger than or equal to 2; under the condition of determining that the release address of a first target keyword in the N keywords is located in the preset area, determining a first target position of the first target keyword in the display area based on the boundary, the word frequency of the first target keyword and the release address; and generating a target word cloud picture based on the first target keyword, the first target position and the boundary of the display area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of computer and big data technology, and in particular to a word cloud graph generation method, device, equipment, medium and program product. Background Art

[0002] With the advent of the information age, information is exploding, and it is crucial to analyze effective information from a large amount of information. The resulting word cloud can visually highlight the keywords that appear more frequently in network texts by forming a keyword cloud layer or keyword rendering.

[0003] In the process of implementing the present disclosure, it is found that the existing word cloud diagram can only analyze the word frequency of keywords, and cannot analyze information other than the word frequency, and the utilization rate of the word cloud diagram is low. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a word cloud graph generation method, apparatus, device, medium and program product.

[0005] According to a first aspect of the present disclosure, a word cloud image generating method is provided, comprising: determining a boundary of a display area based on map data of a preset area, wherein the display area is used to display N keywords appearing in a network text, and N is a positive integer greater than or equal to 2; in a case where it is determined that a publishing address of a first target keyword among the N keywords is located in a preset area, determining that the first target keyword is located in a first target position within the display area based on the boundary, the word frequency of the first target keyword, and the publishing address; and generating a target word cloud image based on the first target keyword, the first target position, and the boundary of the display area.

[0006] According to an embodiment of the present disclosure, when it is determined that the publishing addresses of the first target keyword among N keywords are all located in a preset area, the first target keyword is determined to be located at the first target position within the display area based on the boundary, the word frequency of the first target keyword and the publishing address, including: when it is determined that the publishing address of the first target keyword among N keywords is located in the preset area, the size of the rectangular frame surrounding the first target keyword is determined according to the word frequency of the first target keyword and the number of words of the first target keyword; based on the publishing address, the initial position of the center of the rectangular frame within the display area is determined; and based on the initial position and the positional relationship between the vertices of the rectangular frame and the boundary, the first target keyword is determined to be located at the first target position within the display area.

[0007] According to an embodiment of the present disclosure, based on the initial position and the positional relationship between the vertices and the boundary of the rectangular box, determining that the first target keyword is located at the first target position within the display area includes: in a case where it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, determining a moving distance for the rectangular box based on the distance between the target vertex and the boundary, wherein the moving distance is used to characterize the distance that causes the target vertex to be located on or within the boundary after the rectangular box is moved; and updating the initial position based on the moving distance and the rectangular box to obtain the first target position where the first target keyword is located within the display area.

[0008] According to an embodiment of the present disclosure, when it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, a moving distance for the rectangular box is determined based on the distance between the target vertex and the boundary, including: when it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, based on the intersection rule, M intersections between the rectangular box and the boundary and the coordinates corresponding to each of the M intersections, wherein M is an integer greater than or equal to 2; according to the coordinates corresponding to each of the M intersections and the coordinates of the target vertex, the distance between the target vertex and each intersection is determined; and the largest distance between the vertex and each intersection is determined as the moving distance for the rectangular box.

[0009] According to an embodiment of the present disclosure, a target word cloud diagram is generated based on a first target keyword, a first target position, and a boundary of a display area, including: using a mapping system to generate a boundary layer according to the boundary of the display area; generating a keyword layer located within the display area based on the first target position and the first target keyword; fusing the boundary layer with the keyword layer to obtain a fused layer; and configuring a click event on the first target keyword of the fused layer to obtain a target word cloud diagram, wherein the click event is used to display attribute information of the first target keyword.

[0010] According to an embodiment of the present disclosure, the word cloud image generation method also includes: when it is determined that the keywords do not include hot words, based on the generator, an initial word cloud image is generated according to the boundary of the display area and the first target keyword; when it is determined that there is no boundary buffer zone in the initial word cloud image, a plane where the boundary is located is generated according to the boundary of the display area, wherein the boundary buffer zone is used to characterize that the boundary of the display area is different from the boundary of the initial word cloud image; and the initial word cloud image is filled in the plane to obtain the target word cloud image.

[0011] According to an embodiment of the present disclosure, the word cloud image generation method also includes: when it is determined that the keyword does not include a hot word, based on the generator, an initial word cloud image is generated according to the boundary of the display area and the first target keyword; when it is determined that the initial word cloud image has a boundary buffer zone, based on the boundary of the display area, the initial word cloud image is masked to obtain a word cloud image with only the boundary range of the display area; the center position of the word cloud image with only the boundary range of the display area is configured as the center position of the display area, and the size of the word cloud image with only the boundary range of the display area is configured as the size of the display area, to obtain a target word cloud image.

[0012] According to an embodiment of the present disclosure, the word cloud diagram generation method also includes: when it is determined that there is a second target keyword among N keywords whose publishing address is unknown and the second target keyword meets a preset condition, based on the word frequency of the second target keyword, determining that the second target keyword is located at a second target position within the display area; and generating a target word cloud diagram based on the second target keyword, the second target position and the display area.

[0013] According to an embodiment of the present disclosure, the second target keywords include P, P≤N, and P is a positive integer; when it is determined that the publication address of the second target keyword is unknown among the N keywords, and the second target keyword meets a preset condition, based on the word frequency of the second target keyword, determining that the second target keyword is located at the second target position in the display area, including: when it is determined that the publication addresses of P second target keywords are unknown among the N keywords, and the P second target keywords meet the preset condition, based on the word frequency of each of the P second target keywords, the P second target keywords are divided into a preset number of copies; the second target keywords corresponding to each copy in the preset number of copies are reorganized between copies to obtain the reorganized second target keywords; based on the reorganized number of copies of the reorganized second target keywords, the display area is divided into grids, and each reorganized second target keyword is randomly assigned to a corresponding grid; and based on the positions of the P second target keywords in the grid, determining that the P second target keywords are located at P second target positions in the display area, wherein the second target keywords and the second target positions have a one-to-one correspondence.

[0014] According to an embodiment of the present disclosure, based on the positions of the P second target keywords in the grid, determining that the P second target keywords are located at the P second target positions in the display area includes: determining whether there are overlapping target keywords among the P second target keywords based on the positions of the P second target keywords in the grid; in the case of determining that there are overlapping target keywords among the P second target keywords, performing avoidance processing on the overlapping target keywords so that the overlapping target keywords do not overlap; and determining that the P second target keywords are located at the P second target positions in the display area based on the positions of the P second target keywords in the grid after the avoidance processing.

[0015] According to an embodiment of the present disclosure, determining the boundary of the display area based on map data of the preset area includes: determining the boundary of the preset area according to the map data; and determining the boundary of the preset area as the boundary of the display area.

[0016] A second aspect of the present disclosure provides a word cloud image generating device, including: a first determination module, used to determine the boundary of a display area based on map data of a preset area, wherein the display area is used to display N keywords appearing in a network text, and N is a positive integer greater than or equal to 2; a second determination module, used to determine that the first target keyword is located at a first target position within the display area based on the boundary, the word frequency of the first target keyword and the publishing address when it is determined that the publishing address of the first target keyword among the N keywords is located within the preset area; and a first generation module, used to generate a target word cloud image based on the first target keyword, the first target position and the boundary of the display area.

[0017] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the word cloud diagram generation method.

[0018] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instruction stored thereon, which implements the steps of the above-mentioned word cloud diagram generation method when the above-mentioned computer program or instruction is executed by a processor.

[0019] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above-mentioned word cloud diagram generation method when the above-mentioned computer program or instructions are executed by a processor.

[0020] According to an embodiment of the present disclosure, the boundary of the display area for displaying keywords appearing in the network text is determined by the map data of the preset area, and the first target position of the first target keyword published in the preset area in the display area is determined in combination with the publishing address and the word frequency. Since the display position of the first target keyword in the display area, that is, the first target position has actual map position information, the target word cloud map generated based on the first target position can simultaneously view the first target keyword and the position distribution of the first target keyword, which is intuitive, convenient, easy to analyze, and improves the utilization rate of the word cloud map. It can at least partially solve the problem that the existing word cloud map cannot analyze information other than word frequency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0022] Figure 1 A diagram schematically shows an application scenario of a word cloud graph generation method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;

[0023] Figure 2 A flowchart of a method for generating a word cloud diagram according to an embodiment of the present disclosure is schematically shown;

[0024] Figure 3 A schematic diagram schematically shows the positional relationship between the vertices and the border of a rectangular frame according to an embodiment of the present disclosure;

[0025] Figure 4 A schematic diagram of avoidance processing according to an embodiment of the present disclosure is schematically shown;

[0026] Figure 5A The following schematically shows a flow chart of generating a word cloud diagram according to an embodiment of the present disclosure;

[0027] Figure 5B A schematic diagram of a word cloud diagram according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 6 A structural block diagram of a word cloud image generating device according to an embodiment of the present disclosure is schematically shown; and

[0029] Figure 7 A block diagram of an electronic device suitable for implementing a word cloud diagram generating method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0030] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0031] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0032] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0033] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0034] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0035] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0036] In the technical solution of the embodiment of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0037] In the process of implementing the present disclosure, it is found that the existing word cloud diagram can only analyze the word frequency of keywords, and cannot analyze information other than the word frequency. The utilization rate of the word cloud diagram is low and cannot meet the analysis needs.

[0038] With the continuous expansion of map services and the increasing precision of coordinate data, visualization research based on geographic data in various scenarios has gradually become richer. Keyword analysis can also generate geographic heat maps based on geographic coordinates through word frequency statistics, and use geographic heat maps to analyze hot spots and provide data support for subsequent decision-making. However, geographic heat maps based on keyword frequency only use keyword frequency and can only view the distribution of keyword frequency.

[0039] Based on this, the embodiments of the present disclosure provide a method, device, equipment, medium and program product for generating a word cloud diagram. The method includes: determining the boundary of a display area based on map data of a preset area, wherein the display area is used to display N keywords appearing in a network text, where N is a positive integer greater than or equal to 2; in the case where it is determined that the publishing address of a first target keyword among the N keywords is located in the preset area, determining that the first target keyword is located in a first target position in the display area based on the boundary, the word frequency of the first target keyword and the publishing address; and generating a target word cloud diagram based on the first target keyword, the first target position and the boundary of the display area.

[0040] Figure 1 The application scenario diagram of the word cloud diagram generation method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0041] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0042] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0043] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0044] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0045] It should be noted that the word cloud image generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the word cloud image generation device provided in the embodiment of the present disclosure can generally be set in the server 105. The word cloud image generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the word cloud image generation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0046] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0047] The following will be based on Figure 1 The scene described by Figure 2 ~Figure 5 describes in detail the word cloud diagram generating method of the disclosed embodiment.

[0048] Figure 2 The flowchart of the word cloud diagram generating method according to the embodiment of the present disclosure is schematically shown.

[0049] like Figure 2 As shown, the word cloud diagram generating method 200 of this embodiment includes operations S210 to S230.

[0050] In operation S210, a boundary of a display area is determined based on map data of a preset area.

[0051] According to an embodiment of the present disclosure, the display area is used to display N keywords appearing in the network text, where N is a positive integer greater than or equal to 2.

[0052] According to an embodiment of the present disclosure, the preset area may be a city, a district, a county, etc., which is not specifically limited in the present disclosure. The map data of the preset area may be obtained from a geographic information system through a data acquisition interface. The map data of the preset area may be used to characterize the map coordinates of each location in the preset area. The boundary corresponding to the preset area in the map may be used as the boundary of the display area.

[0053] In operation S220, when it is determined that the publishing address of the first target keyword among the N keywords is located in the preset area, the first target keyword is determined to be located at a first target position in the display area based on the boundary, the word frequency of the first target keyword and the publishing address.

[0054] According to an embodiment of the present disclosure, a keyword may be a word that appears in a network text at a frequency higher than a frequency threshold. The keyword may include, for example, a hot word and a non-hot word. Hot words are real-time and have a high update frequency. Non-hot words are not real-time and have a low update frequency. The publishing address may be a registered address displayed when publishing a network text. The publishing address may be used to represent a specific location within a preset area.

[0055] According to an embodiment of the present disclosure, the network text associated with each keyword can be determined among N keywords. If the network text associated with the keyword displays a registered address, the keyword is determined as the first keyword. The position coordinates corresponding to the specific position can be determined within the boundary according to the specific position of the registered address. The display size of the first keyword in the display area can be determined according to the word frequency of the first keyword. The position coordinates are determined as the center coordinates of the first keyword. The center coordinates can be determined as the coordinates of the first target position. It is also possible to determine whether the first keyword overflows outside the boundary when the first keyword is displayed within the boundary based on the center coordinates and the display size. If it overflows, for example, the first keyword can be reduced to within the boundary, and the center coordinates are the coordinates of the first target position. The first keyword can also be moved to within the boundary, and the center coordinates after the move are the coordinates of the first target position. If it does not overflow, the center coordinates are the coordinates of the first target position.

[0056] In operation S230, a target word cloud diagram is generated based on the first target keyword, the first target position, and a boundary of the display area.

[0057] According to an embodiment of the present disclosure, a keyword layer for displaying the first target keyword can be determined according to the first target keyword and the first target position. A boundary layer for displaying the boundary can be determined according to the boundary of the display area. A target word cloud diagram can be generated according to the keyword layer and the boundary layer.

[0058] According to an embodiment of the present disclosure, the boundary of the display area for displaying keywords appearing in the network text is determined by the map data of the preset area, and the first target position of the first target keyword published in the preset area in the display area is determined in combination with the publishing address and the word frequency. Since the display position of the first target keyword in the display area, that is, the first target position has actual map position information, the target word cloud map generated based on the first target position can simultaneously view the first target keyword and the position distribution of the first target keyword, which is intuitive, convenient, easy to analyze, and improves the utilization rate of the word cloud map. It can at least partially solve the problem that the existing word cloud map cannot analyze information other than word frequency.

[0059] According to an embodiment of the present disclosure, for example Figure 2 The operation S210 shown, determining the boundary of the display area based on the map data of the preset area, may include the operations of: determining the boundary of the preset area according to the map data, and determining the boundary of the preset area as the boundary of the display area.

[0060] According to an embodiment of the present disclosure, the geographic coordinates of any position in the preset area can be obtained according to the map data, and the boundary of the preset area can be obtained according to the position at the edge of the preset area.

[0061] According to the embodiments of the present disclosure, by determining the boundary of the preset area as the boundary of the display area, the boundary of the display area is limited to prevent the boundary from overflowing when the word cloud is displayed. In addition, the display area is matched with the map corresponding to the preset area, which is conducive to the target word cloud generated based on the display area, so that not only the keywords can be viewed intuitively, but also the geographical distribution can be viewed intuitively.

[0062] According to an embodiment of the present disclosure, for example Figure 2 The operation S220 shown, when it is determined that the publishing addresses of the first target keyword among the N keywords are all located in the preset area, based on the boundary, the word frequency of the first target keyword and the publishing address, determining that the first target keyword is located in the first target position in the display area, may include the following operations: when it is determined that the publishing address of the first target keyword among the N keywords is located in the preset area, determining the size of the rectangular frame surrounding the first target keyword according to the word frequency of the first target keyword and the number of words of the first target keyword. Based on the publishing address, determining the initial position of the center of the rectangular frame in the display area. Based on the initial position and the positional relationship between the vertices of the rectangular frame and the boundary, determining that the first target keyword is located in the first target position in the display area.

[0063] According to an embodiment of the present disclosure, if the specific location represented by the publishing address is located in a preset area, it can be determined that the publishing address of the first target keyword is located in the preset area.

[0064] According to an embodiment of the present disclosure, the font size of the first target keyword can be determined according to the word frequency of the first target keyword. The size of the rectangular frame surrounding the first target keyword can be determined according to the font size and the number of words. The size of the rectangular frame can include the length of the rectangular frame and the width of the rectangular frame. The word frequency of the first target keyword can be obtained when obtaining the first target keyword, and is used to characterize the frequency of the first target keyword appearing in the network text.

[0065] For example, the length of the rectangular box can be obtained by multiplying the font size by the number of words. The font size is used as the width of the rectangular box. If the font size is 16px and the number of words is 5, the length of the rectangular box can be 80*16, and the center point of the rectangular box is the center point of the first target keyword.

[0066] According to an embodiment of the present disclosure, the position corresponding to the center of the first target keyword in the display area can be determined according to the specific position represented by the publishing address. The position corresponding to the center of the first target keyword in the display area is determined as the initial position of the center of the rectangular frame in the display area.

[0067] According to an embodiment of the present disclosure, it is possible to determine whether the rectangular box overflows the boundary according to the positional relationship between the vertices of the rectangular box and the boundary. If it is determined that the rectangular box overflows the boundary, the rectangular box can be moved so that it is located within the boundary, and the first target position is determined based on the moving distance and the initial position. If it is determined that the rectangular box does not overflow the boundary, the initial position can be determined as the first target position.

[0068] According to an embodiment of the present disclosure, after determining the initial position of the center of the rectangular box in the display area, the positional relationship between the vertices of the rectangular box and the boundary must also be considered to further determine that the first target keyword is located at the first target position in the display area. This can avoid the position determined only based on the center of the rectangular box overflowing the boundary, so that the target word cloud map generated based on the boundary cannot display the first target keyword normally.

[0069] According to an embodiment of the present disclosure, based on the initial position and the positional relationship between the vertices and the border of the rectangular frame, determining that the first target keyword is located at the first target position in the display area may include the following operations: when it is determined that there is a target vertex outside the border among the vertices of the rectangular frame, determining the moving distance for the rectangular frame based on the distance between the target vertex and the border. Based on the moving distance and the rectangular frame, updating the initial position, obtaining the first target keyword located at the first target position in the display area.

[0070] According to an embodiment of the present disclosure, the moving distance is used to characterize the distance that the target vertex is located on or within the boundary after the rectangular frame is moved. The moving distance may include a lateral moving distance and a longitudinal moving distance. The center of the rectangular frame may be moved horizontally based on the lateral moving distance and longitudinally based on the longitudinal moving distance from the initial position to obtain a first target position.

[0071] According to the embodiments of the present disclosure, the positional relationship between the vertices and the boundary of the rectangular box can be determined based on a ray algorithm, but is not limited thereto. As long as the positional relationship between the vertices and the boundary of the rectangular box can be determined, the present disclosure does not make any specific limitation.

[0072] According to an embodiment of the present disclosure, when it is determined that the rectangular frame overflows the boundary, the first target keyword can be fully displayed within the boundary by moving it.

[0073] Figure 3 The figure schematically shows the positional relationship between the vertices and the border of the rectangular frame according to an embodiment of the present disclosure.

[0074] According to an embodiment of the present disclosure, when it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, determining the moving distance for the rectangular box based on the distance between the target vertex and the boundary may include the following operations: when it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, based on the intersection rule, determining M intersections between the rectangular box and the boundary and the coordinates corresponding to each of the M intersections. Determine the distance between the target vertex and each intersection based on the coordinates corresponding to each of the M intersections and the coordinates of the target vertex. Determine the maximum distance between the vertex and each intersection as the moving distance for the rectangular box.

[0075] According to an embodiment of the present disclosure, M is an integer greater than or equal to 2. The distance between the target vertex and each intersection point may include a lateral distance and a longitudinal distance between the target vertex and each intersection point. The maximum lateral distance may be determined as a lateral movement distance for the rectangular frame. The maximum longitudinal distance may be determined as a longitudinal movement distance for the rectangular frame.

[0076] According to an embodiment of the present disclosure, the intersection rule may include a face-to-face intersection rule. The projection surface of the rectangular frame and the display area may be determined by the face-to-face intersection rule, the intersection line may be determined according to the projection surface of the rectangular frame and the display area, and M intersection points may be determined based on the intersection line. The position coordinates corresponding to the boundary are converted into horizontal and vertical coordinates with the center of the rectangular frame as the origin, the vertex coordinates of the rectangular frame are determined according to the size of the rectangular frame, and the coordinates corresponding to each of the M intersection points are determined based on the intersection line.

[0077] For example, Figure 3 As shown, the keyword can be a hot word. Five hot words are published in the network text, namely hot word 1, hot word 2, hot word 3, hot word 4 and hot word 5. These five hot words all have a publishing address, and the publishing addresses are all located in the preset area.

[0078] According to the word frequencies of hot words 1, 2, 3, 4 and 5, the font sizes of hot words 1, 2, 3, 4 and 5 can be determined. According to the font size and word count corresponding to each hot word, the size of the rectangular frame surrounding each hot word can be determined. According to the specific position represented by the release address, the position of the center of each hot word in the display area can be determined. The position of the center of each hot word in the display area is determined as the initial position of each hot word. According to the positional relationship between the vertices and the boundary of the rectangular frame, it can be determined that the rectangular frame surrounding hot word 5 overflows the boundary, and the vertex A and the vertex B of the rectangular frame surrounding hot word 5 are both located outside the boundary, and the vertex C and the vertex D are both located inside the boundary. Vertex A and vertex B can be used as target vertices. The horizontal coordinate difference and the vertical coordinate difference between any point on the intersection E to the intersection F and the vertex A, and the horizontal coordinate difference and the vertical coordinate difference between any point on the intersection E to the intersection F and the vertex B can be determined. The largest horizontal coordinate difference and the largest vertical coordinate difference are selected from them as the horizontal movement distance and the vertical movement distance, respectively. The center of the rectangular frame surrounding the hot word 5 is moved horizontally and vertically so that both vertex A and vertex B are located within the boundary.

[0079] According to an embodiment of the present disclosure, the positional relationship between the vertices of the rectangular box and the boundary can be determined again after the movement to ensure that the vertices of the rectangular box are all located within the boundary.

[0080] According to an embodiment of the present disclosure, by determining the largest distance between a vertex and each intersection point as the moving distance for the rectangular frame, the vertices of the moved rectangular frame can all be located within the boundary.

[0081] According to one embodiment of the present disclosure, based on the initial position and the positional relationship between the vertices and the boundary of the rectangular box, determining that the first target keyword is located at the first target position within the display area may also include an operation: when it is determined that there is no target vertex outside the boundary among the vertices of the rectangular box, determining the initial position as the first target position where the first target keyword is located within the display area.

[0082] According to the embodiments of the present disclosure, Figure 2 The operation S230 shown, generating a target word cloud map based on the first target keyword, the first target position and the boundary of the display area, may include the following operations: using a mapping system to generate a boundary layer according to the boundary of the display area. Based on the first target position and the first target keyword, a keyword layer located in the display area is generated. The boundary layer is merged with the keyword layer to obtain a fused layer. A click event is configured on the first target keyword in the fused layer to obtain a target word cloud map.

[0083] According to an embodiment of the present disclosure, a click event is used to display attribute information of the first target keyword. The attribute information may include, but is not limited to, the frequency of the first target keyword, the source information of the first target keyword, the update time of the first target keyword, etc.

[0084] According to the embodiments of the present disclosure, the mapping system may be an existing mapping system, which is not specifically limited in the present disclosure.

[0085] According to an embodiment of the present disclosure, by configuring a click event on the first target keyword, the generated target word cloud map can be used to not only intuitively view the first target keyword and the geographical distribution of the first target keyword, but also intuitively view the attribute information of the first target keyword, which is conducive to improving the utilization rate of the target word cloud map.

[0086] According to an embodiment of the present disclosure, after the boundary layer and the keyword layer are merged to obtain a merged layer, the display and hiding of keywords in the merged layer can be controlled by configuring a display and hiding control component.

[0087] For example, when it is determined that there are multiple first target keywords and each first target keyword is located at the same first target position in the display area, the one with the highest frequency among the multiple first target keywords can be displayed in the display area, and the remaining first target keywords can be hidden.

[0088] According to an embodiment of the present disclosure, the word cloud diagram generation method includes the above Figure 2 In addition to the operations S210~S230 shown, the following operations may also be included: when it is determined that the publication address of a second target keyword is unknown among the N keywords and the second target keyword meets the preset conditions, based on the word frequency of the second target keyword, determining that the second target keyword is located at the second target position in the display area; and generating a target word cloud diagram based on the second target keyword, the second target position and the display area.

[0089] According to an embodiment of the present disclosure, a preset condition may be used to characterize that a keyword appears in a preset area.

[0090] According to an embodiment of the present disclosure, the font size of the second target keyword can be determined according to the word frequency of the second target keyword, the center of the second target keyword can be determined according to the font size, and the second target position can be randomly determined in the display area based on the center. A keyword layer for displaying the second target keyword can be determined according to the second target keyword and the second target position. A boundary layer for displaying the boundary is determined according to the boundary of the display area. A target word cloud is generated according to the keyword layer and the boundary layer.

[0091] Considering that among the N keywords, there are multiple second target keywords whose publishing addresses are unknown and all the second target keywords meet the preset conditions, among the multiple randomly determined second target positions, there are multiple second target keywords that are not evenly distributed and have poor visibility.

[0092] Based on this, in an embodiment of the present disclosure, the second target keywords include P, P≤N, and P is a positive integer. When it is determined that the publishing address of the second target keyword is unknown among the N keywords, and the second target keyword meets the preset conditions, based on the word frequency of the second target keyword, determining that the second target keyword is located at the second target position in the display area may include the following operations: when it is determined that the publishing addresses of P second target keywords are unknown among the N keywords, and the P second target keywords meet the preset conditions, based on the word frequency of each second target keyword in the P second target keywords, the P second target keywords are divided into a preset number of copies; the second target keywords corresponding to each copy in the preset number of copies are reorganized between copies to obtain the reorganized second target keywords; based on the number of reorganized copies of the reorganized second target keywords, the display area is divided into grids, and each reorganized second target keyword is randomly assigned to the corresponding grid; and based on the positions of the P second target keywords in the grid, the P second target keywords are determined to be located at the P second target positions in the display area. The second target keyword and the second target position have a one-to-one correspondence.

[0093] According to the embodiments of the present disclosure, the word frequencies can be sorted, and the sorted word frequencies can be evenly distributed according to a preset number of copies. According to the second target keyword corresponding to each word frequency in each word frequency, the P second target keywords are also divided into preset copies, and then the second target keywords are reorganized between each copy to obtain the reorganized second target keywords. The number of reorganized copies is determined as the number of grids used to divide the display area into grids, and each reorganized second target keyword is randomly distributed to the corresponding grid. The position of the second target keyword in the grid is determined as the second target position.

[0094] According to an embodiment of the present disclosure, after each reorganized second target keyword is randomly assigned to a corresponding grid, it is also possible to determine whether the position of the second target keyword in the grid needs to be changed based on the positional relationship between the vertices and the boundary of the target rectangular box surrounding the second target keyword. If there is a vertex outside the boundary among the vertices of the target rectangular box, it is determined that the position of the second target keyword in the grid needs to be changed, and the changed position is determined as the second target position; otherwise, it is determined that there is no need to change the position of the second target keyword in the grid, and the position of the second target keyword in the grid is determined as the second target position. If there is a vertex outside the boundary among the vertices of the target rectangular box, a method similar to that used to determine the first target position when there is a target vertex outside the boundary among the vertices of the above-mentioned rectangular box can be used to determine the changed position, i.e., the second target position.

[0095] According to an embodiment of the present disclosure, by dividing P second target keywords based on word frequency, the corresponding second target keywords in each frequency band can be obtained, and the divided second target keywords can be reorganized into parts, so that the second keywords in different frequency bands can be combined together, and then multiple second target positions are randomly assigned, which can evenly distribute multiple second target keywords, enhance visibility, and facilitate viewing.

[0096] Figure 4 The diagram schematically shows an avoidance process according to an embodiment of the present disclosure.

[0097] Because the number of second target keywords in each grid is dense, multiple keywords will overlap and cannot be viewed intuitively.

[0098] Based on this, in an embodiment of the present disclosure, based on the positions of the P second target keywords in the grid, determining that the P second target keywords are located at the P second target positions in the display area includes: determining whether there are overlapping target keywords among the P second target keywords based on the positions of the P second target keywords in the grid; in the case where it is determined that there are overlapping target keywords among the P second target keywords, avoiding the overlapping target keywords so that the overlapping target keywords do not overlap; and determining that the P second target keywords are located at the P second target positions in the display area based on the positions of the P second target keywords after the avoidance processing in the grid.

[0099] like Figure 4As shown, quartiles can be created according to the size of the grid, and the center (x, y) is used as a marking point. The upper, lower, left and right sides of the marking point are used to place the text corresponding to the second target keyword. Each second target keyword in each reorganized second target keyword can be randomly determined to the left first. If there is no free space on the left, then try to determine it to the right. If it still doesn't work, try to determine it to the bottom, and so on, and distribute it to the grid. The coordinates of the right virtual rectangular box can be set, and the coordinates of the upper point farthest from the center and close to the text (right) are determined as (maxx, miny), the coordinates of the lower point are determined as (maxx, maxy), the coordinates of the upper point farthest from the text (right) are determined as (minx, miny), and the coordinates of the lower point are determined as (minx, maxy). The size of the target rectangular box surrounding the second target keyword can be determined based on the word frequency of the second target keyword and the number of words in the second target keyword. The size of the target rectangular box includes the size of the width and the length. For example, miny and maxy can be determined based on the size of the width of the target rectangular box and the distance from the center (x, y) to the length of the target rectangular box. Minx is determined based on the sum of miny and maxy. According to the sum of the length of the target rectangular frame and minx, maxx is determined. In the case where it is determined by this method whether every two right virtual rectangular frames in the right virtual rectangular frames of all the marking points intersect, if they intersect, it is determined that the second target keywords associated with the two right virtual rectangular frames overlap. The positions of the second target keywords currently associated with the two right virtual rectangular frames can be moved until there is no intersection in the right virtual rectangular frames of all the marking points. When the grid is full after the movement, but there are still second target keywords whose positions are not determined, the second target keywords can be hidden to complete the avoidance process.

[0100] According to the embodiments of the present disclosure, the avoidance processing adopts the above-mentioned quartiles, which will cause a certain loss in the density of keywords. The keywords can be drawn and overlaid in an aggregation manner to achieve lossless display of keywords. The grid can be divided into multiple grid cells, and the pixel resolution of the input grid is multiplied by the coefficient specified for the pixel coefficient parameter. The generated value corresponds to the pixel resolution of the output grid. The spatial range of the output pixel is mapped to the input grid starting from the lower left corner of the grid. Identify the pixels for which aggregation calculations are to be performed. The pixel positions of the input grid that fall within the range of the output pixel will be included in the calculation of determining the pixel output value. The output value is calculated by calculating the sum, minimum, maximum, average or median of the input grid pixels that fall within the spatial range of the output pixel, expanding and truncating. According to the level size, the grid cells are expanded and truncated to complete the aggregation control.

[0101] According to the embodiments of the present disclosure, by performing avoidance processing on overlapping target keywords, overlapping target keywords can be made non-overlapping, which is convenient for intuitive viewing.

[0102] According to an embodiment of the present disclosure, the word cloud diagram generation method includes the above Figure 2 In addition to the operations S210~S230 shown, the following operations may also be included: when it is determined that the keywords do not include hot words, based on the generator, an initial word cloud map is generated according to the boundary of the display area and the first target keyword; when it is determined that there is no boundary buffer zone in the initial word cloud map, a plane where the boundary is located is generated according to the boundary of the display area; and the initial word cloud map is filled in the plane to obtain the target word cloud map.

[0103] According to an embodiment of the present disclosure, the boundary buffer is used to characterize that the boundary of the display area is different from the boundary of the initial word cloud image.

[0104] According to an embodiment of the present disclosure, the word cloud diagram generation method includes the above Figure 2 In addition to the operations S210~S230 shown, the following operations may also be included: when it is determined that the keyword does not include a hot word, based on the generator, an initial word cloud map is generated according to the boundary of the display area and the first target keyword; when it is determined that the initial word cloud map has a boundary buffer zone, based on the boundary of the display area, the initial word cloud map is masked to obtain a word cloud map that only has the boundary range of the display area; the center position of the word cloud map that only has the boundary range of the display area is configured as the center position of the display area, and the size of the word cloud map that only has the boundary range of the display area is configured as the size of the display area, to obtain a target word cloud map.

[0105] According to an embodiment of the present disclosure, the generator may use an existing word cloud image generator, which is not specifically limited in the present disclosure. The initial word cloud image may be loaded with a map, and after obtaining the word cloud image after the map is loaded, it is determined whether there is a boundary buffer.

[0106] According to the embodiments of the present disclosure, the mask processing may adopt the mask processing method in the existing image processing, which is not limited by the present disclosure, as long as a word cloud image showing only the boundary range of the display area can be obtained.

[0107] According to the embodiments of the present disclosure, by determining whether keywords are hot words, the steps for generating a word cloud diagram can be simplified without including hot words, thereby speeding up the generation of the word cloud diagram and releasing generation resources.

[0108] According to an embodiment of the present disclosure, keywords may include hot words; the word cloud diagram generation method includes the above Figure 2 In addition to the operations S210 to S230 shown, the following operation may be further included: when it is determined that there is a new hot word, a new target word cloud diagram is generated based on the new hot word, the word frequency of the new hot word, and the new publishing address of the new hot word.

[0109] According to an embodiment of the present disclosure, when generating a target word cloud diagram, the first target keyword or the second target keyword may be rendered using a rendering technology, or the display area may be rendered based on map data.

[0110] According to the embodiments of the present disclosure, by generating a new target word cloud diagram when there are newly added hot words, the real-time nature of the word cloud diagram can be guaranteed, thereby achieving high accuracy when analyzing information using the word cloud diagram.

[0111] Figure 5A The following schematically shows a flow chart of generating a word cloud diagram according to an embodiment of the present disclosure; Figure 5B A schematic diagram of a target word cloud diagram according to an embodiment of the present disclosure is schematically shown.

[0112] like Figure 5A As shown, the keyword 502 appearing in the network text can be obtained to determine whether the keyword 502 is a hot word. If the keyword 502 is a hot word, a target word cloud diagram can be generated in real time. Specifically, it is necessary to determine whether the keyword 502 has a first target keyword whose publishing address is located in a preset area. If it is located in the preset area, it can be determined based on the boundary 501 of the display area, the word frequency of the first target keyword, and the publishing address that the first target keyword is located in the first target position 503 in the display area. A boundary layer 504 is generated based on the boundary 501 of the display area. A hot word layer 505 is generated based on the first target keyword and the first target position 503 in the keyword 502. The boundary layer 504 and the hot word layer 505 are fused to obtain a fused layer 506. A click event 507 is configured on the first target keyword in the fused layer 506 to obtain a target word cloud diagram 509.

[0113] If keyword 502 is not a hot word, an initial word cloud 508 can be generated based on the generator according to the boundary 501 of the display area and the first target keyword in keyword 502; the initial word cloud 508 is loaded with a map, and when it is determined that the initial word cloud 508 has a boundary buffer, the initial word cloud 508 is masked based on the boundary 501 of the display area to obtain a word cloud with only the boundary range of the display area; the center position of the word cloud with only the boundary range of the display area is configured as the center position of the display area, and the size of the word cloud with only the boundary range of the display area is configured as the size of the display area, to obtain a target word cloud 509.

[0114] If keyword 502 is not a hot word, when it is determined that the initial word cloud 508 does not have a boundary buffer, a plane where the boundary is located is generated according to the boundary 501 of the display area; the initial word cloud is filled in the plane to obtain a target word cloud 509.

[0115] According to an embodiment of the present disclosure, a target word cloud diagram for a preset area can be obtained through the above-mentioned method for processing keywords.

[0116] like Figure 5B As shown, according to the word cloud generation method provided by the present disclosure, the 14 keywords in the target word cloud obtained are all located in the preset area, and each keyword corresponds to the corresponding publishing location, which is convenient for keyword geographical distribution analysis for the preset area. In addition, by adding click events, the attribute information of keywords can also be analyzed.

[0117] It should be noted that Figure 5B The example of the target word cloud map generated by the word cloud map generation method disclosed in the present invention is merely schematically shown, and the number of keywords, preset area, keyword frequency and publishing address are not specifically limited.

[0118] Based on the above-mentioned word cloud image generation method, the present disclosure also provides a word cloud image generation device. Figure 6 The device is described in detail.

[0119] Figure 6 The structural block diagram of the word cloud image generating device according to an embodiment of the present disclosure is schematically shown.

[0120] like Figure 6 As shown, the word cloud image generating device 600 of this embodiment includes a first determining module 610 , a second determining module 620 and a first generating module 630 .

[0121] The first determination module 610 is used to determine the boundary of the display area based on the map data of the preset area, wherein the display area is used to display N keywords appearing in the network text, where N is a positive integer greater than or equal to 2. In one embodiment, the first determination module 610 can be used to perform the operation S210 described above, which will not be repeated here.

[0122] The second determination module 620 is used to determine that the first target keyword is located at the first target position in the display area based on the boundary, the word frequency of the first target keyword and the publication address when it is determined that the publication address of the first target keyword is located in the preset area among the N keywords. In one embodiment, the second determination module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0123] The first generating module 630 is used to generate a target word cloud diagram based on the first target keyword, the first target position and the boundary of the display area. In one embodiment, the first generating module 630 can be used to perform the operation S230 described above, which will not be described in detail here.

[0124] According to an embodiment of the present disclosure, the second determining module 620 may include: a first determining subunit, a second determining subunit, and a third determining subunit.

[0125] The first determination subunit is used to determine the size of a rectangular frame surrounding the first target keyword according to the word frequency of the first target keyword and the word count of the first target keyword when it is determined that the publishing address of the first target keyword among the N keywords is located in a preset area.

[0126] The second determining subunit is used to determine an initial position of the center of the rectangular frame in the display area based on the published address.

[0127] The third determining subunit is used to determine that the first target keyword is located at a first target position in the display area based on the initial position and the positional relationship between the vertices and the border of the rectangular frame.

[0128] According to an embodiment of the present disclosure, based on the initial position and the positional relationship between the vertices and the boundary of the rectangular box, determining that the first target keyword is located at the first target position within the display area includes: in a case where it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, determining a moving distance for the rectangular box based on the distance between the target vertex and the boundary, wherein the moving distance is used to characterize the distance that causes the target vertex to be located on or within the boundary after the rectangular box is moved; and updating the initial position based on the moving distance and the rectangular box to obtain the first target position where the first target keyword is located within the display area.

[0129] According to an embodiment of the present disclosure, when it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, a moving distance for the rectangular box is determined based on the distance between the target vertex and the boundary, including: when it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, based on the intersection rule, M intersections between the rectangular box and the boundary and the coordinates corresponding to each of the M intersections, wherein M is an integer greater than or equal to 2; according to the coordinates corresponding to each of the M intersections and the coordinates of the target vertex, the distance between the target vertex and each intersection is determined; and the largest distance between the vertex and each intersection is determined as the moving distance for the rectangular box.

[0130] According to an embodiment of the present disclosure, the first generation module 630 may include: a first generation subunit, a second generation subunit, a fusion unit, and a configuration subunit.

[0131] The first generating subunit is used to generate a boundary layer according to the boundary of the display area by using a mapping system.

[0132] The second generating subunit is used to generate a keyword layer located in the display area based on the first target position and the first target keyword.

[0133] The fusion unit is used to fuse the boundary layer with the keyword layer to obtain a fused layer.

[0134] The configuration subunit is used to configure a click event on the first target keyword of the fusion layer to obtain a target word cloud diagram, wherein the click event is used to display the attribute information of the first target keyword.

[0135] According to an embodiment of the present disclosure, the word cloud diagram generating device 600 may further include: a second generating module, a third generating module and a filling module.

[0136] The second generating module is used to generate an initial word cloud diagram based on the generator according to the boundary of the display area and the first target keyword when it is determined that the keyword does not include a hot word.

[0137] The third generating module is used to generate a plane where the boundary is located according to the boundary of the display area when it is determined that the initial word cloud image does not have a boundary buffer zone, wherein the boundary buffer zone is used to indicate that the boundary of the display area is different from the boundary of the initial word cloud image.

[0138] The filling module is used to fill the initial word cloud in the plane to obtain the target word cloud.

[0139] According to an embodiment of the present disclosure, the word cloud diagram generating device 600 may further include: a fourth generating module, a processing module and a configuration module.

[0140] The fourth generating module is used to generate an initial word cloud diagram based on the generator according to the boundary of the display area and the first target keyword when it is determined that the keyword does not include a hot word.

[0141] The processing module is used to perform mask processing on the initial word cloud image based on the boundary of the display area when it is determined that the initial word cloud image has a boundary buffer zone, so as to obtain a word cloud image with only the boundary range of the display area.

[0142] The configuration module is used to configure the center position of the word cloud diagram with only the boundary range of the display area as the center position of the display area, and configure the size of the word cloud diagram with only the boundary range of the display area as the size of the display area to obtain a target word cloud diagram.

[0143] According to an embodiment of the present disclosure, the word cloud diagram generating device 600 may further include: a third determining module and a fifth generating module.

[0144] The third determination module is used to determine that the second target keyword is located at a second target position in the display area based on the word frequency of the second target keyword when it is determined that the publication address of the second target keyword is unknown among the N keywords and the second target keyword meets a preset condition.

[0145] The fifth generating module is used to generate a target word cloud diagram based on the second target keyword, the second target position and the display area.

[0146] According to an embodiment of the present disclosure, the second target keywords include P, P≤N, and P is a positive integer. The third determination module may include: a first division unit, a reorganization unit, a second division unit, and a fourth determination subunit.

[0147] The first division unit is used to divide the P second target keywords into a preset number of parts based on the word frequency of each of the P second target keywords when it is determined that the publishing addresses of P second target keywords among the N keywords are unknown and the P second target keywords meet the preset conditions.

[0148] The reorganization unit is used to reorganize the second target keyword corresponding to each of the preset number of copies to obtain the reorganized second target keyword.

[0149] The second division unit is used to divide the display area into grids based on the number of reorganized copies of the reorganized second target keyword, and randomly assign each reorganized second target keyword to a corresponding grid.

[0150] The fourth determining subunit is used to determine the P second target positions where the P second target keywords are located in the display area based on the positions of the P second target keywords in the grid, wherein the second target keywords and the second target positions have a one-to-one correspondence.

[0151] According to an embodiment of the present disclosure, based on the positions of the P second target keywords in the grid, determining that the P second target keywords are located at the P second target positions in the display area includes: determining whether there are overlapping target keywords among the P second target keywords based on the positions of the P second target keywords in the grid; in the case of determining that there are overlapping target keywords among the P second target keywords, performing avoidance processing on the overlapping target keywords so that the overlapping target keywords do not overlap; and determining that the P second target keywords are located at the P second target positions in the display area based on the positions of the P second target keywords in the grid after the avoidance processing.

[0152] According to an embodiment of the present disclosure, the first determination module 610 may include: a first boundary determination subunit and a second boundary determination subunit.

[0153] The first boundary determination subunit is used to determine the boundary of a preset area according to the map data.

[0154] The second boundary determination subunit is used to determine the boundary of the preset area as the boundary of the display area.

[0155] According to an embodiment of the present disclosure, any multiple modules of the first determination module 610, the second determination module 620 and the first generation module 630 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determination module 610, the second determination module 620 and the first generation module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a proper fusion of any of them. Alternatively, at least one of the first determination module 610, the second determination module 620 and the first generation module 630 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0156] Figure 7 A block diagram of an electronic device suitable for implementing a word cloud diagram generating method according to an embodiment of the present disclosure is schematically shown.

[0157] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0158] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0159] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0160] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0161] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable fusion of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.

[0162] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.

[0163] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0164] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0165] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0166] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any fusion of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the fusion of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with the fusion of dedicated hardware and computer instructions.

[0168] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be fused and / or combined in a variety of ways, even if such fusions or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be fused and / or combined in a variety of ways. All of these fusions and / or combinations fall within the scope of the present disclosure.

[0169] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A word cloud image generation method, characterized in that: The method comprises: Determine the boundary of a display area based on map data of a preset area, wherein the display area is used to display N keywords appearing in the network text, where N is a positive integer greater than or equal to 2; In the case where it is determined that the publishing address of a first target keyword among the N keywords is located in the preset area, determining that the first target keyword is located at a first target position in the display area based on the boundary, the word frequency of the first target keyword and the publishing address; and A target word cloud diagram is generated based on the first target keyword, the first target position, and a boundary of the display area.

2. The method according to claim 1, characterized in that The step of determining that the publishing addresses of the first target keyword among the N keywords are all located in the preset area, based on the boundary, the word frequency of the first target keyword and the publishing address, determining that the first target keyword is located in the first target position in the display area includes: In the case where it is determined that the publishing address of the first target keyword among the N keywords is located in the preset area, determining the size of the rectangular frame surrounding the first target keyword according to the word frequency of the first target keyword and the word count of the first target keyword; Based on the published address, determining an initial position of the center of the rectangular frame within the display area; and Based on the initial position and the positional relationship between the vertices of the rectangular frame and the boundary, it is determined that the first target keyword is located at the first target position within the display area.

3. The method according to claim 2, characterized in that The initial position and the positional relationship between the vertices of the rectangular frame and the boundary, determining that the first target keyword is located at the first target position within the display area, comprises: In a case where it is determined that a target vertex among the vertices of the rectangular box is located outside the boundary, determining a moving distance for the rectangular box based on a distance between the target vertex and the boundary, wherein the moving distance is used to represent a distance by which the target vertex is located on or within the boundary after the rectangular box is moved; and Based on the moving distance and the rectangular frame, the initial position is updated to obtain the first target position where the first target keyword is located within the display area.

4. The method according to claim 3, characterized in that The step of determining a moving distance for the rectangular box based on a distance between the target vertex and the boundary when it is determined that a target vertex among the vertices of the rectangular box is outside the boundary includes: In the case where it is determined that there is a target vertex outside the boundary among the vertices of the rectangular box, based on the intersection rule, determine M intersection points between the rectangular box and the boundary and the coordinates corresponding to each of the M intersection points, where M is an integer greater than or equal to 2; Determine the distance between the target vertex and each of the intersection points according to the coordinates corresponding to each of the M intersection points and the coordinates of the target vertex; and The largest distance between the vertex and each of the intersection points is determined as the moving distance for the rectangular frame.

5. The method according to claim 1, characterized in that The generating a target word cloud diagram based on the first target keyword, the first target position, and the boundary of the display area includes: Using a mapping system, a boundary layer is generated according to the boundary of the display area; Based on the first target position and the first target keyword, generating a keyword layer located in the display area; Merging the boundary layer with the keyword layer to obtain a fused layer; and A click event is configured on the first target keyword of the fusion layer to obtain the target word cloud diagram, wherein the click event is used to display attribute information of the first target keyword.

6. The method according to claim 1, characterized in that The method further comprises: In the case where it is determined that the keyword does not include a hot word, based on a generator, an initial word cloud diagram is generated according to the boundary of the display area and the first target keyword; In the case where it is determined that the initial word cloud image does not have a boundary buffer zone, generating a plane where the boundary is located according to the boundary of the display area, wherein the boundary buffer zone is used to indicate that the boundary of the display area is different from the boundary of the initial word cloud image; Filling the initial word cloud graph in the plane to obtain the target word cloud graph; or In the case where it is determined that the initial word cloud image has the boundary buffer zone, masking the initial word cloud image based on the boundary of the display area to obtain a word cloud image having only the boundary range of the display area; The target word cloud diagram is obtained by configuring the center position of the word cloud diagram that only has the boundary range of the display area as the center position of the display area, and configuring the size of the word cloud diagram that only has the boundary range of the display area as the size of the display area.

7. The method according to claim 1, characterized in that The method further comprises: When it is determined that the publication address of a second target keyword is unknown among the N keywords and the second target keyword meets a preset condition, determining that the second target keyword is located at a second target position in the display area based on the word frequency of the second target keyword; and The target word cloud diagram is generated based on the second target keyword, the second target position and the display area.

8. The method according to claim 7, characterized in that The second target keywords include P, P≤N, and P is a positive integer; The step of determining that the publishing address of a second target keyword is unknown among the N keywords and the second target keyword satisfies a preset condition, based on the word frequency of the second target keyword, determining that the second target keyword is located at a second target position in the display area includes: When it is determined that the publication addresses of P second target keywords among the N keywords are unknown, and the P second target keywords meet the preset condition, the P second target keywords are divided into a preset number of portions based on the word frequency of each of the P second target keywords; Reorganize the second target keyword corresponding to each of the preset number of copies to obtain the reorganized second target keyword; Based on the number of reorganized copies of the reorganized second target keyword, the display area is divided into grids, and each reorganized second target keyword is randomly assigned to a corresponding grid; and Based on the positions of the P second target keywords in the grid, it is determined that the P second target positions where the P second target keywords are located in the display area, wherein the second target keywords have a one-to-one correspondence with the second target positions.

9. The method according to claim 8, characterized in that The determining, based on the positions of the P second target keywords in the grid, that the P second target keywords are located at P second target positions in the display area includes: Based on the positions of the P second target keywords in the grid, determining whether there are overlapping target keywords among the P second target keywords; When it is determined that the overlapping target keywords exist among the P second target keywords, performing avoidance processing on the overlapping target keywords so that the overlapping target keywords do not overlap; Based on the positions of the P second target keywords in the grid after the avoidance process, it is determined that the P second target positions where the P second target keywords are located in the display area.

10. The method according to any one of claims 1 to 9, characterized in that: The step of determining the boundary of the display area based on the map data of the preset area includes: Determining the boundary of the preset area according to the map data; and The boundary of the preset area is determined as the boundary of the display area.

11. A word cloud image generating device, characterized in that: The device comprises: A first determination module, configured to determine the boundary of a display area based on map data of a preset area, wherein the display area is used to display N keywords appearing in the network text, where N is a positive integer greater than or equal to 2; A second determining module is configured to determine that the first target keyword is located at a first target position in the display area based on the boundary, the word frequency of the first target keyword and the publishing address when it is determined that the publishing address of the first target keyword among the N keywords is located in the preset area; and The first generating module is used to generate a target word cloud diagram based on the first target keyword, the first target position and the boundary of the display area.

12. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 10.

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

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

Citation Information

Patent Citations

  • Geospatial distribution feature-driven character cloud position configuration method

    CN108491452A

  • Method for generating big data exploratory label map

    CN114357324A

  • Customer service work order analysis method, system, equipment and medium

    CN117313708A