Data processing method and device, electronic equipment and storage medium
By inputting spreadsheet data analysis requests to the target model and obtaining and rendering chart information, the limitations of the existing data analysis results chart image format are solved, and better visual effects, interactivity and sharing and collaboration capabilities are achieved.
Patent Information
- Application Number
- CN202311830102.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-06-27
AI Technical Summary
The charts of existing data analysis results are usually in image formats, which are difficult to meet users' interaction and sharing needs.
By entering data analysis requests in the spreadsheet to the target model, obtain data analysis code based on a specific programming language, generate chart information, and render the chart in the spreadsheet page.
It improves the visual effect and interactivity of data analysis results, supports chart modification, recognition, analysis, editing and other operations, and facilitates sharing and collaboration among multiple users.
Smart Images

Figure CN120218026A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and in particular, to a data processing method, apparatus, electronic device, and storage medium. Background Art
[0002] Data analysis refers to analyzing a large amount of collected data using appropriate statistical analysis methods, summarizing, understanding, and digesting them to maximize the development of the data's functions and play the role of the data.
[0003] The results of data analysis can be presented in the form of charts. However, currently, the charts presented by the results of data analysis are usually in picture format and cannot meet the user's usage requirements. Summary of the Invention
[0004] In view of this, the purpose of the present disclosure is to provide a data processing method, apparatus, electronic device, and storage medium.
[0005] Based on the above purpose, the first aspect of the present disclosure provides a data processing method, including:
[0006] Inputting a data analysis request for the first data information in the first spreadsheet into the target model;
[0007] Receiving the
[0008] Data analysis code output by the target model, where the data analysis code is implemented based on the first programming language and is used to generate a first chart based on the first programming language;
[0009] Based on the data analysis code, obtaining the information of the first chart;
[0010] Generating the information of the second chart based on the information of the first chart, and rendering the second chart on the page of the first spreadsheet based on the information of the second chart.
[0011] In some embodiments, the inputting a data analysis request for the first data information in the first spreadsheet into the target model includes:
[0012] In response to a first operation on the first spreadsheet, displaying a session window on the page of the first spreadsheet, where the session object of the session window is the target model;
[0013] In response to an input operation on the session window, sending the data analysis request to the target model.
[0014] In some embodiments, the method further includes: displaying the second chart in the session window.
[0015] In some embodiments, it further includes:
[0016] Display text output information corresponding to the data analysis request in the session window, where the text output information includes at least one of text output process information and text output result information.
[0017] In some embodiments, the method further includes:
[0018] In response to a feedback operation on the text output information, generate a feedback result for the text output information.
[0019] In some embodiments, the method, wherein it further includes:
[0020] In response to a copy and paste operation on the second chart, copy the second chart and paste the second chart into a second spreadsheet.
[0021] In some embodiments, the method further includes:
[0022] In response to a table insertion operation on the second chart, display second data information corresponding to at least one chart unit in the second chart, where the second data information is at least part of the first data information.
[0023] In some embodiments, the method further includes:
[0024] In response to a preview operation on the second chart, display a preview page including the second chart.
[0025] In some embodiments, obtaining the information of the first chart based on the data analysis code includes:
[0026] Extract the chart metadata of the first chart from the data analysis code.
[0027] A second aspect of the present disclosure provides a data processing device, including:
[0028] An input module, configured to: input a data analysis request for first data information in a first spreadsheet to a target model;
[0029] A receiving module, configured to: receive a data analysis code output by the target model, where the data analysis code is implemented based on a first programming language and is used to generate a first chart based on the first programming language;
[0030] An obtaining module, configured to: obtain the information of the first chart based on the data analysis code;
[0031] A rendering module, configured to: generate information of a second chart based on information of the first chart, and render the second chart in a page of the first spreadsheet based on the information of the second chart.
[0032] A third aspect of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the data processing method described in the first aspect is implemented.
[0033] A fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the data processing method described in the first aspect.
[0034] As can be seen from the above, the data processing method, apparatus, electronic device, and storage medium provided by the present disclosure input a data analysis request for the first data information in the first spreadsheet to a target model, obtain data analysis code output by the target model and implemented in the first programming language and used to generate a first chart based on the first programming language, then obtain information of the first chart according to the data analysis code, then obtain information of the second chart according to the information of the first chart, and render and generate the second chart to be displayed in a page of the first spreadsheet according to the information of the second chart, thereby improving the visual effect and interactivity of the data analysis result, facilitating the sharing and collaboration of the second chart among multiple users, and improving the user experience. Description of the Drawings
[0035] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following description are only embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 A flowchart showing the process of an exemplary method provided by an embodiment of the present disclosure.
[0037] Figure 2A A schematic diagram showing an exemplary page according to an embodiment of the present disclosure.
[0038] Figure 2B A schematic diagram showing an exemplary page according to an embodiment of the present disclosure.
[0039] Figure 2C A schematic diagram showing an exemplary page according to an embodiment of the present disclosure.
[0040] Figure 3The figure shows a schematic diagram of an exemplary device provided by an embodiment of the present disclosure.
[0041] Figure 4 The figure shows a schematic diagram of the hardware structure of an exemplary computer device provided by an embodiment of the present disclosure. Detailed implementation manners
[0042] To make the objectives, technical solutions and advantages of the present disclosure more clear and understandable, the present disclosure will be further described in detail below with reference to specific embodiments and the accompanying drawings.
[0043] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be the ordinary meanings understood by those of ordinary skill in the art to which the present disclosure belongs. The "first", "second" and similar terms used in the embodiments of the present disclosure do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or items appearing before this term cover the elements or items listed after this term and their equivalents, without excluding other elements or items. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0044] As described in the background art, currently, data analysis can be performed using a model, and the analysis results can be presented in the form of Python charts. Python charts can include line charts, scatter plots, bar charts, pie charts, etc. Since Python charts are in image format, it is difficult to interact with Python charts, such as modifying, recognizing, parsing, editing Python charts, and viewing detailed information.
[0045] In view of this, the present disclosure provides a data processing method to solve the above problems.
[0046] As Figure 1 shown, the data processing method includes:
[0047] Step S101: Input a data analysis request for the first data information in the first spreadsheet to a target model.
[0048] An online spreadsheet is a spreadsheet that stores data by rows. Each row is an independent and smallest storage unit, and each column is data of a fixed type. It is a spreadsheet in the form of the web (World Wide Web).
[0049] In this embodiment, the target model is a model associated with an online spreadsheet, and the target model can be used to perform data analysis on the data in the online spreadsheet.
[0050] Among them, the online spreadsheet includes a first spreadsheet, and the first spreadsheet includes first data information. In this embodiment, a data analysis request can be input to the target model so that the target model performs data analysis on the first data information in the first spreadsheet based on the data analysis request.
[0051] In the embodiments of the present disclosure, the target model is a model with data analysis capabilities trained based on a preset data set. The specific structure and training method of the target model are not limited here.
[0052] Step S103: Receive the data analysis code output by the target model. The data analysis code is implemented based on a first programming language and is used to generate a first chart based on the first programming language.
[0053] In this embodiment, the target model can generate data analysis code for the first data information based on the data analysis request. In this embodiment, the data analysis code is implemented based on a first programming language and can be used to generate a first chart based on the first programming language.
[0054] Among them, the first programming language can be the Python language. The data analysis code output by the target model can be plotting code output based on the plotting library of Python. The plotting library of Python is designed using an object-oriented method, and various elements in the plotting process, such as images, subplots, coordinate axes, curves, etc., have corresponding classes. The image and each component element of the image can be controlled through the interface functions and attributes of the classes.
[0055] The plotting result of the plotting library of Python, that is, the first chart, can have various output formats. For example, the plotting result can be embedded in GUI forms such as wxpython, pygtk, Qt, etc., or the plotting result can be output as a picture file, or the plotting result can be output in a web application.
[0056] Step S105: Obtain information about the first chart based on the data analysis code.
[0057] In this embodiment, since the data analysis code can be used to generate a first chart based on the first programming language, that is, various information for generating the first chart, such as information about images, subplots, coordinate axes, curves, etc. in the first chart, can be parsed and obtained from the data analysis code.
[0058] Step S107, generate information of a second chart based on the information of the first chart, and render the second chart on the page of the first spreadsheet based on the information of the second chart.
[0059] In this embodiment, after obtaining the information of the first chart, the information of the second chart can be generated based on the information of the first chart, that is, information such as images, subcharts, coordinate axes, curves, etc. that meet the requirements of the second chart can be generated. Then, the second chart can be rendered and generated based on the information of the second chart, and the second chart can be displayed on the page of the first spreadsheet as the data analysis result corresponding to the data analysis request.
[0060] In this embodiment, the second chart can vividly display the data analysis result in the form of a chart, and the second chart can be recognized or parsed by the first spreadsheet. Therefore, operations such as modification, recognition, parsing, editing, and viewing of detailed information can be performed on the second chart in the online spreadsheet application to which the first spreadsheet belongs. Moreover, it is also convenient to realize the sharing and collaboration of the second chart among multiple users.
[0061] In some embodiments, the second chart is implemented based on the chart function of the online spreadsheet application to which the first spreadsheet belongs. Therefore, the structure, function, etc. of the second chart are the same as those of the charts provided by the online spreadsheet, and the functions that the second chart can achieve are the same as the chart function of the online spreadsheet application to which the first spreadsheet belongs. Since the visual effect of the chart function of the online spreadsheet is good and good interaction can be achieved, the second chart can also have a good visual effect and achieve good interaction.
[0062] In this embodiment, by inputting a data analysis request for the first data information in the first spreadsheet to the target model, obtaining the data analysis code implemented in the first programming language and used to generate the first chart based on the first programming language output by the target model, then obtaining the information of the first chart according to the data analysis code, then obtaining the information of the second chart according to the information of the first chart, and rendering and generating the second chart according to the information of the second chart and displaying it on the page of the first spreadsheet, thereby improving the visual effect and interactivity of the data analysis result, facilitating the sharing and collaboration of the second chart among multiple users, and improving the user experience.
[0063] In some embodiments, the inputting a data analysis request for the first data information in the first spreadsheet to the target model in step S101 includes:
[0064] Step S201, in response to a first operation on the first spreadsheet, display a session window on the page of the first spreadsheet, and the session object of the session window is the target model.
[0065] Step S203: In response to an input operation on the session window, send the data analysis request to the target model.
[0066] Among them, the first operation may be a triggering operation on a session control in the toolbar of the first spreadsheet. The user triggers this session control to open a session window corresponding to the first spreadsheet on the page of the first spreadsheet.
[0067] As Figure 2A shown, in some embodiments, both the first spreadsheet 11 and the session window 12 are displayed on the page of the first spreadsheet, facilitating the user to use the session window 12 for operations when performing data analysis on the first data information in the first spreadsheet 11.
[0068] In some embodiments, the first data information is not limited to the data information in one TAB page. It may include the data information in multiple TAB pages. That is, the first spreadsheet 11 is not limited to one TAB page in an online spreadsheet application. It may include multiple TAB pages, and this embodiment does not make any limitations in this regard.
[0069] Among them, the session object of the session window is the target model, which means that the session information input by the user through the session window for data analysis will be converted into a data analysis request and input into the target model. In some embodiments, feature extraction can be performed on the data analysis request, the data analysis request can be converted into a vector that can be recognized by the target model, and then this vector is input into the target model.
[0070] In some embodiments, the method further includes: displaying the second chart in the session window.
[0071] As Figure 2B shown, after the session information 13 input through the session window 12 is converted into a data analysis request and input into the target model, the target model can analyze the first data information in the first spreadsheet 11 based on this data analysis request, output the second chart 15, and also display this second chart 15 in the session window 12 for the user to view.
[0072] In some embodiments, the method further includes: displaying in the session window text output information corresponding to the data analysis request, where the text output information includes at least one of text output process information and text output result information.
[0073] As Figure 2BAs shown, the data analysis results output by the target model may further include text output information 14 displayed in the session window 12. Among them, the text output information 14 may include text output process information, text output result information, etc., so that the user can obtain information such as data analysis ideas and data analysis conclusions based on the text output information 14, helping the user better understand the data analysis results and improving the user experience.
[0074] In some embodiments, the method further includes: generating a feedback result for the text output information in response to a feedback operation on the text output information.
[0075] In this embodiment, after the text output information 14 is displayed in the session window 12, the user can also provide feedback on the text output information 14, such as approving or disapproving of the text output information 14.
[0076] As Figure 2B shown, a feedback control for the text output information 14 is also displayed in the session window 12. In some embodiments, the feedback control may specifically include an approval control and a disapproval control. The user can output an approval result or a disapproval result for the text output information 14 by triggering the approval control or the disapproval control. With the user's authorization, the service provider of the online spreadsheet application can collect the feedback results of the user on the text output information 14 and optimize the data analysis function of the online spreadsheet application based on the feedback results.
[0077] In some embodiments, the method further includes: copying the second chart and pasting the second chart onto the page of a second spreadsheet in response to a copy and paste operation on the second chart.
[0078] In this embodiment, the second chart 15 displayed in the session window 12 can be copied and pasted into other spreadsheets.
[0079] As Figure 2B 、 Figure 2C shown, a copy control 17 for copying the second chart 15 is also displayed in the session window 12. The user can trigger the copy control 17 to copy the second chart 15. After that, the user can open other spreadsheets, such as the second spreadsheet 20, and paste the copied second chart 15 into the second spreadsheet 20.
[0080] Among them, the second chart 15 pasted into the second spreadsheet 20 can maintain its original function, that is, it can be recognized or parsed by the second spreadsheet 20, and naturally it can also be enlarged, reduced, modified, recognized, parsed, edited, viewed for detailed information, etc. in the second spreadsheet 20. This embodiment does not make any limitations in this regard.
[0081] In some embodiments, the second spreadsheet 20 is not limited to one TAB page in an online spreadsheet application. It may include multiple TAB pages, and this embodiment does not limit this.
[0082] In some embodiments, the second spreadsheet 20 and the first spreadsheet 11 may be the same spreadsheet or different spreadsheets, and this embodiment does not limit this.
[0083] In some embodiments, the method further includes: in response to an operation of inserting a table into the second chart, displaying second data information corresponding to at least one chart unit in the second chart, where the second data information is at least part of the first data information.
[0084] In this embodiment, since each chart unit in the second chart is generated based on at least part of the first data information in the first spreadsheet, and the second chart can be recognized or parsed by the first spreadsheet, the second chart can be further operated on to determine the second data information corresponding to each chart unit in the second chart, and these second data information also comes from the first data information and is usually part of the first data information.
[0085] For example, if the second chart is a bar chart, the chart units of the bar chart are the respective long bars, and each long bar is obtained by statistically calculating part of the first data information. Since the second chart can be recognized or parsed by the first spreadsheet, the information corresponding to each long bar can be filtered out from the first data information and displayed to the user for the user to view this information, and the user can also perform further data analysis based on the above second data information.
[0086] As Figure 2B shown, an insert table control 16 for performing a table insertion operation on the second chart 15 is displayed in the session window 12. When the user triggers the insert table control 16, the table insertion operation on the second chart 15 can be realized. Based on this table insertion operation, the second data information corresponding to each chart unit in the second chart 15 can be filtered out from the first data information and displayed for the user to view and perform further data analysis.
[0087] Among them, the second data information can be displayed in a third spreadsheet, and the third spreadsheet can be stored as a sub - spreadsheet of the first spreadsheet in an online spreadsheet application.
[0088] In some embodiments, the method further includes: in response to a preview operation on the second chart, displaying a preview page including the second chart.
[0089] In this embodiment, since the display area occupied by the session window 12 is small, the display area where the second chart 15 is located is also small, making it inconvenient for the user to view the second chart 15. Therefore, this embodiment can provide a preview function for the second chart 15 so that the user can clearly and conveniently view the second chart 15.
[0090] As Figure 2B shown, a preview control 18 for previewing the second chart 15 is displayed in the session window 12. When the user triggers the preview control 18, a preview window can be displayed, and the second chart 15 can be enlarged and displayed in the preview window for the user to view.
[0091] In some embodiments, the preview window only provides the viewing operation of the second chart 15 and cannot perform operations such as zooming in, zooming out, modifying, recognizing, parsing, editing, and viewing detailed information on the second chart 15. In other embodiments, the preview window not only provides the viewing operation of the second chart 15 but also can perform operations such as zooming in, zooming out, modifying, recognizing, parsing, editing, and viewing detailed information on the second chart 15. This embodiment does not make a limitation in this regard.
[0092] In some embodiments, obtaining the information of the first chart based on the data analysis code in step S103 includes: extracting the chart metadata of the first chart from the data analysis code.
[0093] In this embodiment, since the data analysis code is implemented based on the first programming language and can be used to generate the first chart based on the first programming language, the chart metadata of the first chart can be obtained by parsing the data analysis code. Among them, the chart metadata of the first chart may include information such as images, subcharts, coordinate axes, and curves in the first chart.
[0094] After that, the chart metadata of the second chart can be generated using the chart metadata such as images, subcharts, coordinate axes, and curves in the first chart, and then the second chart can be rendered and generated using the chart metadata of the second chart.
[0095] In some embodiments, the data analysis operations of the first data information in the first spreadsheet by the current user account and the data analysis results such as the second chart displayed in the session window can be stored in a related manner for the user account. In this way, even if the user exits the user account and logs in again later, the previously obtained data analysis results will still be displayed in the session window. In some embodiments, even if the user logs in to the user account later through a different terminal, the synchronization of information such as data analysis results can also be achieved.
[0096] In some embodiments, if the user logs in to the current account using different terminals, the data analysis operations performed through one terminal and the data analysis results such as the second chart displayed in the session window can also be synchronized to other terminals, and this embodiment does not limit this.
[0097] To facilitate the implementation of these different outputs, the Python plotting library isolates the plotting code and the processing methods for different output forms in its design, that is, it distinguishes between the front end and the back end, and implements the processing functions for different output forms through the back end, and draws images through the front end.
[0098] In this embodiment, chart metadata can be extracted from the front-end plotting code. These chart metadata can include, for example, images, subcharts, coordinate axes, curves, etc.; based on the chart metadata, chart configuration information for the first spreadsheet can be generated, and based on the chart configuration information, the second chart 15 can be rendered and generated.
[0099] It can be understood that before using the technical solutions of the various embodiments in the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0100] For example, when responding to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be executed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that executes the operations of the technical solutions of the present disclosure according to the prompt message.
[0101] As an optional but non-limiting implementation manner, when responding to receiving an active request from the user, the manner of sending a prompt message to the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0102] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not limit the implementation manner of the present disclosure, and other manners that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0103] It should be noted that the method of the embodiment of the present disclosure can be executed by a single device, such as a computer or a server, etc. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiment of the present disclosure, and these multiple devices will interact with each other to complete the described method.
[0104] It should be noted that some embodiments of the present disclosure have been described above. 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 above embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0105] Based on the same inventive concept, corresponding to any of the above method embodiments, the present disclosure also provides a data processing apparatus.
[0106] Referring to Figure 3 , the apparatus includes:
[0107] An input module 11, configured to: input a data analysis request for first data information in a first spreadsheet to a target model;
[0108] A receiving module 13, configured to: receive a data analysis code output by the target model, the data analysis code being implemented based on a first programming language and used to generate a first chart based on the first programming language;
[0109] An obtaining module 15, configured to: obtain information of the first chart based on the data analysis code;
[0110] A rendering module 17, configured to: generate information of a second chart based on the information of the first chart, and render the second chart in a page of the first spreadsheet based on the information of the second chart.
[0111] In some embodiments, the input module 11 is further configured to:
[0112] In response to a first operation on the first spreadsheet, display a session window in a page of the first spreadsheet, the session object of the session window being the target model;
[0113] In response to an input operation on the session window, send the data analysis request to the target model.
[0114] In some embodiments, the apparatus is further configured to: display the second chart in the session window.
[0115] In some embodiments, the apparatus is further configured to:
[0116] Display text output information corresponding to the data analysis request in the session window, where the text output information includes at least one of text output process information and text output result information.
[0117] In some embodiments, the device is further configured to:
[0118] Generate a feedback result for the text output information in response to a feedback operation on the text output information.
[0119] In some embodiments, the device is further configured to:
[0120] In response to a copy and paste operation on the second chart, copy the second chart and paste the second chart into a second spreadsheet.
[0121] In some embodiments, the device is further configured to:
[0122] In response to a table insertion operation on the second chart, display second data information corresponding to at least one chart unit in the second chart, where the second data information is at least part of the first data information.
[0123] In some embodiments, the device is further configured to:
[0124] In response to a preview operation on the second chart, display a preview page including the second chart.
[0125] In some embodiments, the obtaining module 15 is further configured to:
[0126] Extract chart metadata of the first chart from the data analysis code.
[0127] For the convenience of description, when describing the above device, various modules are described separately according to their functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0128] The device in the above embodiment is used to implement the corresponding data processing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0129] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the data processing method described in any of the above embodiments when executing the program.
[0130] Figure 4FIG. 0 shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.
[0131] The processor 1010 may be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0132] The memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0133] The input / output interface 1030 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0134] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module may implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0135] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0136] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0137] The electronic device in the above embodiment is used to implement the corresponding data processing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0138] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the data processing method described in any of the foregoing embodiments.
[0139] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0140] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the data processing method described in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0141] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary, and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; under the concept of the present disclosure, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present disclosure as described above, and they are not provided in detail for the sake of brevity.
[0142] In addition, for simplicity of explanation and discussion, and so as not to make the embodiments of the present disclosure difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that details regarding the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be practiced without these specific details or with variations of these specific details. Accordingly, these descriptions should be considered illustrative rather than restrictive.
[0143] Although the present disclosure has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0144] Embodiments of the present disclosure are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A data processing method, comprising: Inputting a data analysis request for first data information in a first spreadsheet into a target model; Receiving a data analysis code output by the target model, the data analysis code being implemented based on a first programming language and being used to generate a first chart based on the first programming language; Obtaining information of the first chart based on the data analysis code; Generating information of a second chart based on the information of the first chart, and rendering the second chart on the page of the first spreadsheet based on the information of the second chart.
2. The method according to claim 1, wherein, The inputting a data analysis request for first data information in a first spreadsheet into a target model comprises: In response to a first operation on the first spreadsheet, displaying a session window on the page of the first spreadsheet, the session object of the session window being the target model; In response to an input operation on the session window, sending the data analysis request to the target model.
3. The method according to claim 2 further comprises: Displaying the second chart in the session window.
4. The method according to claim 2, wherein, It further comprises: Displaying text output information corresponding to the data analysis request in the session window, the text output information comprising at least one of text output process information and text output result information.
5. The method according to claim 4, further comprising: Generating a feedback result for the text output information in response to a feedback operation on the text output information.
6. The method according to claim 1, wherein It further comprises: In response to a copy and paste operation on the second chart, copying the second chart and pasting the second chart on the page of a second spreadsheet.
7. The method according to claim 1, further comprising: In response to a table insertion operation on the second chart, displaying second data information corresponding to at least one chart unit in the second chart, the second data information being at least part of the first data information.
8. The method according to claim 1, further comprising: In response to a preview operation on the second chart, displaying a preview page comprising the second chart.
9. The method according to claim 1, wherein The obtaining information of the first chart based on the data analysis code comprises: Extracting chart metadata of the first chart from the data analysis code.
10. A data processing apparatus, comprising: An input module configured to input a data analysis request for first data information in a first spreadsheet into a target model; A receiving module configured to receive a data analysis code output by the target model, the data analysis code being implemented based on a first programming language and being used to generate a first chart based on the first programming language; An obtaining module configured to obtain information of the first chart based on the data analysis code; A rendering module configured to generate information of a second chart based on the information of the first chart, and render the second chart on the page of the first spreadsheet based on the information of the second chart.
11. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the data processing method according to any one of claims 1 to 9 is implemented.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the data processing method according to any one of claims 1 to 9.