An image generation method and apparatus
By receiving image generation requests and generating target images, the problem of long development cycles in data asset management models is solved, enabling rapid and efficient data asset integration and multi-dimensional display, simplifying the development cycle of data asset management models, and improving user interaction performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-02-06
- Publication Date
- 2026-08-04
AI Technical Summary
When enterprise users enjoy data asset organization services that are highly tailored to their business needs, the development cycle of data asset management models is long. In particular, when data assets need to be integrated and analyzed from different dimensions, the iteration cycle is lengthy and it is impossible to achieve a proactive response to the display of existing data assets.
An image generation method and apparatus are provided. By receiving an image generation request, obtaining table codes, statistical functions, vertical axis dimensions, horizontal axis dimensions, query dimensions, and grouping dimensions, filtering data tables, and generating target images, the method enables multi-dimensional display and analysis of data assets.
It has achieved a fast and efficient data asset integration model, supports multi-dimensional data display and analysis, simplifies the development cycle of data asset management models, and improves the utilization efficiency of data assets and user interaction performance.
Smart Images

Figure CN116127113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer technology, financial technology, and information technology, and in particular to an image generation method and apparatus. Background Technology
[0002] Currently, the design and development of data asset management models are very common, providing customized data asset integration and analysis services for enterprise users. This can greatly improve the utilization efficiency of data assets, thereby bringing future economic benefits to the corresponding enterprise users.
[0003] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:
[0004] Enterprise users often face the problem of long development cycles for data asset management models when enjoying data asset organization services that are highly tailored to their business needs. In particular, when data assets need to be integrated and analyzed from different dimensions and to achieve the preset data asset display effect, the corresponding data asset management model must go through the entire process of product design, development and testing, resulting in a very long iteration cycle and thus failing to respond positively to the display of existing data assets. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide an image generation method and apparatus that can solve the technical problem of the lack of a fast and efficient data asset integration model in the past.
[0006] To achieve the above objectives, according to one aspect of the present invention, an image generation method is provided, comprising: receiving an image generation request; obtaining a table code, a statistical function, a vertical axis dimension, a horizontal axis dimension, a query dimension, and a grouping dimension; filtering to obtain a data table corresponding to the table code; determining multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension, and grouping dimension, respectively, based on the data table; combining each grouping dimension value with each horizontal axis dimension value to obtain multiple first sequences; randomly selecting one of the multiple query dimension values as a target query dimension value and adding it to each first sequence to obtain multiple second sequences; filtering to obtain data corresponding to each second sequence in the data table; calling a statistical function to process the data to obtain multiple target data; generating corresponding coordinate axes according to the vertical axis dimension and multiple horizontal axis dimension values; determining the coordinate points of each target data in the coordinate axes to generate a target image.
[0007] Optionally, before selecting any one of the plurality of query dimension values as the target query dimension value and adding it to each first sequence, the following is included:
[0008] In response to determining that the image generation request includes multiple grouping dimensions, the multiple grouping dimensions are preprocessed, and the multiple grouping dimensions retained after preprocessing are used as updated multiple grouping dimensions; multiple grouping dimension values corresponding to each updated grouping dimension are determined; multiple grouping dimension values corresponding to different grouping dimensions are combined to obtain multiple grouping dimension value sequences; each grouping dimension value sequence is combined with each horizontal axis dimension value to obtain multiple first sequences.
[0009] Optionally, the plurality of grouping dimensions are preprocessed, including:
[0010] Determine whether there is a subordinate relationship among the multiple grouping dimensions; if not, retain all grouping dimensions; if so, select and retain the grouping dimensions that do not have a subordinate relationship and the subordinate grouping dimensions in the subordinate relationship, and delete the unselected grouping dimensions; thus obtaining the retained multiple grouping dimensions.
[0011] Optionally, generating the target image includes:
[0012] Determine whether the image generation request includes multiple grouping dimensions; if not, connect all coordinate points corresponding to the same grouping dimension value; if so, connect all coordinate points corresponding to the same grouping dimension value sequence; obtain multiple polylines, and mark each polyline separately to obtain multiple marked polylines; based on the grouping dimension value and mark corresponding to each marked polyline, generate annotation information corresponding to each marked polyline to obtain multiple annotation information, and determine the arrangement order of the corresponding annotation information according to the arrangement order of the multiple marked polylines, arrange the multiple annotation information, and use the arranged annotation information as a figure caption to annotate the multiple marked polylines to obtain the target image.
[0013] Optionally, after obtaining the target image, the process includes:
[0014] A preset panel is retrieved, which includes an initialized dropdown control and an initialized image area; the target image is loaded into the image area; the dropdown control includes a text box control and a dropdown menu control, so that the target query dimension value is added to the text box control as the current option, and the multiple query dimension values are added to the dropdown menu control as multiple dropdown options; the configured panel is obtained and the configured panel is displayed.
[0015] Optionally, after displaying the configured panel, it includes:
[0016] In response to a click on the dropdown menu control, the dropdown option corresponding to the clicked area is taken as the target option. The target option is used to update the current option, and the updated current option is used to update the text box control to obtain the updated dropdown menu control.
[0017] Optionally, after obtaining the updated dropdown control, it includes:
[0018] The target query dimension value is updated using the updated current option to obtain the updated target query dimension value; each second sequence is updated accordingly based on the updated target query dimension value to filter the new data corresponding to the updated second sequence in the data table; the new data is processed by calling a statistical function to obtain multiple new target data; the coordinate points in the target image are updated according to the new target data to obtain the updated target image; the updated target image is loaded into the image area of the panel to replace the target image before the update.
[0019] In addition, the present invention also provides an image generation apparatus, including an acquisition module for receiving an image generation request and acquiring a table code, a statistical function, a vertical axis dimension, a horizontal axis dimension, a query dimension, and a grouping dimension; a combination module for filtering to obtain a data table corresponding to the table code, and determining multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension, and grouping dimension, respectively, based on the data table; a combination module for combining each grouping dimension value with each horizontal axis dimension value to obtain multiple first sequences, and selecting one of the multiple query dimension values as a target query dimension value and adding it to each first sequence to obtain multiple second sequences; a filtering module for filtering to obtain data corresponding to each second sequence in the data table, and calling a statistical function to process the data to obtain multiple target data; and a plotting module for generating corresponding coordinate axes based on the vertical axis dimension and multiple horizontal axis dimension values, and determining the coordinate points of each target data in the coordinate axes to generate a target image.
[0020] One embodiment of the above invention has the following advantages or beneficial effects: The present invention receives an image generation request and then parses the corresponding table code, statistical function, vertical axis dimension, horizontal axis dimension, query dimension, and grouping dimension, realizing the automated acquisition of plotting parameters based on the image generation request, thus laying the groundwork for subsequent generation of the target image based on the plotting parameters. Furthermore, the present invention filters the data table corresponding to the table code, thereby determining multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values, completing the process of determining the corresponding source data and filtering conditions, realizing the initial utilization of the parsed plotting parameters, and providing data support for subsequent acquisition of target data based on filtering. Simultaneously, the present invention combines the multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values according to preset rules to obtain multiple second sequences, realizing the matching combination between multiple filtering conditions, and obtaining the target filtering conditions, achieving… This invention achieves the effect of completely transforming the plotting parameters included in the image generation request into data filtering conditions that are understood by the computer. Furthermore, by filtering the data corresponding to each second sequence in the data table, and processing the data using statistical functions to obtain multiple target data, this invention completes the process of filtering data according to target filtering conditions and processing the data into target data through specified calculations. This achieves the purpose of diversified and personalized aggregation processing of the filtered data, thereby enabling the processed target data to meet development needs. Additionally, by generating corresponding coordinate axes based on the vertical axis and multiple horizontal axis values, this invention determines the coordinate points of each target data point on the coordinate axes to generate the target image. This completes the process of determining the coordinate axes and plotting points and connecting lines based on the target data to generate the target image, thus completing the response to the image generation request and realizing an intuitive, multi-dimensional display and analysis of the corresponding data assets through a line chart.
[0021] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0022] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0023] Figure 1 This is a schematic diagram of the main flow of the image generation method according to the first embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of a display panel according to an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the main flow of the image generation method according to the second embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of the main flow of the image generation method according to the third embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of the main modules of the image generation apparatus according to the first embodiment of the present invention;
[0028] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0029] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0030] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0031] Figure 1 This is a schematic diagram of the main flow of the image generation method according to the first embodiment of the present invention, as shown below. Figure 1 As shown, the image generation method includes:
[0032] Step S101: Receive image generation request and obtain table code, statistical function, vertical axis dimension, horizontal axis dimension, query dimension and grouping dimension.
[0033] In this embodiment, after receiving an image generation request, corresponding data can be obtained from the preset location value of the image generation request according to preset rules. This data includes table codes, statistical functions, vertical axis dimensions, horizontal axis dimensions, query dimensions, and grouping dimensions. The table code is the query condition for the corresponding data table, providing data support for the generation of the target image through the determination and reading of the data table. The horizontal axis dimension, query dimension, and grouping dimension are all data filtering conditions corresponding to the aforementioned data table. By combining multiple filtering conditions, the image generation request can be transformed into multiple specific data filtering instructions, thereby achieving the effect of filtering data that strictly corresponds to the development requirements. The statistical function is used to clean and aggregate the filtered data. For example, the statistical function can be a function for the number of data entries in a statistical group (count), a function for the sum of data entries in a statistical group (sum), a function for the average value of data entries in a statistical group (average), a function for the maximum value of data entries in a statistical group (max), a function for the minimum value of data entries in a statistical group (min), or other user-defined functions. The vertical axis dimension is generally a quantity unit (pieces) used to assist in the generation of the target image. In summary, by acquiring and parsing image generation requests in preset formats, the system quickly and efficiently enables users to personalize the display dimensions of target images.
[0034] Step S102: Filter to obtain the data table corresponding to the table code, and determine multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension, and grouping dimension, respectively, based on the data table.
[0035] In this embodiment, by filtering to obtain the corresponding data table, the source data corresponding to the target image is identified, which is the data in the data table; and then the multiple filtering conditions included in the source data are determined, completing the initial utilization of the plotting parameters obtained from the analysis. For example, if the data table is "Sales Performance Table of All Employees in North China in January 2022", we can obtain: if the horizontal axis dimension is date, the corresponding horizontal axis dimension value is from January 1, 2022 to January 31, 2022; if the query dimension is branch company, the corresponding query dimension value is North China Branch 1 and North China Branch 2; if the grouping dimension is gender, the corresponding grouping dimension value is male and female.
[0036] In some embodiments, to simplify multiple grouping dimensions as much as possible when an image generation request includes multiple grouping dimensions, it can be determined whether there is a subordinate relationship among the multiple grouping dimensions; if not, all grouping dimensions are retained; if so, grouping dimensions without subordinate relationships and subordinate grouping dimensions within subordinate relationships are selected and retained, and unselected grouping dimensions are deleted; thus, the retained multiple grouping dimensions are obtained. For example, if the received image generation request includes both "branch company" and "team" grouping dimensions, it can be determined that the grouping dimension "team" is subordinate to the grouping dimension "branch company," so the grouping dimension "branch company" is deleted, and the grouping dimension "team" is retained; because the existence of the grouping dimension "team" alone is sufficient to perform more detailed data filtering and covers the data filtering effect of the grouping dimension "branch company," the above preprocessing is required for grouping dimensions with subordinate relationships. In a specific embodiment, the subordinate relationships of all grouping dimensions corresponding to all data can be stored in a preset lookup table, so that the computer can determine the subordinate relationship by retrieving the lookup table. This step removes unnecessary data filtering conditions, making the data filtering logic clearer and the generated target image more concise and intuitive.
[0037] Step S103: Combine each group dimension value with each horizontal axis dimension value to obtain multiple first sequences. Select one of the multiple query dimension values as the target query dimension value and add it to each first sequence to obtain multiple second sequences.
[0038] In this embodiment, each grouping dimension value is combined with each horizontal axis dimension value to obtain multiple first sequences. Each first sequence includes a grouping dimension value and a first horizontal axis dimension value. Furthermore, the number of first sequences should equal the number of grouping dimension values multiplied by the number of horizontal axis dimension values to ensure that no combination of any grouping dimension value and any horizontal axis dimension value is omitted. After obtaining multiple first sequences, one of the multiple query dimension values is randomly selected as the target query dimension value and added to each first sequence to obtain multiple second sequences. The second sequences are the target filtering conditions for data selection. This step thoroughly transforms the plotting parameters included in the image generation request, achieving the effect of clearly defining the target filtering conditions corresponding to the plotting data, thus laying the groundwork for obtaining the plotting data in subsequent operations.
[0039] In some embodiments, in order to obtain accurate target filtering data when the image generation request includes multiple grouping dimensions, in response to determining that the image generation request includes multiple grouping dimensions, the multiple grouping dimensions can be preprocessed, and the multiple grouping dimensions retained after preprocessing can be used as updated multiple grouping dimensions; multiple grouping dimension values corresponding to each updated grouping dimension can be determined; multiple grouping dimension values corresponding to different grouping dimensions can be combined to obtain multiple grouping dimension value sequences; and each grouping dimension value sequence can be combined with each horizontal axis dimension value to obtain multiple first sequences.
[0040] Step S104: Filter the data in the data table to obtain the data corresponding to each second sequence, and call the statistical function to process the data to obtain multiple target data.
[0041] In this embodiment, the configuration of statistical functions provides the possibility of preprocessing the plotting data in the image generation method of the present invention. These statistical functions can be existing functions or custom functions, used to clean and aggregate the plotting data to obtain the target data. By designing the statistical functions, the image generation method of the present invention can meet development requirements in the dimension of data preprocessing.
[0042] Step S105: Generate corresponding coordinate axes based on the vertical axis dimension and multiple horizontal axis dimension values, and determine the coordinate points of each target data in the coordinate axes to generate a target image.
[0043] In some embodiments, to obtain a clearer, more intuitive, and reasonably grouped target image, the following steps can be taken: determine whether the image generation request includes multiple grouping dimensions; if not, connect all coordinate points corresponding to the same grouping dimension value; if so, connect all coordinate points corresponding to the same grouping dimension value sequence; obtain multiple polylines, and label each polyline to obtain multiple labeled polylines; based on the grouping dimension value and label corresponding to each labeled polyline, generate annotation information corresponding to each labeled polyline to obtain multiple annotation information, and determine the arrangement order of the corresponding annotation information according to the arrangement order of the multiple labeled polylines, arrange the multiple annotation information, and use the arranged annotation information as a caption to annotate the multiple labeled polylines to obtain the target image. By connecting coordinate points corresponding to the same grouping dimension value (corresponding to the case of only one grouping dimension) or grouping dimension sequence to obtain multiple polylines, the changing trend of the same group of data on the horizontal axis can be displayed more intuitively, avoiding the impact of messy coordinate points on the readability of the target image. By applying different marking effects to each polyline and generating corresponding annotation information, the readability of the target image is greatly increased, thereby enhancing the display effect of the data asset integration model of this invention. For example, such as... Figure 2 As shown, Figure 2 The lower center is the image area of the display panel, which corresponds to the target image. Different polylines corresponding to different teams are distinguished and marked, and the order of the annotation information is the same as the order of the data size corresponding to the first horizontal axis dimension value, making the target image more intuitive.
[0044] In some embodiments, to configure the function of dynamically updating the target image, the following steps may be included: after obtaining the target image, retrieving a preset panel, the panel including an initialized drop-down control and an initialized image area; loading the target image into the image area; the drop-down control including a text box control and a drop-down menu control, adding the target query dimension value to the text box control as the current option, and adding the multiple query dimension values to the drop-down menu control as multiple drop-down options; obtaining the configured panel, and displaying the configured panel. By configuring the drop-down, it is possible to switch the target query dimension value by clicking the drop-down menu, and update the target image in subsequent operations. For example, as shown... Figure 2 As shown, "Asset Type" and "Affiliated Business Group" at the top of the display panel are both query dimensions, and the drop-down control on the right can switch the target query dimension values corresponding to the two query dimensions respectively. For the two drop-down controls, "Physical Subsystem" and "BigData Center" encapsulated in the unhidden text box control are the target query dimension values, i.e., the current options, while all query dimension values encapsulated in the hidden drop-down menu control are the drop-down options, allowing users to switch the target query dimension values by clicking on the drop-down options. This operation enhances the interactivity of the data asset management system of this invention with the user, and the form of generating only one target image at a time also saves computing resources. Furthermore, the function of updating plotting parameters and generating new images is provided through drop-down boxes, providing users with a simple and clear interactive interface and reducing the operational requirements for users.
[0045] In some embodiments, to obtain user requests based on clicks and update the display panel to respond instantly to user requests, in response to a click on a dropdown menu control, the dropdown option corresponding to the clicked area can be used as the target option. The target option is then used to update the current option, and the updated current option is used to update the text box control, resulting in an updated dropdown control. This step enhances the interactive performance of the display panel of the data asset management system of this invention.
[0046] In some embodiments, to update and display the target image according to the updated current option, the target query dimension value can be updated using the updated current option to obtain the updated target query dimension value; each second sequence is updated accordingly based on the updated target query dimension value to filter out the new data corresponding to the updated second sequence in the data table; a statistical function is called to process the new data to obtain multiple new target data; the coordinate points in the target image are updated based on the new target data to obtain the updated target image; the updated target image is loaded into the image area of the panel to replace the original target image. Through this process, an updated display panel is obtained, achieving timely response to effective user clicks and meeting users' needs for displaying and analyzing data assets in other dimensions, thus improving the user experience from multiple perspectives.
[0047] Figure 3 This is a schematic diagram of the main flow of an image generation method according to a second embodiment of the present invention, the image generation method comprising:
[0048] Step S301: Receive image generation request.
[0049] Step S302: Parse the image generation request to obtain the table code, statistical function, vertical axis dimension, horizontal axis dimension, query dimension, and grouping dimension.
[0050] Step S303: Filter to obtain the data table corresponding to the table code.
[0051] Step S304: Based on the data table, determine multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension, and grouping dimension, respectively.
[0052] Step S305: Combine each group dimension value with each horizontal axis dimension value to obtain multiple first sequences.
[0053] Step S306: Select one of the multiple query dimension values as the target query dimension value and add it to each first sequence to obtain multiple second sequences.
[0054] Step S307: Filter the data in the data table to obtain the data corresponding to each second sequence, and call the statistical function to process the data to obtain multiple target data.
[0055] Step S308: Generate corresponding coordinate axes based on the vertical axis dimension and multiple horizontal axis dimension values, and determine the coordinate points of each target data in the coordinate axes.
[0056] Step S309: Connect all coordinate points corresponding to the same grouping dimension value to obtain multiple polylines, and mark each polyline to obtain multiple marked polylines.
[0057] Ideally, different marking methods should be used for each polyline to distinguish between multiple polylines.
[0058] Step S310: Based on the grouping dimension value and label corresponding to each marked polyline, generate annotation information corresponding to each marked polyline, arrange multiple annotation information as a figure caption, and annotate the multiple marked polylines to obtain the target image.
[0059] Step S311: Retrieve a preset panel and load the target image into the image area of the panel.
[0060] Step S312: Configure the drop-down control of the panel using the multiple query dimension values.
[0061] Preferably, the dropdown control includes a text box control and a dropdown menu control, to add the target query dimension value to the text box control as the current option, and to add the multiple query dimension values to the dropdown menu control as multiple dropdown options.
[0062] Step S313: Obtain the configured panel and display the configured panel.
[0063] Step S314: In response to the click operation on the drop-down menu control, the drop-down option corresponding to the clicked area is updated to the current option, and then the text box control is updated to obtain the updated drop-down menu control.
[0064] Step S315: Update the target query dimension value using the updated current option to obtain the updated target query dimension value, and then update the target image based on the updated target query dimension value.
[0065] Preferably, each second sequence is updated according to the updated target query dimension value to filter out the new data corresponding to the updated second sequence in the data table, and the new data is processed by calling a statistical function to obtain multiple new target data. The coordinate points in the target image are updated according to the new target data to obtain the updated target image. The updated target image is then loaded into the image area of the panel to replace the target image before the update.
[0066] Figure 4 This is a schematic diagram of the main flow of an image generation method according to a third embodiment of the present invention, the image generation method comprising:
[0067] Step S401: Receive image generation request.
[0068] Step S402: Obtain the table code, statistical functions, vertical axis dimension, horizontal axis dimension, query dimension, and multiple grouping dimensions.
[0069] Step S403: Filter to obtain the data table corresponding to the table code.
[0070] Step S404: Determine the corresponding multiple horizontal axis dimension values and multiple query dimension values based on the data table.
[0071] Step S405: Determine whether there is a subordinate relationship among the multiple grouping dimensions. If yes, proceed to step S406; otherwise, proceed to step S407.
[0072] Step S406: Select and retain the grouping dimensions that do not have a subordinate relationship and the subordinate grouping dimensions in the subordinate relationship, and delete the unselected grouping dimensions.
[0073] Step S407: Retain all grouping dimensions.
[0074] Preferably, the multiple grouping dimensions retained after preprocessing are used as the updated multiple grouping dimensions.
[0075] Step S408: Determine the multiple group dimension values corresponding to each updated group dimension; combine the multiple group dimension values corresponding to different group dimensions to obtain multiple group dimension value sequences.
[0076] Step S409: Combine each group dimension value sequence with each horizontal axis dimension value to obtain multiple first sequences.
[0077] Step S410: Select one of the multiple query dimension values as the target query dimension value and add it to each first sequence to obtain multiple second sequences.
[0078] Step S411: Filter the data in the data table to obtain the data corresponding to each second sequence, call the statistical function to process the data, and obtain multiple target data.
[0079] Step S412: Generate corresponding coordinate axes based on the vertical axis dimension and multiple horizontal axis dimension values, and determine the coordinate points of each target data in the coordinate axes.
[0080] Step S413: Connect all coordinate points corresponding to the same grouped dimension value sequence to obtain multiple polylines, and mark each polyline separately.
[0081] Ideally, different marking methods should be used for each polyline to distinguish between multiple polylines.
[0082] Step S414: Based on the grouped dimension value sequence and label corresponding to each marked polyline, generate corresponding annotation information, arrange the annotation information as a figure caption, and obtain the target image.
[0083] Step S415: Retrieve a preset panel, load the target image into the image area of the panel, configure the drop-down control of the panel using the multiple query dimension values, and display the configured panel.
[0084] Preferably, the dropdown control includes a text box control and a dropdown menu control, to add the target query dimension value to the text box control as the current option, and to add the multiple query dimension values to the dropdown menu control as multiple dropdown options.
[0085] Step S416: In response to the click operation on the drop-down menu control, the drop-down option corresponding to the clicked area is updated to the current option, and then the text box control is updated to obtain the updated drop-down menu control.
[0086] Step S417: Update the target query dimension value using the updated current option to obtain the updated target query dimension value, and then update the target image based on the updated target query dimension value.
[0087] Preferably, each second sequence is updated according to the updated target query dimension value to filter out the new data corresponding to the updated second sequence in the data table, and the new data is processed by calling a statistical function to obtain multiple new target data. The coordinate points in the target image are updated according to the new target data to obtain the updated target image. The updated target image is then loaded into the image area of the panel to replace the target image before the update.
[0088] Figure 5 This is a schematic diagram of the main modules of an image generation apparatus according to an embodiment of the present invention, such as... Figure 5As shown, the image generation device 500 includes an acquisition module 501, a combination module 502, a filtering module 503, and a mapping module 504. The acquisition module 501 receives an image generation request and acquires a table code, a statistical function, a vertical axis dimension, a horizontal axis dimension, a query dimension, and a grouping dimension. The combination module 502 filters to obtain a data table corresponding to the table code, and determines multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension, and grouping dimension, respectively, based on the data table. The combination module 502 also combines each grouping dimension value with each horizontal axis dimension value to obtain multiple first sequences, and selects one of the multiple query dimension values as a target query dimension value and adds it to each first sequence to obtain multiple second sequences. The filtering module 503 filters the data corresponding to each second sequence in the data table, calls a statistical function to process the data, and obtains multiple target data. The mapping module 504 generates corresponding coordinate axes based on the vertical axis dimension and multiple horizontal axis dimension values, determines the coordinate points of each target data in the coordinate axes, and generates a target image.
[0089] In some embodiments, the combination module 502 is further configured to:
[0090] Before selecting one of the multiple query dimension values as the target query dimension value and adding it to each first sequence, in response to determining that the image generation request includes multiple grouping dimensions, the multiple grouping dimensions are preprocessed, and the multiple grouping dimensions retained after preprocessing are used as the updated multiple grouping dimensions; the multiple grouping dimension values corresponding to each updated grouping dimension are determined; the multiple grouping dimension values corresponding to different grouping dimensions are combined to obtain multiple grouping dimension value sequences; each grouping dimension value sequence is combined with each horizontal axis dimension value to obtain multiple first sequences.
[0091] In some embodiments, the combination module 502 is further configured to:
[0092] Preprocessing the multiple grouping dimensions includes: determining whether there is a subordinate relationship among the multiple grouping dimensions; if not, retaining all grouping dimensions; if so, selecting and retaining the grouping dimensions that do not have a subordinate relationship and the subordinate grouping dimensions in the subordinate relationship, and deleting the unselected grouping dimensions; thus obtaining the retained multiple grouping dimensions.
[0093] In some embodiments, the drafting module 504 is further configured to:
[0094] When generating the target image, the process includes: determining whether the image generation request includes multiple grouping dimensions; if not, connecting all coordinate points corresponding to the same grouping dimension value; if so, connecting all coordinate points corresponding to the same grouping dimension value sequence; obtaining multiple polylines and marking each polyline to obtain multiple marked polylines; generating annotation information corresponding to each marked polyline based on the grouping dimension value and the label, obtaining multiple annotation information, determining the arrangement order of the corresponding annotation information according to the arrangement order of the multiple marked polylines, arranging the multiple annotation information, and using the arranged annotation information as a caption to annotate the multiple marked polylines to obtain the target image.
[0095] In some embodiments, the drafting module 504 is further configured to:
[0096] After obtaining the target image, a preset panel is invoked. The panel includes an initialized drop-down list control and an initialized image area. The target image is loaded into the image area. The drop-down list control includes a text box control and a drop-down menu control. The target query dimension value is added to the text box control as the current option, and the multiple query dimension values are added to the drop-down menu control as multiple drop-down options. The configured panel is obtained and then displayed.
[0097] In some embodiments, the drafting module 504 is further configured to:
[0098] After displaying the configured panel, in response to a click on the drop-down menu control, the drop-down option corresponding to the clicked area is taken as the target option. The target option is used to update the current option, and the updated current option is used to update the text box control to obtain the updated drop-down control.
[0099] In some embodiments, the drafting module 504 is further configured to:
[0100] After obtaining the updated dropdown control, the target query dimension value is updated using the updated current option to obtain the updated target query dimension value. Each second sequence is updated accordingly based on the updated target query dimension value to filter and obtain new data corresponding to the updated second sequence in the data table. A statistical function is called to process the new data to obtain multiple new target data. The coordinate points in the target image are updated based on the new target data to obtain the updated target image. The updated target image is then loaded into the image area of the panel to replace the previous target image.
[0101] It should be noted that the image generation method and the image generation device described in this invention have a corresponding relationship in their specific implementation, so repeated content will not be described again.
[0102] Figure 6 An exemplary system architecture 600 is shown that can be applied to the image generation method or image generation apparatus of the present invention.
[0103] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0104] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603.
[0105] Terminal devices 601, 602, and 603 can be various electronic devices with a page display processing screen that supports web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0106] Server 605 can be a server that provides various services, such as a backend management server that supports users using terminal devices 601, 602, and 603 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal devices.
[0107] It should be noted that the image generation method provided in the embodiments of the present invention is generally executed by server 605, and correspondingly, the computing device is generally located in server 605.
[0108] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0109] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device of the present invention. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0110] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the computer system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0111] The following components are connected to the I / O interface 705: an input section 705 including a keyboard, mouse, etc.; an output section 706 including a cathode ray tube (CRT), liquid crystal display processor (LCD), and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card and a modem, etc. The communication section 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 disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0112] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0113] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0115] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including an acquisition module, a combination module, a filtering module, and a drawing module. The names of these modules do not necessarily limit the functionality of the module itself.
[0116] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include receiving an image generation request, obtaining a table code, a statistical function, a vertical axis dimension, a horizontal axis dimension, a query dimension, and a grouping dimension; filtering to obtain a data table corresponding to the table code, determining multiple horizontal axis dimension values, multiple query dimension values, and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension, and grouping dimension, respectively, based on the data table; combining each grouping dimension value with each horizontal axis dimension value to obtain multiple first sequences; randomly selecting one of the multiple query dimension values as a target query dimension value and adding it to each first sequence to obtain multiple second sequences; filtering to obtain data corresponding to each second sequence in the data table, calling a statistical function to process the data to obtain multiple target data; generating corresponding coordinate axes according to the vertical axis dimension and multiple horizontal axis dimension values, determining the coordinate points of each target data in the coordinate axes, and generating a target image.
[0117] The technical solution of the present invention can solve the technical problem of the lack of a fast and efficient data asset integration model in the past.
[0118] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An image generation method characterized by, include: Receive image generation request and obtain table code, statistical function, vertical axis dimension, horizontal axis dimension, query dimension, and grouping dimension; The data table corresponding to the table code is obtained by filtering, and multiple horizontal axis dimension values, multiple query dimension values and multiple grouping dimension values are determined based on the data table; Each group dimension value is combined with each horizontal axis dimension value to obtain multiple first sequences. Then, one of the multiple query dimension values is selected as the target query dimension value and added to each first sequence to obtain multiple second sequences. The data corresponding to each second sequence is obtained by filtering the data table, and the statistical function is called to process the data to obtain multiple target data. Based on the vertical axis dimension and multiple horizontal axis dimension values, corresponding coordinate axes are generated, and the coordinate points of each target data in the coordinate axes are determined to generate a target image. This includes: determining whether the image generation request includes multiple grouping dimensions; if not, connecting all coordinate points corresponding to the same grouping dimension value; if so, connecting all coordinate points corresponding to the same grouping dimension value sequence; obtaining multiple polylines and marking each polyline to obtain multiple marked polylines; generating annotation information corresponding to each marked polyline based on the grouping dimension value and the label, obtaining multiple annotation information, and determining the arrangement order of the corresponding annotation information according to the arrangement order of the multiple marked polylines, arranging the multiple annotation information, and using the arranged annotation information as a caption to annotate the multiple marked polylines to obtain the target image.
2. The method according to claim 1, characterized in that, Before selecting one of the multiple query dimension values as the target query dimension value and adding it to each first sequence, the process includes: In response to determining that the image generation request includes multiple grouping dimensions, the multiple grouping dimensions are preprocessed, and the multiple grouping dimensions retained after preprocessing are used as the updated multiple grouping dimensions; Determine the multiple grouping dimension values corresponding to each grouping dimension after the update; Multiple grouping dimension values, each corresponding to a different grouping dimension, are combined to obtain multiple sequences of grouping dimension values. Each group dimension value sequence is combined with each horizontal axis dimension value to obtain multiple first sequences.
3. The method according to claim 2, characterized in that, Preprocessing of the multiple grouping dimensions includes: Determine whether a subordinate relationship exists among the multiple grouping dimensions; Otherwise, retain all grouping dimensions; If so, select and retain the grouping dimensions that do not have a subordinate relationship and the subordinate grouping dimensions in the subordinate relationship, and delete the grouping dimensions that are not selected; Multiple grouping dimensions are retained.
4. The method according to claim 1, characterized in that, After obtaining the target image, the following is included: Retrieve a preset panel, which includes an initialized drop-down control and an initialized image area; Load the target image into the image region; The dropdown control includes a text box control and a dropdown menu control, to add the target query dimension value to the text box control as the current option, and to add the multiple query dimension values to the dropdown menu control as multiple dropdown options; Once you have the configured panel, display it.
5. The method according to claim 4, characterized in that, After displaying the configured panel, it includes: In response to a click on the dropdown menu control, the dropdown option corresponding to the clicked area is taken as the target option. The target option is used to update the current option, and the updated current option is used to update the text box control to obtain the updated dropdown menu control.
6. The method according to claim 5, characterized in that, After obtaining the updated dropdown control, it includes: Update the target query dimension value using the updated current options to obtain the updated target query dimension value; Each second sequence is updated according to the updated target query dimension value, so as to filter the new data corresponding to the updated second sequence in the data table, call the statistical function to process the new data to obtain multiple new target data, and update the coordinate points in the target image according to the new target data to obtain the updated target image; The updated target image is loaded into the image area of the panel to replace the original target image.
7. An image generation apparatus, characterized in that, include: The acquisition module is used to receive image generation requests and obtain table codes, statistical functions, vertical axis dimensions, horizontal axis dimensions, query dimensions, and grouping dimensions. The combination module is used to filter and obtain the data table corresponding to the table code, and determine multiple horizontal axis dimension values, multiple query dimension values and multiple grouping dimension values corresponding to the horizontal axis dimension, query dimension and grouping dimension respectively based on the data table; it is used to combine each grouping dimension value with each horizontal axis dimension value to obtain multiple first sequences, and select one of the multiple query dimension values as the target query dimension value and add it to each first sequence to obtain multiple second sequences; The filtering module is used to filter the data in the data table to obtain the data corresponding to each second sequence, and call the statistical function to process the data to obtain multiple target data. The mapping module is used to generate corresponding coordinate axes based on the vertical axis dimension and multiple horizontal axis dimension values, and to determine the coordinate points of each target data in the coordinate axes in order to generate a target image; The mapping module is used to determine whether the image generation request includes multiple grouping dimensions; if not, it connects all coordinate points corresponding to the same grouping dimension value; if so, it connects all coordinate points corresponding to the same grouping dimension value sequence. Multiple polylines are obtained, and each polyline is labeled to obtain multiple labeled polylines. Based on the grouping dimension value and label corresponding to each labeled polyline, annotation information corresponding to each labeled polyline is generated to obtain multiple annotation information. The arrangement order of the corresponding annotation information is determined according to the arrangement order of the multiple labeled polylines. The multiple annotation information is arranged and used as a figure caption to annotate the multiple labeled polylines to obtain the target image.
8. The apparatus according to claim 7, characterized in that, include: A combination module is configured to, in response to determining that the image generation request includes multiple grouping dimensions, preprocess the multiple grouping dimensions, and use the multiple grouping dimensions retained after preprocessing as the updated multiple grouping dimensions; Determine the multiple grouping dimension values corresponding to each grouping dimension after the update; Multiple grouping dimension values, each corresponding to a different grouping dimension, are combined to obtain multiple sequences of grouping dimension values. Each group dimension value sequence is combined with each horizontal axis dimension value to obtain multiple first sequences.
9. The apparatus according to claim 7, characterized in that, include: The combination module is used to determine whether there is a subordinate relationship among the multiple grouping dimensions; Otherwise, retain all grouping dimensions; If so, select and retain the grouping dimensions that do not have a subordinate relationship and the subordinate grouping dimensions in the subordinate relationship, and delete the grouping dimensions that are not selected; Multiple grouping dimensions are retained.
10. The apparatus according to claim 7, characterized in that, include: The drawing module is used to retrieve a preset panel, which includes an initialized drop-down control and an initialized image area; Load the target image into the image region; The dropdown control includes a text box control and a dropdown menu control, to add the target query dimension value to the text box control as the current option, and to add the multiple query dimension values to the dropdown menu control as multiple dropdown options; Once you have the configured panel, display it.
11. The apparatus according to claim 7, characterized in that, include: The drawing module is used to respond to click operations on the drop-down menu control. It takes the drop-down option corresponding to the clicked area as the target option, updates the current option with the target option, and updates the text box control with the updated current option to obtain the updated drop-down control.
12. The apparatus according to claim 7, characterized in that, include: The graphing module is used to update the target query dimension values using the updated current options, resulting in the updated target query dimension values. Each second sequence is updated according to the updated target query dimension value, so as to filter the new data corresponding to the updated second sequence in the data table, call the statistical function to process the new data to obtain multiple new target data, and update the coordinate points in the target image according to the new target data to obtain the updated target image; The updated target image is loaded into the image area of the panel to replace the original target image.
13. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.
15. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.