Chart generation method and device, electronic equipment and storage medium
By automatically determining the chart templates and data and using deep learning models to generate charts, the problems of low efficiency and poor accuracy of traditional chart generation methods are solved, and efficient and accurate automated chart generation is achieved.
Patent Information
- Application Number
- CN202510065561.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-06-06
AI Technical Summary
Traditional chart generation methods rely on user manual operations, resulting in high labor and time costs, low efficiency and difficult to guarantee.
By obtaining the requirements description information entered by the user, the target chart template and data are automatically determined, and the corresponding target chart is generated using the deep learning model.
Automated chart generation is realized, saving labor and time costs, improving processing efficiency and chart accuracy.
Smart Images

Figure CN120107400A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the fields of deep learning, generative large models, natural language processing, and knowledge graphs, and specifically to graph generation methods, devices, electronic devices, and storage media. Background Art
[0002] In practical applications, users often need to generate charts. The traditional generation method mainly relies on manual operation of users, which requires a lot of manpower and time costs, is inefficient, and the accuracy is difficult to guarantee. Summary of the invention
[0003] The present disclosure provides a chart generation method, device, electronic device and storage medium.
[0004] A method for generating a chart, comprising:
[0005] Obtaining requirement description information input by the first user;
[0006] Determine the target chart template used for this chart generation according to the requirement description information;
[0007] Determine the target chart data required for this chart generation according to the requirement description information;
[0008] A target chart corresponding to the requirement description information is generated according to the target chart data and the target chart template.
[0009] A chart generating device comprises: an information acquiring module, a template determining module, a data determining module and a chart generating module;
[0010] The information acquisition module is used to acquire the demand description information input by the first user;
[0011] The template determination module is used to determine the target chart template used for current chart generation according to the requirement description information;
[0012] The data determination module is used to determine the target chart data required for this chart generation according to the requirement description information;
[0013] The chart generation module is used to generate a target chart corresponding to the requirement description information according to the target chart data and the target chart template.
[0014] An electronic device, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.
[0018] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method as described above.
[0019] A computer program product comprises a computer program / instruction, wherein the computer program / instruction implements the method described above when executed by a processor.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0022] Figure 1 This is a flowchart of the first embodiment of the chart generating method disclosed in the present invention;
[0023] Figure 2 This is a flow chart of a second embodiment of the chart generating method disclosed in the present invention;
[0024] Figure 3 It is a schematic diagram of the composition structure of the first embodiment 300 of the chart generating device described in the present disclosure;
[0025] Figure 4 It is a schematic diagram of the composition structure of the second embodiment 400 of the chart generating device described in the present disclosure;
[0026] Figure 5 A schematic block diagram of an electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0028] In addition, it should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0029] Figure 1 FIG. 1 is a flow chart of the first embodiment of the method for generating a chart according to the present disclosure. Figure 1 As shown, the following specific implementation methods are included.
[0030] In step 101, demand description information input by a first user is obtained.
[0031] In step 102, a target chart template used for this chart generation is determined according to the requirement description information.
[0032] In step 103, target chart data required for this chart generation is determined according to the requirement description information.
[0033] In step 104, a target chart corresponding to the requirement description information is generated according to the target chart data and the target chart template.
[0034] By adopting the scheme described in the above method embodiment, the first user only needs to input the requirement description information, and the corresponding target chart template and target chart data can be automatically determined subsequently, and the required target chart can be generated according to the target chart data and the target chart template, thereby saving manpower and time costs, improving processing efficiency, and improving the accuracy of the obtained target chart, etc.
[0035] Charts generally refer to graphic structures displayed on the screen that can intuitively display the attributes of statistical information (time, quantity, etc.), and play a key role in knowledge mining and intuitive and vivid perception of information. They may include line charts, bar charts, radar charts, pie charts, etc.
[0036] The first user can enter the demand description information through text or voice (which needs to be converted into text later), such as: Help me analyze and compare the box office situation of domestic films in different months of 2024.
[0037] In some embodiments of the present disclosure, after the requirement description information is acquired, a semantic analysis may be performed on the requirement description information, and in response to determining that a target chart needs to be generated based on the semantic analysis result, a target chart template may be determined based on the requirement description information.
[0038] In actual applications, the requirement description information input by the first user may not be the requirement description information for chart generation due to some reasons. If this is the case, the processing can be terminated directly to reduce unnecessary resource consumption. Otherwise, Figure 1 The subsequent processing is performed in the manner shown.
[0039] In addition, in some embodiments of the present disclosure, when determining the target chart template based on the requirement description information, the chart template type used for this chart generation can be first determined from the chart template library based on the requirement description information. The chart template library stores different types of candidate chart templates, each type corresponding to at least one candidate chart template. Different candidate chart templates of the same type may refer to template styles that differ. Furthermore, the target chart template can be determined from the candidate chart templates corresponding to the determined chart template type.
[0040] For example, assuming that the chart template library includes 8 different chart template types, including line charts, bar charts, radar charts, pie charts, etc., and assuming that each chart template type includes 3 candidate chart templates, then after obtaining the requirement description information, you can first determine the chart template type used for this chart generation, assuming it is a line chart, and then select one from the 3 candidate chart templates of the line chart type as the target chart template.
[0041] There are no restrictions on how to determine the type of chart template used for this chart generation and how to select the target chart template. For example, the demand description information can be classified using a classification model, and the type of chart template used for this chart generation can be determined based on the classification result. Alternatively, the type of chart template used for this chart generation can be determined directly based on the semantic analysis result of the demand description information. The classification model can be a large model obtained by pre-training. For another example, one of the candidate chart templates of the line chart type can be randomly selected as the required target chart template.
[0042] Through the above processing, the target chart template corresponding to the requirement description information can be determined efficiently and accurately, thus laying a good foundation for subsequent processing.
[0043] In some embodiments of the present disclosure, a chart template library may be generated in the following manner: according to different chart data description information input by the second user, the corresponding initial charts are generated using the first generation model respectively, each initial chart template is determined according to the initial chart, and the following processing is performed for each initial chart template: in response to obtaining an optimization processing instruction issued by the second user for the initial chart template, the initial chart template is optimized according to the optimization processing instruction, and the optimized initial chart template is determined as a candidate chart template; in response to not obtaining the optimization processing instruction, the initial chart template is directly determined as a candidate chart template, and the chart template library is composed of each candidate chart template. The first generation model may be a large model obtained by pre-training.
[0044] For example, the chart data description information may be: help me generate a pie chart, and the specific data used include... etc. For the chart data description information, the first generation model may be used to generate an initial chart of the pie chart type. Accordingly, by inputting different chart data description information, different initial charts may be generated using the first generation model, that is, a large model may be used to produce diverse chart data, thereby forming a data flywheel effect and continuously expanding the chart template library.
[0045] Among them, each initial chart template can be determined based on each initial chart. For example, the chart template corresponding to the initial chart with better quality selected by the second user can be determined as the initial chart template, and the optimization processing instructions issued by the second user for the initial chart template can be obtained. The initial chart template is optimized according to the optimization processing instructions, that is, secondary beautification processing is performed, thereby improving the quality of the obtained candidate chart templates, etc.
[0046] In conclusion, through the above processing, a chart template library can be pre-constructed, thereby providing strong support for the subsequent determination of the target chart template.
[0047] According to the requirement description information input by the first user, the target chart data required for this chart generation can also be determined. In some embodiments of the present disclosure, a search keyword can be first determined according to the requirement description information, and data can be searched in a predetermined site according to the search keyword to obtain an initial search result, and then a target search result can be screened from the initial search result, and then the target chart data can be determined according to the target search result.
[0048] There is no restriction on how to determine the search keywords from the demand description information. For example, key information can be extracted from the search demand description information, and the extracted key information can be determined as the search keywords.
[0049] Data can be searched in a predetermined site according to the search keyword to obtain initial search results. For example, the entire network data can be searched in real time according to the search keyword, and the first L search results from the search results from different sites can be determined as the initial search results, where L is a positive integer.
[0050] Then, the target search results can be screened out from the initial search results. In some embodiments of the present disclosure, the following processing can be performed for each initial search result: the initial search result is scored from M different dimensions, where M is a positive integer greater than 1, and the comprehensive score of the initial search result is determined by combining the M scores, and the initial search results are sorted in descending order according to the value of the comprehensive score, and the initial search results in the first N positions after sorting are determined as the target search results, where N is a positive integer greater than 1, and N is less than the number of initial search results. Among them, the specific values of M and N can be determined according to actual needs.
[0051] For example, assuming that the number of initial search results is 30, then for each initial search result, it can be scored from multiple dimensions including content quality and reliability of the source site, and the comprehensive score of the initial search result can be determined by combining the scores corresponding to the multiple dimensions. In this way, after obtaining the comprehensive scores of the 30 initial search results, the 30 initial search results can be sorted in descending order according to the values of the comprehensive scores, and the initial search results that are in the top 10 after sorting can be determined as the target search results.
[0052] In the above processing method, the first L search results from different sites are determined as the initial search results, and the target search results are determined by sorting the initial search results, which is equivalent to performing a secondary fine sorting on the initial search results after obtaining the roughly sorted initial search results, that is, utilizing the strategy of rough sorting + fine sorting, thereby providing highly timely and professional online knowledge for the subsequent target chart generation, thereby improving the accuracy of the generated target chart, etc.
[0053] According to the target search results, the target chart data can be further determined. In some embodiments of the present disclosure, each target search result can be input into a fusion model to obtain an output information fusion result, and then the target chart data can be extracted from the information fusion result according to the demand description information and the target chart template.
[0054] Each target retrieval result is relatively independent data from each other. To facilitate subsequent processing, each target retrieval result can be input into a fusion model to obtain an output information fusion result. The fusion model can be a large model obtained by pre-training. Then, the target chart data can be extracted from the information fusion result according to the demand description information and the target chart template, that is, the key information required to generate the target chart can be extracted from the information fusion result, that is, professional chart data with strong real-time and accuracy can be extracted, and the impact of irrelevant data on subsequent processing can be reduced.
[0055] In some embodiments of the present disclosure, after respectively acquiring the target chart data and the target chart template, the target chart can be generated using a second generation model according to the target chart data and the target chart template. The second generation model can be a large model obtained by pre-training.
[0056] For example, the layout of the target chart template can be adaptively determined based on the target chart data. Assuming that the target chart template is a pie chart, the number of sectors included in the pie chart and the size of each sector can be determined, and the target chart can be generated accordingly, thereby achieving end-to-end professional chart generation capabilities.
[0057] In some embodiments of the present disclosure, chart content summary information corresponding to the target chart may also be generated, and the target chart and the chart content summary information may be displayed together.
[0058] In addition, in some embodiments of the present disclosure, the third generation model can be used to generate chart content summary information based on the target chart data and the target chart template. Chart content summary information refers to an explanatory summary description of the target chart. The third generation model and the second generation model can be the same model, so that the chart content summary information can be generated while generating the target chart, and then the target chart and the chart content summary information can be rendered together and displayed to the first user, so as to facilitate the first user to view and understand. Alternatively, the third generation model can also be a large model different from the second generation model.
[0059] Combined with the above introduction, Figure 2 FIG. 1 is a flow chart of the second embodiment of the method for generating a chart according to the present disclosure. Figure 2 As shown, the following specific implementation methods are included.
[0060] In step 201, a chart template library is constructed.
[0061] For example, the first generation model can be used to generate corresponding initial charts based on different chart data description information input by the second user, and each initial chart template can be determined based on the initial chart. Then, the following processing can be performed on each initial chart template: in response to obtaining an optimization processing instruction issued by the second user for the initial chart template, the initial chart template is optimized according to the optimization processing instruction, and the optimized initial chart template is determined as a candidate chart template; in response to not obtaining the optimization processing instruction, the initial chart template is directly determined as a candidate chart template, and the candidate chart templates are used to form a chart template library.
[0062] In step 202, the requirement description information input by the first user is obtained, and semantic analysis is performed on the requirement description information.
[0063] In step 203, it is determined whether a target graph needs to be generated according to the semantic analysis result. If so, step 204 is executed; otherwise, the process ends.
[0064] In step 204, based on the requirement description information, a target chart template used for this chart generation is determined from the chart template library.
[0065] For example, the type of chart template used for generating the current chart may be determined first, and then the target chart template may be determined from the candidate chart templates corresponding to the determined chart template type.
[0066] The chart template library may store different types of candidate chart templates, and each type corresponds to at least one candidate chart template.
[0067] In step 205, a search keyword is determined according to the demand description information, and data is searched in a predetermined site according to the search keyword to obtain an initial search result.
[0068] In step 206, target search results are screened out from the initial search results.
[0069] For example, the following processing can be performed for each initial search result: score the initial search result from M different dimensions, where M is a positive integer greater than 1; determine the comprehensive score of the initial search result based on the M scores; sort the initial search results in descending order of the comprehensive score; determine the initial search results that are in the top N positions after sorting as the target search results; where N is a positive integer greater than 1, and N is less than the number of initial search results.
[0070] In step 207, target chart data is determined according to the target search result.
[0071] For example, each target search result can be input into the fusion model to obtain an output information fusion result, and the target chart data can be extracted from the information fusion result according to the demand description information and the target chart template.
[0072] In step 208, a target chart and chart content summary information corresponding to the target chart are generated according to the target chart data and the target chart template, and are displayed to the first user together, and then the process ends.
[0073] For example, the second generation model may be used to generate a target chart and chart content summary information corresponding to the target chart.
[0074] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the described order of actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure. In addition, for parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0075] In addition, the demand description information, chart data description information, chart templates, and chart data in the embodiments of the present disclosure are not for a specific user and do not reflect the personal information of a specific user. In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0076] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0077] Figure 3 FIG. 3 is a schematic diagram of the composition structure of the first embodiment 300 of the chart generating device described in the present disclosure. Figure 3 As shown, it includes: an information acquisition module 301 , a template determination module 302 , a data determination module 303 and a chart generation module 304 .
[0078] The information acquisition module 301 is used to acquire the requirement description information input by the first user.
[0079] The template determination module 302 is used to determine the target chart template used for this chart generation according to the requirement description information.
[0080] The data determination module 303 is used to determine the target chart data required for this chart generation according to the requirement description information.
[0081] The chart generation module 304 is used to generate a target chart corresponding to the requirement description information according to the target chart data and the target chart template.
[0082] By adopting the scheme described in the above-mentioned device embodiment, the first user only needs to input the demand description information, and the corresponding target chart template and target chart data can be automatically determined subsequently, and the required target chart can be generated according to the target chart data and the target chart template, thereby saving manpower and time costs, improving processing efficiency, and improving the accuracy of the obtained target chart, etc.
[0083] The template determination module 302 may perform semantic analysis on the requirement description information, and in response to determining that a target chart needs to be generated according to the semantic analysis result, may determine a target chart template according to the requirement description information.
[0084] In addition, when the template determination module 302 determines the target chart template according to the requirement description information, it can first determine the chart template type used for this chart generation from the chart template library according to the requirement description information. The chart template library stores different types of candidate chart templates, each type corresponding to at least one candidate chart template. Different candidate chart templates of the same type may refer to template styles that differ. Furthermore, the target chart template can be determined from the candidate chart templates corresponding to the determined chart template type.
[0085] Figure 4 FIG. 4 is a schematic diagram of the structure of the second embodiment 400 of the chart generating device described in the present disclosure. Figure 4 As shown, it includes: an information acquisition module 301 , a template determination module 302 , a data determination module 303 , a chart generation module 304 and a pre-processing module 305 .
[0086] The information acquisition module 301, the template determination module 302, the data determination module 303 and the chart generation module 304 are Figure 3 The same is true in the illustrated embodiment.
[0087] The preprocessing module 305 is used to generate corresponding initial charts using the first generation model according to different chart data description information input by the second user, determine each initial chart template according to the initial chart, and perform the following processing on each initial chart template: in response to obtaining an optimization processing instruction issued by the second user for the initial chart template, optimize the initial chart template according to the optimization processing instruction, and determine the optimized initial chart template as a candidate chart template; in response to not obtaining the optimization processing instruction, directly determine the initial chart template as a candidate chart template, and use the candidate chart templates to form a chart template library.
[0088] In addition, the data determination module 303 can first determine the search keywords based on the demand description information, and can perform data search in the predetermined site according to the search keywords to obtain initial search results, and then can filter out target search results from the initial search results, and then can determine the target chart data based on the target search results.
[0089] Specifically, the data determination module 303 can perform the following processing for each initial search result: score the initial search result from M different dimensions, where M is a positive integer greater than 1, determine the comprehensive score of the initial search result based on the M scores, sort the initial search results in descending order of the comprehensive score values, and determine the initial search results that are in the top N positions after sorting as the target search results, where N is a positive integer greater than 1, and N is less than the number of initial search results.
[0090] In addition, the data determination module 303 may input each target search result into the fusion model to obtain an output information fusion result, and then extract the target chart data from the information fusion result according to the demand description information and the target chart template.
[0091] After respectively acquiring the target chart data and the target chart template, the chart generating module 304 may generate the target chart using the second generating model according to the target chart data and the target chart template.
[0092] In addition, the chart generation module 304 can also generate chart content summary information corresponding to the target chart, and can display the target chart and the chart content summary information together. The chart generation module 304 can generate the chart content summary information based on the target chart data and the target chart template using the third generation model.
[0093] The specific working processes of the above-mentioned device embodiments can refer to the relevant descriptions in the above-mentioned method embodiments and will not be repeated here.
[0094] In summary, by adopting the scheme described in the present invention, end-to-end large model chart generation based on retrieval-augmented generation (RAG) can be achieved. By calling multiple large models with different generation capabilities, the efficiency of chart generation and the accuracy of generation results can be improved. Moreover, it can be applied to different chart generation scenarios and has wide applicability.
[0095] The scheme disclosed in the present invention can be applied to the field of artificial intelligence, especially to the fields of deep learning, generative large models, natural language processing, and knowledge graphs. Artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It has both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing. Artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0096] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0097] Figure 5 A schematic block diagram of an electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0098] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0099] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0100] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI, Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSP, Digital Signal Processing), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the methods described in the present disclosure. For example, in some embodiments, the methods described in the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the methods described in the present disclosure may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the method described in the present disclosure in any other appropriate manner (for example, by means of firmware).
[0101] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0103] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM, Electronically Programmable Read-Only Memory), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM, Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0104] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0105] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication (e.g., a communication network) in any form or medium. Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0106] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0107] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0108] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating a chart, comprising: Obtaining requirement description information input by the first user; Determine the target chart template used for this chart generation according to the requirement description information; Determine the target chart data required for this chart generation according to the requirement description information; A target chart corresponding to the requirement description information is generated according to the target chart data and the target chart template.
2. The method according to claim 1, wherein: Determining the target chart template used for current chart generation according to the requirement description information includes: Performing semantic analysis on the requirement description information; In response to determining that the target chart needs to be generated according to the semantic analysis result, the target chart template is determined according to the requirement description information.
3. The method according to claim 1, wherein: Determining the target chart template used for current chart generation according to the requirement description information includes: According to the requirement description information, determining the type of chart template used for this chart generation from a chart template library, wherein the chart template library stores different types of candidate chart templates, and each type corresponds to at least one candidate chart template; The target chart template is determined from the candidate chart templates corresponding to the determined chart template type.
4. The method according to claim 3, wherein: The generation method of the chart template library includes: Generate corresponding initial charts using the first generation model according to different chart data description information input by the second user; Determine each initial chart template according to the initial chart; For each initial chart template, the following processing is performed respectively: in response to obtaining an optimization processing instruction issued by a second user for the initial chart template, the initial chart template is optimized according to the optimization processing instruction, and the optimized initial chart template is determined as the candidate chart template; in response to not obtaining the optimization processing instruction, the initial chart template is directly determined as the candidate chart template; The chart template library is composed of the candidate chart templates.
5. The method according to any one of claims 1 to 4, wherein: Determining the target chart data required for generating the chart this time according to the requirement description information includes: Determine a search keyword based on the demand description information, and perform data search in a predetermined site according to the search keyword to obtain an initial search result; Filtering target search results from the initial search results; The target chart data is determined according to the target search result.
6. The method according to claim 5, wherein: The step of screening out target search results from the initial search results comprises: For each initial search result, the following processing is performed respectively: the initial search result is scored from M different dimensions, where M is a positive integer greater than 1, and a comprehensive score of the initial search result is determined by combining the M scores; The initial search results are sorted in descending order according to the value of the comprehensive score, and the initial search results in the top N positions after sorting are determined as the target search results, where N is a positive integer greater than 1 and N is less than the number of initial search results.
7. The method according to claim 5, wherein: Determining the target chart data according to the target search result includes: Input each target retrieval result into the fusion model to obtain the output information fusion result; The target chart data is extracted from the information fusion result according to the requirement description information and the target chart template.
8. The method according to any one of claims 1 to 4, further comprising: Generate chart content summary information corresponding to the target chart, and display the target chart and the chart content summary information together.
9. The method according to claim 8, wherein: The target chart data and the target chart template generate the target chart corresponding to the requirement description information, including: generating the target chart by using a second generation model according to the target chart data and the target chart template; The generating of the chart content summary information corresponding to the target chart includes: generating the chart content summary information using a third generation model according to the target chart data and the target chart template.
10. A chart generating device, comprising: Information acquisition module, template determination module, data determination module and chart generation module; The information acquisition module is used to acquire the demand description information input by the first user; The template determination module is used to determine the target chart template used for current chart generation according to the requirement description information; The data determination module is used to determine the target chart data required for this chart generation according to the requirement description information; The chart generation module is used to generate a target chart corresponding to the requirement description information according to the target chart data and the target chart template.
11. The device according to claim 10, wherein: The template determination module performs semantic analysis on the requirement description information, and in response to determining that the target chart needs to be generated according to the semantic analysis result, determines the target chart template according to the requirement description information.
12. The device according to claim 10, wherein: The template determination module determines the type of chart template used for this chart generation from a chart template library based on the requirement description information. The chart template library stores different types of candidate chart templates, each type corresponds to at least one candidate chart template. The target chart template is determined from the candidate chart templates corresponding to the determined chart template type.
13. The apparatus according to claim 12, further comprising: A preprocessing module is used to generate corresponding initial charts using the first generation model according to different chart data description information input by the second user, determine each initial chart template according to the initial chart, and perform the following processing on each initial chart template: in response to obtaining an optimization processing instruction issued by the second user for the initial chart template, optimize the initial chart template according to the optimization processing instruction, and determine the optimized initial chart template as the candidate chart template; in response to not obtaining the optimization processing instruction, directly determine the initial chart template as the candidate chart template, and use each candidate chart template to form the chart template library.
14. The device according to any one of claims 10 to 13, wherein: The data determination module determines search keywords according to the demand description information, and performs data search in a predetermined site according to the search keywords to obtain initial search results, screens target search results from the initial search results, and determines the target chart data according to the target search results.
15. The device according to claim 14, wherein: The data determination module performs the following processing for each initial search result: the initial search result is scored from M different dimensions, where M is a positive integer greater than 1; a comprehensive score of the initial search result is determined by combining the M scores; the initial search results are sorted in descending order of the values of the comprehensive score; the initial search results that are in the top N positions after sorting are determined as the target search results, where N is a positive integer greater than 1 and is less than the number of initial search results.
16. The device according to claim 14, wherein: The data determination module inputs each target search result into a fusion model to obtain an output information fusion result, and extracts the target chart data from the information fusion result according to the demand description information and the target chart template.
17. The device according to any one of claims 10 to 13, wherein: The chart generation module is further used to generate chart content summary information corresponding to the target chart, and display the target chart and the chart content summary information together.
18. The device according to claim 17, wherein: The chart generation module generates the target chart using a second generation model according to the target chart data and the target chart template, and generates the chart content summary information using a third generation model according to the target chart data and the target chart template.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1 to 9.
21. A computer program product, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Structured information extraction method based on artificial intelligence, intelligent agent and device
CN120747526A