Insert Chart Data Processing Method and System Based on Prediction Algorithm
Determining the chart object through prediction algorithms and dynamic programming algorithms solves the problem of low intelligence in the existing technology, and achieves more efficient chart data conversion and insertion.
Patent Information
- Application Number
- CN202411788634.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The existing technology has low intelligence when displaying data visualization charts, and relies on user input to standardized and preset content, resulting in a lack of chart conversion effect.
Using prediction algorithms and dynamic programming algorithms, by obtaining user historical data and inserting document data, determining the data relationship parameters of the original data of the chart, generating reasonable and intuitive chart objects, and inserting them using a preset chart object library.
Improves the success rate and accuracy of chart data conversion, and provides a more intelligent and automatic chart insertion service.
Smart Images

Figure CN119648860B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for processing inserted chart data based on a prediction algorithm. Background Art
[0002] With the development of visualization technology, the demand for data visualization is getting higher and higher. Visualization can make data more intuitive to users and clearly show the changes or relative relationships in the data. Therefore, institutions and enterprises have also begun to improve data visualization display technology. For example, some enterprises have begun to provide programming libraries that can automatically convert visual charts. However, when processing data visualization chart display, the existing technology still relies heavily on the normalization of user input data and the content in its own preset visualization object library. Most of them can only realize chart conversion based on preset simple conversion rules. The degree of intelligence is general and the conversion effect is lacking. It can be seen that the existing technology has defects that need to be solved urgently. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for processing inserted chart data based on a prediction algorithm, which can determine more reasonable and intuitive chart objects with the help of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide users with more intelligent and automatic chart insertion services.
[0004] In order to solve the above technical problems, the first aspect of the present invention discloses a method for processing inserted chart data based on a prediction algorithm, the method comprising:
[0005] Obtain the original chart data to be converted and the inserted document data input by the target user;
[0006] Based on the data prediction algorithm, predict the data relationship parameters corresponding to the original data of the chart according to the user history data of the target user;
[0007] Based on a dynamic programming algorithm, determining an object composition strategy corresponding to the original data of the chart according to the inserted document data and the data relationship parameters;
[0008] According to the object composition strategy and at least one preset chart object library, chart object data corresponding to the chart original data is generated; the chart object data is used to be inserted into the insertion document data.
[0009] As an optional embodiment, in the first aspect of the present invention, the data relationship parameters include data types, data type quantities, data type relationships, data value relationships and data relationship themes corresponding to different data parts of the original data of the chart.
[0010] As an optional implementation, in the first aspect of the present invention, the data prediction algorithm predicts the data relationship parameters corresponding to the original chart data according to the user historical data of the target user, including:
[0011] Input the original chart data into the trained data normalization prediction model to obtain the corresponding normalization parameters; the data normalization prediction model is trained by a training data set including a plurality of original training chart data and corresponding data specification expression annotations;
[0012] Judge whether the normalization parameter is greater than a preset parameter threshold to obtain a judgment result;
[0013] When the judgment result is yes, input the original chart data into the trained data arrangement type prediction neural network to obtain the target data arrangement type corresponding to the original chart data;
[0014] When the judgment result is no, determine a plurality of preferred data arrangement types corresponding to the target user according to the historical chart selection record of the target user;
[0015] According to the data templates corresponding to the preferred data arrangement types and the original chart data, determine the target data arrangement type corresponding to the original chart data from the plurality of preferred data arrangement types;
[0016] According to the data classification and correspondence rules corresponding to the target data arrangement type, classify and correspond the data part of the original chart data to obtain the data relationship parameters corresponding to the original chart data.
[0017] As an optional implementation, in the first aspect of the present invention, the determining a plurality of preferred data arrangement types corresponding to the target user according to the historical chart selection record of the target user includes:
[0018] Obtain the historical chart selection record of the target user;
[0019] For each preset data arrangement type, count the record ratio corresponding to this data arrangement type in the historical chart selection record;
[0020] Sort all the data arrangement types according to the record ratio from large to small to obtain a type sequence;
[0021] Select the first preset number of data arrangement types in the type sequence and the record ratio is greater than the preset ratio threshold to obtain a plurality of preferred data arrangement types corresponding to the target user.
[0022] As an optional implementation, in the first aspect of the present invention, arranging the data template corresponding to the preference data arrangement type and the original chart data, and determining the target data arrangement type corresponding to the original chart data from multiple preference data arrangement types includes:
[0023] For each of the preference data arrangement types, determine the data template corresponding to this preference data arrangement type from a preset arrangement type data template library;
[0024] Calculate the data similarity between the data corresponding to this preference data arrangement type and the original chart data;
[0025] Calculate the weighted sum average between the data similarity and the record ratio corresponding to this preference data arrangement type to obtain the type priority parameter corresponding to this preference data arrangement type;
[0026] Determine the preference data arrangement type with the highest type priority parameter as the target data arrangement type corresponding to the original chart data.
[0027] As an optional implementation, in the first aspect of the present invention, based on the dynamic programming algorithm, determining the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters includes:
[0028] Determine the document parameters corresponding to the inserted document data; the document parameters include the document theme and the document type;
[0029] For each preset candidate graphic - text coherence prediction model, obtain the training data set corresponding to this candidate graphic - text coherence prediction model;
[0030] Calculate the parameter similarity between the document parameter annotation of the training document data in the training data set and the document parameters;
[0031] Determine the candidate graphic - text coherence prediction model with the highest parameter similarity as the target graphic - text coherence prediction model;
[0032] According to the data relationship parameters and the target graphic - text coherence prediction model, determine the objective function and constraints related to the inserted graphic - text coherence;
[0033] Based on the dynamic programming algorithm, perform iterative operations on the object composition plan according to the objective function and the constraints until an optimal object composition plan is obtained, so as to determine the object composition strategy corresponding to the original chart data; the object composition strategy includes the chart type, chart dimension, chart icon type, chart drawing parameters, and chart display position corresponding to different data parts of the original chart data.
[0034] As an optional implementation, in the first aspect of the present invention, the total number of types of the chart types corresponding to all data parts of the original chart data in the object composition scheme reaches the minimum in the objective function; the constraint conditions include:
[0035] The object composition scheme is obtained by inputting the original chart data and the data relationship parameters into a preset object prediction neural network; the object prediction neural network is trained by a training data set including a plurality of training original chart data and corresponding data relationship parameter annotations and chart object composition scheme annotations;
[0036] The output prediction probability of the object composition scheme in the object prediction neural network is greater than a preset probability threshold;
[0037] The graphic-text coherence corresponding to the object composition scheme is greater than a preset coherence threshold; the graphic-text coherence is predicted by inputting the object composition scheme and the document data within a preset data volume before and after the chart insertion position of the inserted document data into the target graphic-text coherence prediction model; the target graphic-text coherence prediction model is trained by a training data set including a plurality of training graphic-text document data and corresponding graphic-text coherence annotations.
[0038] As an optional implementation, in the first aspect of the present invention, generating the chart object data corresponding to the original chart data according to the object composition strategy and at least one preset chart object library includes:
[0039] For each preset chart object library, generating a corresponding chart generation instruction based on the code rule corresponding to the chart object library according to the object composition strategy; the chart object library is built based on Web Component technology or echart technology;
[0040] Sending the chart generation instruction to the communication interface corresponding to the chart object library to obtain candidate chart object data output by the chart object library;
[0041] Determining the chart integrity corresponding to the candidate chart object data based on the data object integrity algorithm;
[0042] Inputting the candidate chart object data and the document data within a preset data volume before and after the chart insertion position of the inserted document data into the target graphic-text coherence prediction model to obtain the coherence parameter corresponding to the candidate chart data;
[0043] Calculating the product of the chart integrity and the coherence parameter to obtain the chart priority parameter corresponding to the candidate chart data;
[0044] Among all the candidate chart object data output by all the said chart object libraries, the candidate chart object data with the highest chart priority parameter is determined as the chart object data corresponding to the said original chart data.
[0045] In a second aspect of the embodiments of the present invention, a processing system for inserted chart data based on a prediction algorithm is disclosed. The system includes:
[0046] An acquisition module, configured to acquire the original chart data to be converted and the inserted document data input by a target user;
[0047] A prediction module, configured to predict the data relationship parameters corresponding to the said original chart data based on a data prediction algorithm and according to the user historical data of the said target user;
[0048] A determination module, configured to determine the object composition strategy corresponding to the said original chart data based on a dynamic programming algorithm according to the said inserted document data and the said data relationship parameters;
[0049] A generation module, configured to generate the chart object data corresponding to the said original chart data according to the said object composition strategy and at least one preset chart object library; the said chart object data is used to be inserted into the said inserted document data.
[0050] As an optional implementation manner, in the second aspect of the present invention, the said data relationship parameters include the data types, the number of data types, the data type relationships, the data numerical relationships, and the data relationship topics corresponding to different data parts of the said original chart data.
[0051] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the said prediction module predicts the data relationship parameters corresponding to the said original chart data based on a data prediction algorithm and according to the user historical data of the said target user includes:
[0052] Input the said original chart data into a trained data normalization prediction model to obtain corresponding normalization parameters; the said data normalization prediction model is trained by a training data set including a plurality of training original chart data and corresponding data specification expression annotations;
[0053] Judge whether the said normalization parameters are greater than a preset parameter threshold to obtain a judgment result;
[0054] When the judgment result is yes, input the said original chart data into a trained data arrangement type prediction neural network to obtain the target data arrangement type corresponding to the said original chart data;
[0055] When the judgment result is negative, multiple preference data arrangement types corresponding to the target user are determined according to the historical chart selection records of the target user;
[0056] According to the data template corresponding to the preference data arrangement type and the original chart data, the target data arrangement type corresponding to the original chart data is determined from multiple preference data arrangement types;
[0057] According to the data classification and relationship correspondence rules corresponding to the target data arrangement type, the data part of the original chart data is classified and the relationship is corresponded to obtain the data relationship parameters corresponding to the original chart data.
[0058] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the prediction module determines multiple preference data arrangement types corresponding to the target user according to the historical chart selection records of the target user includes:
[0059] Obtain the historical chart selection records of the target user;
[0060] For each preset data arrangement type, count the record ratio corresponding to this data arrangement type in the historical chart selection records;
[0061] Sort all the data arrangement types from largest to smallest according to the record ratio to obtain a type sequence;
[0062] Select the first preset number of data arrangement types in the type sequence and the record ratio of which is greater than the preset ratio threshold to obtain multiple preference data arrangement types corresponding to the target user.
[0063] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the prediction module determines the target data arrangement type corresponding to the original chart data from multiple preference data arrangement types according to the data template corresponding to the preference data arrangement type and the original chart data includes:
[0064] For each of the preference data arrangement types, determine the data template corresponding to this preference data arrangement type from the preset arrangement type data template library;
[0065] Calculate the data similarity between the corresponding preference data arrangement type and the original chart data;
[0066] Calculate the weighted sum average between the data similarity and the record ratio corresponding to this preference data arrangement type to obtain the type priority parameter corresponding to this preference data arrangement type;
[0067] Determine the arrangement type of the preference data with the highest type preference parameter as the target data arrangement type corresponding to the original chart data.
[0068] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the determining module determines the object composition strategy corresponding to the original chart data based on the dynamic programming algorithm according to the inserted document data and the data relationship parameters includes:
[0069] Determine the document parameters corresponding to the inserted document data; the document parameters include the document theme and the document type;
[0070] For each preset candidate graphic-text coherence prediction model, obtain the training data set corresponding to the candidate graphic-text coherence prediction model;
[0071] Calculate the parameter similarity between the document parameter annotation of the training document data in the training data set and the document parameters;
[0072] Determine the candidate graphic-text coherence prediction model with the highest parameter similarity as the target graphic-text coherence prediction model;
[0073] According to the data relationship parameters and the target graphic-text coherence prediction model, determine the objective function and constraint conditions related to the inserted graphic-text coherence;
[0074] Based on the dynamic programming algorithm, perform iterative operations on the object composition scheme according to the objective function and the constraint conditions until an optimal object composition scheme is obtained, so as to determine the object composition strategy corresponding to the original chart data; the object composition strategy includes the chart types, chart dimensions, chart icon types, chart drawing parameters, and chart display positions corresponding to different data parts of the original chart data.
[0075] As an optional implementation manner, in the second aspect of the present invention, the objective function includes that the total number of types of the chart types corresponding to all data parts of the original chart data in the object composition scheme reaches the minimum; the constraint conditions include:
[0076] The object composition scheme is obtained by inputting the original chart data and the data relationship parameters into a preset object prediction neural network; the object prediction neural network is trained by a training data set including a plurality of training original chart data and corresponding data relationship parameter annotations and chart object composition scheme annotations;
[0077] The output prediction probability of the object composition scheme in the object prediction neural network is greater than a preset probability threshold;
[0078] The graphic coherence corresponding to the object composition scheme is greater than a preset coherence threshold; the graphic coherence is obtained by inputting the object composition scheme and the document data within a preset amount of data before and after the chart insertion position of the inserted document data into the target graphic coherence prediction model; the target graphic coherence prediction model is trained by a training data set including a plurality of training graphic document data and corresponding graphic coherence annotations.
[0079] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the generating module generates the chart object data corresponding to the chart raw data according to the object composition strategy and at least one preset chart object library includes:
[0080] For each preset chart object library, generate corresponding chart generation instructions according to the object composition strategy based on the code rules corresponding to the chart object library; the chart object library is built based on Web Component technology or echart technology;
[0081] Send the chart generation instructions to the communication interface corresponding to the chart object library to obtain candidate chart object data output by the chart object library;
[0082] Determine the chart integrity corresponding to the candidate chart object data based on the data object integrity algorithm;
[0083] Input the candidate chart object data and the document data within a preset amount of data before and after the chart insertion position of the inserted document data into the target graphic coherence prediction model to obtain the coherence parameter corresponding to the candidate chart data;
[0084] Calculate the product of the chart integrity and the coherence parameter to obtain the chart priority parameter corresponding to the candidate chart data;
[0085] Determine the candidate chart object data with the highest chart priority parameter among all the candidate chart object data output by all the chart object libraries as the chart object data corresponding to the chart raw data.
[0086] The third aspect of the present invention discloses another inserted chart data processing system based on a prediction algorithm, and the system includes:
[0087] A memory storing executable program code;
[0088] A processor coupled to the memory;
[0089] The processor calls the executable program code stored in the memory and executes some or all of the steps in the method for processing inserted chart data based on a prediction algorithm disclosed in the first aspect of the present invention.
[0090] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions which, when called, are used to execute some or all of the steps in the method for processing inserted chart data based on a prediction algorithm disclosed in the first aspect of the present invention.
[0091] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0092] The present invention can determine the data relationship parameters corresponding to the original chart data based on a data prediction algorithm, and then determine the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters, so as to finally generate the chart object data corresponding to the original chart data based on at least one preset chart object library and insert it into the inserted document data. Thus, more reasonable and intuitive chart objects can be determined by means of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings without creative efforts based on these drawings.
[0094] Figure 1 is a schematic flowchart of a method for processing inserted chart data based on a prediction algorithm disclosed in an embodiment of the present invention.
[0095] Figure 2 is a schematic structural diagram of a system for processing inserted chart data based on a prediction algorithm disclosed in an embodiment of the present invention.
[0096] Figure 3 is a schematic structural diagram of another system for processing inserted chart data based on a prediction algorithm disclosed in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0097] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present invention.
[0098] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or equipment.
[0099] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0100] The present invention discloses a method and system for processing inserted chart data based on a prediction algorithm, which can determine data relationship parameters corresponding to the original chart data based on a data prediction algorithm, and then determine an object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters, so as to finally generate chart object data corresponding to the original chart data based on at least one preset chart object library and insert it into the inserted document data, thereby being able to determine more reasonable and intuitive chart objects by means of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users. The following will be described in detail respectively.
[0101] Embodiment 1
[0102] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for processing inserted chart data based on a prediction algorithm disclosed in an embodiment of the present invention. Among them, Figure 1 the described method for processing inserted chart data based on a prediction algorithm can be applied to a data processing system / data processing device / data processing server (wherein, the server includes a local processing server or a cloud processing server). As Figure 1As shown in the figure, the method for processing inserted chart data based on a prediction algorithm may include the following operations:
[0103] 101. Obtain the original chart data to be converted and the inserted document data input by the target user.
[0104] 102. Based on the data prediction algorithm, predict the data relationship parameters corresponding to the original chart data according to the user historical data of the target user.
[0105] 103. Based on the dynamic programming algorithm, determine the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters.
[0106] 104. Generate the chart object data corresponding to the original chart data according to the object composition strategy and at least one preset chart object library.
[0107] Optionally, the chart object data is used to be inserted into the inserted document data.
[0108] It can be seen that the above invention embodiments can determine the data relationship parameters corresponding to the original chart data based on the data prediction algorithm, and then determine the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters, so as to finally generate the chart object data corresponding to the original chart data based on at least one preset chart object library to be inserted into the inserted document data, thereby being able to determine more reasonable and intuitive chart objects with the help of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0109] As an optional embodiment, among the above steps, the data relationship parameters include the data types, the number of data types, the data type relationships, the data numerical relationships, and the data relationship themes corresponding to different data parts of the original chart data.
[0110] It can be seen that through the above optional embodiment, the content of the data relationship parameters is defined to comprehensively represent the data relationship characteristics in the original chart data, which is convenient for the subsequent determination of the object strategy and the generation of chart objects, and helps to implement the determination of more reasonable and intuitive chart objects with the help of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0111] As an optional embodiment, among the above steps, based on the data prediction algorithm, predicting the data relationship parameters corresponding to the original chart data according to the user historical data of the target user includes:
[0112] Input the original chart data into the trained data standardization prediction model to obtain the corresponding standardization parameters; optionally, the data standardization prediction model is trained through a training data set including multiple pieces of original chart data and corresponding data standard expression annotations;
[0113] Judge whether the standardization parameter is greater than the preset parameter threshold to obtain a judgment result;
[0114] When the judgment result is yes, input the original chart data into the trained data arrangement type prediction neural network to obtain the target data arrangement type corresponding to the original chart data;
[0115] When the judgment result is no, determine multiple preferred data arrangement types corresponding to the target user according to the historical chart selection records of the target user;
[0116] According to the data templates corresponding to the preferred data arrangement types and the original chart data, determine the target data arrangement type corresponding to the original chart data from multiple preferred data arrangement types;
[0117] According to the data classification and relationship correspondence rules corresponding to the target data arrangement type, classify and correspond the data part of the original chart data to obtain the data relationship parameters corresponding to the original chart data.
[0118] It can be seen that through the above optional embodiments, it is possible to first judge the standardization of the original data based on the prediction model of data annotation standardization, directly use the neural network for arrangement type prediction when it is standardized, and when it is not standardized, determine multiple preferred data arrangement types based on the historical chart selection records of the user, and then screen out the target data arrangement type to classify and correspond the data part of the original chart data to obtain the data relationship parameters, which is convenient for the subsequent determination of object strategies and the generation of chart objects, and helps to implement the determination of more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0119] As an optional embodiment, in the above steps, determining multiple preferred data arrangement types corresponding to the target user according to the historical chart selection records of the target user includes:
[0120] Obtain the historical chart selection records of the target user;
[0121] For each preset data arrangement type, count the record ratio corresponding to this data arrangement type in the historical chart selection records;
[0122] Sort all data arrangement types from large to small according to the record ratio to obtain a type sequence;
[0123] Filter out the first preset number of data arrangement types of the type sequence and record the data arrangement types with a proportion greater than the preset proportion threshold to obtain multiple preferred data arrangement types corresponding to the target user.
[0124] It can be seen that through the above optional embodiments, it is possible to screen out multiple preferred data arrangement types based on the proportion of different data arrangement types in the historical chart selection records of the target user, so as to more accurately determine the data relationship parameters in the subsequent process, facilitate the determination of subsequent object strategies and the generation of chart objects, and assist in determining more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide users with more intelligent and automatic chart insertion services.
[0125] As an optional embodiment, in the above steps, according to the data template corresponding to the preferred data arrangement type and the original chart data, determining the target data arrangement type corresponding to the original chart data from multiple preferred data arrangement types includes:
[0126] For each preferred data arrangement type, determine the data template corresponding to this preferred data arrangement type from the preset arrangement type data template library;
[0127] Calculate the data similarity between this preferred data arrangement type and the original chart data;
[0128] Calculate the weighted sum average of the data similarity and the record proportion corresponding to this preferred data arrangement type to obtain the type priority parameter corresponding to this preferred data arrangement type;
[0129] Determine the preferred data arrangement type with the highest type priority parameter as the target data arrangement type corresponding to the original chart data.
[0130] It can be seen that through the above optional embodiments, it is possible to obtain the target data arrangement type through the similarity calculation between the data template corresponding to the preferred data arrangement type and the original chart data and the weighted calculation combining the record proportion, so as to more accurately determine the data relationship parameters, facilitate the determination of subsequent object strategies and the generation of chart objects, and assist in determining more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide users with more intelligent and automatic chart insertion services.
[0131] As an optional embodiment, in the above steps, based on the dynamic programming algorithm, determining the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters includes:
[0132] Determine the document parameters corresponding to the inserted document data; optionally, the document parameters include the document theme and the document type;
[0133] For each preset candidate text - image coherence prediction model, obtain the training data set corresponding to the candidate text - image coherence prediction model;
[0134] Calculate the parameter similarity between the document parameter annotation and the document parameters of the training document data in the training data set;
[0135] Determine the candidate text - image coherence prediction model with the highest parameter similarity as the target text - image coherence prediction model;
[0136] According to the data relationship parameters and the target text - image coherence prediction model, determine the objective function and constraints related to the inserted text - image coherence;
[0137] Based on the dynamic programming algorithm, perform iterative operations on the object composition scheme according to the objective function and constraints until the optimal object composition scheme is obtained, so as to determine the object composition strategy corresponding to the original chart data; the object composition strategy includes the chart type, chart dimension, chart icon type, chart drawing parameters, and chart display position corresponding to different data parts of the original chart data.
[0138] It can be seen that through the above - mentioned optional embodiments, it is possible to determine the target text - image coherence prediction model based on the document theme and document type corresponding to the inserted document data, and based on this, determine the accurate objective function and constraints related to the inserted text - image coherence, so as to determine a more reasonable object strategy based on the dynamic programming algorithm, assist in realizing the determination of more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, improve the success rate and accuracy of chart data conversion, and provide a more intelligent and automatic chart insertion service for users.
[0139] As an optional embodiment, in the above steps, the objective function includes that the total number of types of chart types corresponding to all data parts of the original chart data in the object composition scheme reaches the minimum; the constraints include:
[0140] The object composition scheme is obtained by inputting the original chart data and data relationship parameters into a preset object prediction neural network; optionally, the object prediction neural network is trained by a training data set including multiple training original chart data and corresponding data relationship parameter annotations and chart object composition scheme annotations;
[0141] The output prediction probability of the object composition scheme in the object prediction neural network is greater than a preset probability threshold;
[0142] The graphic-text coherence corresponding to the object composition scheme is greater than a preset coherence threshold; optionally, the graphic-text coherence is obtained by inputting the object composition scheme and the document data within a preset amount of data before and after the chart insertion position of the inserted document data into a target graphic-text coherence prediction model; the target graphic-text coherence prediction model is trained by a training data set including a plurality of training graphic-text documents and corresponding graphic-text coherence annotations.
[0143] It can be seen that through the above optional embodiments, the content of the objective function and the constraint conditions is defined to effectively limit the convergence conditions of the dynamic programming algorithm based on the trained object prediction neural network and graphic-text coherence, so as to calculate a more reasonable object strategy, assist in implementing a more reasonable and intuitive chart object determined by the prediction algorithm and the dynamic programming algorithm, improve the success rate and accuracy of chart data conversion, and provide a more intelligent and automatic chart insertion service for users.
[0144] As an optional embodiment, in the above steps, according to the object composition strategy and at least one preset chart object library, generating chart object data corresponding to the chart original data includes:
[0145] For each preset chart object library, generating a corresponding chart generation instruction based on the code rule corresponding to the chart object library according to the object composition strategy; optionally, the chart object library is built based on Web Component technology or echart technology;
[0146] Sending the chart generation instruction to the communication interface corresponding to the chart object library to obtain candidate chart object data output by the chart object library;
[0147] Determining the chart integrity corresponding to the candidate chart object data based on the data object integrity algorithm;
[0148] Inputting the candidate chart object data and the document data within a preset amount of data before and after the chart insertion position of the inserted document data into the target graphic-text coherence prediction model to obtain the coherence parameter corresponding to the candidate chart data;
[0149] Calculating the product of the chart integrity and the coherence parameter to obtain the chart priority parameter corresponding to the candidate chart data;
[0150] Determining the candidate chart object data with the highest chart priority parameter among all candidate chart object data output by all chart object libraries as the chart object data corresponding to the chart original data.
[0151] It can be seen that through the above optional embodiments, after generating chart generation instructions corresponding to each chart object library based on code rules, the chart integrity and coherence parameters of the output candidate chart object data can be predicted to screen out the most suitable chart object data, so as to determine more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, improve the success rate and accuracy of chart data conversion, and provide users with more intelligent and automatic chart insertion services.
[0152] Embodiment 2
[0153] Please refer to Figure 2 , Figure 2 , which is a schematic structural diagram of an inserted chart data processing system based on a prediction algorithm disclosed in an embodiment of the present invention. Among them, Figure 2 The inserted chart data processing system described based on the prediction algorithm can be applied to a data processing system / data processing device / data processing server (wherein, the server includes a local processing server or a cloud processing server). As Figure 2 shown, the inserted chart data processing system based on the prediction algorithm may include:
[0154] An acquisition module 201, configured to acquire the original chart data to be converted and the inserted document data input by the target user.
[0155] A prediction module 202, configured to predict the data relationship parameters corresponding to the original chart data based on a data prediction algorithm and according to the user historical data of the target user.
[0156] A determination module 203, configured to determine the object composition strategy corresponding to the original chart data based on a dynamic programming algorithm according to the inserted document data and the data relationship parameters.
[0157] A generation module 204, configured to generate chart object data corresponding to the original chart data according to the object composition strategy and at least one preset chart object library.
[0158] Optionally, the chart object data is used to be inserted into the inserted document data.
[0159] It can be seen that the above embodiments of the present invention can determine the data relationship parameters corresponding to the original chart data based on a data prediction algorithm, and then determine the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters, so as to finally generate chart object data corresponding to the original chart data based on at least one preset chart object library to be inserted into the inserted document data, thereby being able to determine more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, improve the success rate and accuracy of chart data conversion, and provide users with more intelligent and automatic chart insertion services.
[0160] As an optional embodiment, the data relationship parameters include the data types corresponding to different data parts of the original chart data, the number of data types, the data type relationships, the data value relationships, and the data relationship themes.
[0161] It can be seen that through the above optional embodiments, the content of the data relationship parameters is defined to comprehensively characterize the data relationship features in the original chart data, facilitating the subsequent determination of object strategies and the generation of chart objects, and assisting in implementing the determination of more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide users with a more intelligent and automatic chart insertion service.
[0162] As an optional embodiment, the specific manner in which the prediction module predicts the data relationship parameters corresponding to the original chart data based on the data prediction algorithm according to the user historical data of the target user includes:
[0163] Input the original chart data into the trained data normalization prediction model to obtain the corresponding normalization parameters; optionally, the data normalization prediction model is trained through a training data set including a plurality of original chart data for training and corresponding data specification expression annotations;
[0164] Judge whether the normalization parameter is greater than a preset parameter threshold to obtain a judgment result;
[0165] When the judgment result is yes, input the original chart data into the trained data arrangement type prediction neural network to obtain the target data arrangement type corresponding to the original chart data;
[0166] When the judgment result is no, determine multiple preferred data arrangement types corresponding to the target user according to the historical chart selection records of the target user;
[0167] According to the data templates corresponding to the preferred data arrangement types and the original chart data, determine the target data arrangement type corresponding to the original chart data from the multiple preferred data arrangement types;
[0168] According to the data classification correspondence rules corresponding to the target data arrangement type, classify the data parts of the original chart data and correspond the relationships to obtain the data relationship parameters corresponding to the original chart data.
[0169] It can be seen that through the above optional embodiments, a prediction model based on data annotation standardization can first judge the standardization of the original data. When it is standardized, the neural network is directly used to predict the arrangement type. When it is not standardized, multiple preferred data arrangement types are determined based on the user's historical chart selection records, and then the target data arrangement type is screened out to classify the data part of the chart original data and establish the relationship correspondence to obtain the data relationship parameters, which is convenient for the subsequent determination of object strategies and the generation of chart objects, and helps to determine more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0170] As an optional embodiment, the specific manner in which the prediction module determines multiple preferred data arrangement types corresponding to the target user according to the historical chart selection records of the target user includes:
[0171] Obtain the historical chart selection records of the target user;
[0172] For each preset data arrangement type, count the record ratio corresponding to this data arrangement type in the historical chart selection records;
[0173] Sort all data arrangement types in descending order according to the record ratio to obtain a type sequence;
[0174] Screen out the first preset number of data arrangement types in the type sequence and the record ratio is greater than the preset ratio threshold to obtain multiple preferred data arrangement types corresponding to the target user.
[0175] It can be seen that through the above optional embodiments, multiple preferred data arrangement types can be screened out based on the proportion of different data arrangement types in the historical chart selection records of the target user, so as to more accurately determine the data relationship parameters in the subsequent process, which is convenient for the subsequent determination of object strategies and the generation of chart objects, and helps to determine more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0176] As an optional embodiment, the specific manner in which the prediction module determines the target data arrangement type corresponding to the chart original data from multiple preferred data arrangement types according to the data template corresponding to the preferred data arrangement type and the chart original data includes:
[0177] For each preferred data arrangement type, determine the data template corresponding to this preferred data arrangement type from the preset arrangement type data template library;
[0178] Calculate the data similarity between the corresponding preferred data arrangement type and the chart original data;
[0179] Calculate the weighted sum average between the data similarity and the record ratio corresponding to the preference data arrangement type, and obtain the type preference parameter corresponding to the preference data arrangement type;
[0180] Determine the preference data arrangement type with the highest type preference parameter as the target data arrangement type corresponding to the original chart data.
[0181] It can be seen that through the above optional embodiments, it is possible to obtain the target data arrangement type through the similarity calculation between the data template corresponding to the preference data arrangement type and the original chart data and the screening of the weighted calculation of the combined record ratio, so as to realize the determination of more accurate data relationship parameters, facilitate the determination of subsequent object strategies and the generation of chart objects, and assist in realizing the determination of more reasonable and intuitive chart objects by means of prediction algorithms and dynamic programming algorithms, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0182] As an optional embodiment, the specific manner in which the determination module determines the object composition strategy corresponding to the original chart data based on the dynamic programming algorithm according to the inserted document data and the data relationship parameters includes:
[0183] Determine the document parameters corresponding to the inserted document data; optionally, the document parameters include the document theme and the document type;
[0184] For each preset candidate text-graphic coherence prediction model, obtain the training data set corresponding to the candidate text-graphic coherence prediction model;
[0185] Calculate the parameter similarity between the document parameter annotation and the document parameters of the training document data in the training data set;
[0186] Determine the candidate text-graphic coherence prediction model with the highest parameter similarity as the target text-graphic coherence prediction model;
[0187] According to the data relationship parameters and the target text-graphic coherence prediction model, determine the objective function and constraint conditions related to the inserted text-graphic coherence;
[0188] Based on the dynamic programming algorithm, perform iterative operations on the object composition scheme according to the objective function and constraint conditions until the optimal object composition scheme is obtained, so as to determine the object composition strategy corresponding to the original chart data; the object composition strategy includes the chart type, chart dimension, chart icon type, chart drawing parameters, and chart display position corresponding to different data parts of the original chart data.
[0189] It can be seen that through the above optional embodiments, a target graphic-text coherence prediction model can be determined based on the document theme and document type corresponding to the inserted document data, and based on this, an accurate calculation objective function and constraint conditions related to the coherence of the inserted graphics and text can be determined to determine a more reasonable object strategy based on the dynamic programming algorithm, assisting in determining a more reasonable and intuitive chart object by means of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion, and provide a more intelligent and automatic chart insertion service for users.
[0190] As an optional embodiment, the objective function includes minimizing the total number of types of chart types corresponding to all data parts of the original chart data in the object composition scheme; the constraint conditions include:
[0191] The object composition scheme is obtained by inputting the original chart data and data relationship parameters into a preset object prediction neural network; optionally, the object prediction neural network is trained by a training data set including multiple pieces of training original chart data and corresponding data relationship parameter annotations and chart object composition scheme annotations.
[0192] The object composition scheme has an output prediction probability greater than a preset probability threshold in the object prediction neural network.
[0193] The graphic-text coherence corresponding to the object composition scheme is greater than a preset coherence threshold; optionally, the graphic-text coherence is obtained by inputting the object composition scheme and the document data within a preset data volume before and after the chart insertion position of the inserted document data into the target graphic-text coherence prediction model for prediction; the target graphic-text coherence prediction model is trained by a training data set including multiple pieces of training graphic-text document data and corresponding graphic-text coherence annotations.
[0194] It can be seen that through the above optional embodiments, the content of the objective function and constraint conditions is defined to effectively limit the calculation convergence conditions of the dynamic programming algorithm based on the trained object prediction neural network and graphic-text coherence, so as to calculate a more reasonable object strategy, assisting in determining a more reasonable and intuitive chart object by means of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion, and provide a more intelligent and automatic chart insertion service for users.
[0195] As an optional embodiment, the specific manner in which the generation module generates the chart object data corresponding to the original chart data according to the object composition strategy and at least one preset chart object library includes:
[0196] For each preset chart object library, generate corresponding chart generation instructions based on the object composition strategy according to the code rules corresponding to the chart object library; optionally, the chart object library is built based on Web Component technology or echart technology;
[0197] Send the chart generation instructions to the communication interface corresponding to the chart object library to obtain candidate chart object data output by the chart object library;
[0198] Determine the chart integrity corresponding to the candidate chart object data based on the data object integrity algorithm;
[0199] Input the candidate chart object data and the document data within the preset data volume before and after the chart insertion position of the inserted document data into the target graphic and text coherence prediction model to obtain the coherence parameter corresponding to the candidate chart data;
[0200] Calculate the product of the chart integrity and the coherence parameter to obtain the chart priority parameter corresponding to the candidate chart data;
[0201] Determine the candidate chart object data with the highest chart priority parameter among all the candidate chart object data output by all chart object libraries as the chart object data corresponding to the original chart data.
[0202] It can be seen that through the above optional embodiments, after generating the chart generation instructions corresponding to each chart object library based on the code rules, it is possible to predict the chart integrity and coherence parameters of the output candidate chart object data, so as to screen out the most suitable chart object data, and realize determining a more reasonable and intuitive chart object by means of the prediction algorithm and the dynamic programming algorithm, so as to improve the success rate and accuracy of chart data conversion and provide a more intelligent and automatic chart insertion service for users.
[0203] Embodiment III
[0204] Please refer to Figure 3 , Figure 3 which is another chart data insertion processing system based on the prediction algorithm disclosed in the embodiments of the present invention. Figure 3 The described chart data insertion processing system based on the prediction algorithm is applied to a data processing system / data processing device / data processing server (wherein, the server includes a local processing server or a cloud processing server). As Figure 3 shown, the chart data insertion processing system based on the prediction algorithm may include:
[0205] A memory 301 storing executable program code;
[0206] A processor 302 coupled to the memory 301;
[0207] Among them, the processor 302 calls the executable program code stored in the memory 301 to execute the steps of the method for processing inserted chart data based on the prediction algorithm described in the first embodiment.
[0208] Embodiment 4
[0209] An embodiment of the present invention discloses a computer-readable storage medium that stores a computer program for electronic data exchange. Among them, the computer program causes a computer to execute the steps of the method for processing inserted chart data based on the prediction algorithm described in the first embodiment.
[0210] Embodiment 5
[0211] An embodiment of the present invention discloses a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the method for processing inserted chart data based on the prediction algorithm described in the first embodiment.
[0212] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily have to be performed in the particular order or continuous order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0213] The systems, devices, modules, or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0214] For convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing this specification, the functions of each unit may be implemented in one or more software and / or hardware.
[0215] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, the embodiments of this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0216] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of this specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0217] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0218] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0219] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0220] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0221] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0222] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0223] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0224] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0225] Finally, it should be noted that what is disclosed by a method and system for processing inserted chart data based on a prediction algorithm disclosed in the embodiments of the present invention is only the preferred embodiments of the present invention, and is only used to illustrate the technical solutions of the present invention, rather than limiting it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing inserted chart data based on a prediction algorithm, characterized in that, The method includes: Obtaining the original chart data to be converted and the inserted document data input by the target user; Based on the data prediction algorithm, predicting the data relationship parameters corresponding to the original chart data according to the user historical data of the target user; Based on the dynamic programming algorithm, determining the object composition strategy corresponding to the original chart data according to the inserted document data and the data relationship parameters, including: Determining the document parameters corresponding to the inserted document data; the document parameters include the document theme and the document type; For each candidate graphic-text coherence prediction model preset, obtaining the training data set corresponding to the candidate graphic-text coherence prediction model; Calculating the parameter similarity between the document parameter annotation of the training document data in the training data set and the document parameters; Determining the candidate graphic-text coherence prediction model with the highest parameter similarity as the target graphic-text coherence prediction model; According to the data relationship parameters and the target graphic-text coherence prediction model, determining the objective function and the constraints related to the inserted graphic-text coherence, where the objective function includes minimizing the total number of types of the chart types corresponding to all data parts of the original chart data in the object composition plan; the constraints include: The object composition plan is obtained by inputting the original chart data and the data relationship parameters into a preset object prediction neural network for output; The output prediction probability of the object composition plan in the object prediction neural network is greater than a preset probability threshold; The graphic-text coherence corresponding to the object composition plan is greater than a preset coherence threshold; Based on the dynamic programming algorithm, performing iterative operations on the object composition plan according to the objective function and the constraints until an optimal object composition plan is obtained, so as to determine the object composition strategy corresponding to the original chart data; the object composition strategy includes the chart types, chart dimensions, chart icon types, chart drawing parameters, and chart display positions corresponding to different data parts of the original chart data; Generating the chart object data corresponding to the original chart data according to the object composition strategy and at least one preset chart object library; the chart object data is used to be inserted into the inserted document data.
2. The method for processing inserted chart data based on a prediction algorithm according to claim 1, wherein The data relationship parameters include the data types, the number of data types, the data type relationships, the data numerical relationships, and the data relationship themes corresponding to different data parts of the original chart data.
3. The method for processing inserted chart data based on a prediction algorithm according to claim 2, wherein The predicting the data relationship parameters corresponding to the original chart data according to the user historical data of the target user based on the data prediction algorithm includes: Inputting the original chart data into a trained data standardization prediction model to obtain the corresponding standardization parameters; the data standardization prediction model is trained by a training data set including a plurality of training original chart data and corresponding data standard expression annotations; Judging whether the standardization parameters are greater than a preset parameter threshold to obtain a judgment result; When the judgment result is yes, inputting the original chart data into a trained data arrangement type prediction neural network to obtain the target data arrangement type corresponding to the original chart data; When the judgment result is negative, multiple preference data arrangement types corresponding to the target user are determined according to the historical chart selection records of the target user; According to the data template corresponding to the preference data arrangement type and the original chart data, the target data arrangement type corresponding to the original chart data is determined from multiple preference data arrangement types; According to the data classification and correspondence rules corresponding to the target data arrangement type, the data part of the original chart data is classified and the relationships are corresponded to obtain the data relationship parameters corresponding to the original chart data.
4. The method for processing inserted chart data based on a prediction algorithm according to claim 3, wherein The determining, according to the historical chart selection records of the target user, multiple preference data arrangement types corresponding to the target user includes: Obtain the historical chart selection records of the target user; For each preset data arrangement type, count the record ratio corresponding to this data arrangement type in the historical chart selection records; Sort all the data arrangement types according to the record ratio from large to small to obtain a type sequence; Select the first preset number of data arrangement types in the type sequence and those data arrangement types with a record ratio greater than a preset ratio threshold to obtain multiple preference data arrangement types corresponding to the target user.
5. The method for processing inserted chart data based on a prediction algorithm according to claim 4, wherein The determining, according to the data template corresponding to the preference data arrangement type and the original chart data, the target data arrangement type corresponding to the original chart data from multiple preference data arrangement types includes: For each preference data arrangement type, determine the data template corresponding to this preference data arrangement type from a preset arrangement type data template library; Calculate the data similarity between this preference data arrangement type and the original chart data; Calculate the weighted sum average between the data similarity and the record ratio corresponding to this preference data arrangement type to obtain the type priority parameter corresponding to this preference data arrangement type; Determine the preference data arrangement type with the highest type priority parameter as the target data arrangement type corresponding to the original chart data.
6. The method for processing inserted chart data based on a prediction algorithm according to claim 1, wherein The object prediction neural network is trained by a training data set including multiple training original chart data and corresponding data relationship parameter annotations and chart object composition scheme annotations; The graphic-text coherence is obtained by inputting the object composition scheme and the document data within a preset amount of data before and after the chart insertion position of the inserted document data into the target graphic-text coherence prediction model for prediction; the target graphic-text coherence prediction model is trained by a training data set including multiple training graphic-text document data and corresponding graphic-text coherence annotations.
7. The method for processing inserted chart data based on a prediction algorithm according to claim 1, wherein The generating, according to the object composition strategy and at least one preset chart object library, the chart object data corresponding to the original chart data includes: For each preset chart object library, generate corresponding chart generation instructions based on the code rules corresponding to this chart object library according to the object composition strategy; the chart object library is built based on Web Component technology or echart technology. Send the chart generation instruction to the communication interface corresponding to the chart object library to obtain candidate chart object data output by the chart object library; Determine the chart integrity corresponding to the candidate chart object data based on the data object integrity algorithm; Input the candidate chart object data and the document data within a preset amount of data before and after the chart insertion position of the inserted document data into the target graphic-text coherence prediction model to obtain the coherence parameter corresponding to the candidate chart data; Calculate the product of the chart integrity and the coherence parameter to obtain the chart priority parameter corresponding to the candidate chart data; Determine the candidate chart object data with the highest chart priority parameter among all the candidate chart object data output by all the chart object libraries as the chart object data corresponding to the chart original data.
8. An inserted chart data processing system based on a prediction algorithm, characterized in that, The system includes: An acquisition module for acquiring the chart original data to be converted and the inserted document data input by the target user; A prediction module for predicting the data relationship parameter corresponding to the chart original data based on the data prediction algorithm according to the user historical data of the target user; A determination module for determining the object composition strategy corresponding to the chart original data based on the dynamic programming algorithm according to the inserted document data and the data relationship parameter, including: Determine the document parameters corresponding to the inserted document data; the document parameters include the document theme and the document type; For each preset candidate graphic-text coherence prediction model, obtain the training data set corresponding to the candidate graphic-text coherence prediction model; Calculate the parameter similarity between the document parameter annotation of the training document data in the training data set and the document parameters; Determine the candidate graphic-text coherence prediction model with the highest parameter similarity as the target graphic-text coherence prediction model; According to the data relationship parameter and the target graphic-text coherence prediction model, determine the objective function and the constraints related to the inserted graphic-text coherence. The objective function includes minimizing the total number of types of the chart types corresponding to all data parts of the chart original data in the object composition scheme; the constraints include: The object composition scheme is obtained by inputting the chart original data and the data relationship parameter into a preset object prediction neural network for output; The output prediction probability of the object composition scheme in the object prediction neural network is greater than a preset probability threshold; The graphic-text coherence corresponding to the object composition scheme is greater than a preset coherence threshold; Based on the dynamic programming algorithm, perform iterative operations on the object composition scheme according to the objective function and the constraints until an optimal object composition scheme is obtained, and determine it as the object composition strategy corresponding to the chart original data; the object composition strategy includes the chart types, chart dimensions, chart icon types, chart drawing parameters, and chart display positions corresponding to different data parts of the chart original data. A generation module, configured to generate chart object data corresponding to the chart raw data according to the object composition policy and at least one preset chart object library; the chart object data is used to be inserted into the inserted document data.
9. An inserted chart data processing system based on a prediction algorithm, characterized in that, The system includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory and executes the method for processing inserted chart data based on a prediction algorithm according to any one of claims 1-7.
Citation Information
Patent Citations
Document generation method and system based on dynamic data
CN113449502A
Document connection coherence evaluation method and device, equipment and storage medium
CN116562263A