Data processing method, device, computer equipment and storage medium
By sending data query requests to the server and rendering charts based on chart attribute data, it solves the problem of chart processing complexity in traditional methods, achieving a simplified chart display process and improved development efficiency.
Patent Information
- Application Number
- CN202011163836.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-27
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-10-27
AI Technical Summary
In web development, traditional chart processing methods use a large number of HTML tags and styles to achieve personalized display, making the implementation process complex and difficult to simplify.
By sending a data query request to the server, the data and chart attribute data in the target time period are obtained, and the data chart is rendered based on the chart attribute data, avoiding the use of a large number of HTML tags and simplifying the development process.
It simplifies the process of displaying data in charts, reduces development workload, improves scalability and extensibility, and avoids the use of a large number of HTML tags and styles.
Smart Images

Figure CN112231372B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer device and storage medium. Background Art
[0002] With the development of technology, data is becoming more and more abundant, and the functions of data statistics and display are becoming more and more needed.
[0003] Data charts refer to graphic structures displayed on the screen that can intuitively display the attributes of statistical information (time, quantity, etc.), which play a key role in knowledge mining and intuitive and vivid information perception. They are a good means of visualizing object attribute data in an intuitive and vivid way. Data charts can easily view data differences and predict trends, making data comparisons or data change trends clear at a glance, and help to quickly and effectively express data relationships.
[0004] In web page development, traditional chart processing methods usually use tags in HTML (HyperText Markup Language) to achieve static display effects. However, when this method is applied to slightly complex charts, if different data needs to be displayed in a personalized way, a large number of HTML tags and display styles are required to achieve this, and the implementation process is complicated. Summary of the invention
[0005] Based on this, it is necessary to provide a data processing method, device, computer equipment and storage medium that can simplify the implementation process of displaying data in charts to address the above technical problems.
[0006] A data processing method, the method comprising:
[0007] In response to the data query instruction, a data query request is sent to the server; wherein the data query request includes a target time period to be queried;
[0008] Receive query data and chart attribute data fed back by the server; the query data is data corresponding to the target time period obtained by the server from a preset database, and the chart attribute data is data corresponding to the query data determined by the server according to a preset chart type; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a marking line display position corresponding to the horizontal axis, and a marking line display position corresponding to the vertical axis;
[0009] Rendering is performed based on the chart attribute data and the query data to obtain a data chart showing the query data.
[0010] In one embodiment, the query data includes game projects launched within the target time period, the company name to which each game project belongs, the annual income corresponding to each game project, and the launch time of each game project; the vertical axis keywords include the company name; and the horizontal axis keywords include the launch time.
[0011] A data processing method, the method comprising:
[0012] receiving a data query request sent by a front end; the data query request is sent by the front end in response to a data query instruction, and the data query request includes a target time period to be queried;
[0013] Acquire the query data within the target time period in a preset database according to the data query request;
[0014] Determining chart attribute data corresponding to the query data according to a preset chart type; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a marking line display position corresponding to the horizontal axis, and a marking line display position corresponding to the vertical axis;
[0015] A query feedback result is sent to the front end based on the query data and the chart attribute data; the query feedback result is used to enable the front end to render based on the chart attribute data and the query data to obtain a data chart showing the query data.
[0016] A data processing device, comprising:
[0017] A query request sending module, used to send a data query request to the server in response to a data query instruction; wherein the data query request includes a target time period to be queried;
[0018] A receiving module, used for receiving query data and chart attribute data fed back by the server; the query data is the data corresponding to the target time period obtained by the server from a preset database, and the chart attribute data is the data corresponding to the query data determined by the server according to a preset chart type; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a marking line display position corresponding to the horizontal axis, and a marking line display position corresponding to the vertical axis;
[0019] A rendering module is used to render based on the chart attribute data and the query data to obtain a data chart showing the query data.
[0020] A data processing device, comprising:
[0021] A request receiving module, used to receive a data query request sent by the front end; the data query request is sent by the front end in response to a data query instruction, and the data query request includes a target time period to be queried;
[0022] A data acquisition module, used to acquire the query data within the target time period from a preset database according to the data query request;
[0023] an attribute determination module, for determining the chart attribute data corresponding to the query data according to a preset chart type; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a display position of a marking line corresponding to the horizontal axis, and a display position of a marking line corresponding to the vertical axis;
[0024] A feedback module is used to send query feedback results to the front end based on the query data and chart attribute data; the query feedback results are used to enable the front end to render based on the chart attribute data and query data to obtain a data chart that displays the query data.
[0025] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above data processing method when executing the computer program.
[0026] A computer-readable storage medium stores a computer program, which implements the steps of the above data processing method when executed by a processor.
[0027] In the above data processing method, device, computer equipment and storage medium, the front end responds to the data query instruction sent by the user, and sends a data query request carrying the target time period to be queried to the server. After receiving the data query request, the server searches and obtains the query data within the target time period from the preset database, and determines the chart attribute data corresponding to the query data according to the preset chart type; then the chart attribute data and the query data are fed back to the front end; after the front end receives the feedback result from the server, it renders according to the chart attribute data and the query data therein, thereby obtaining a data chart that displays the query data. Among them, the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis. The above method finally displays the query data with a preset chart type, wherein the attribute data required to display the query data by the preset chart type is determined by the server for the query data and fed back to the front end, thereby avoiding the use of a large number of HTML tags and greatly simplifying the development workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 An application environment diagram of a data processing method in an embodiment;
[0029] Figure 2 is a flow chart of a data processing method in one embodiment;
[0030] Figure 3 is a flow chart of a data processing method in another embodiment;
[0031] Figure 4 A schematic diagram of a data chart showing query data in a specific embodiment;
[0032] Figure 5 It is a schematic diagram of displaying corresponding first data to be displayed when a mouse hovering operation is detected in a specific embodiment;
[0033] Figure 6 It is a schematic diagram of displaying corresponding second data to be displayed when a mouse click event is detected in a specific embodiment;
[0034] Figure 7 is a flow chart of a data processing method in another embodiment;
[0035] Figure 8 A schematic diagram showing a level graphic representing a level in a specific embodiment;
[0036] Fig. 9 is a flowchart of a process for determining chart attribute data in one embodiment;
[0037] Fig.10 is a flow chart of a data processing method in another embodiment;
[0038] Fig.11 is a flow chart of a data processing method in another embodiment;
[0039] Fig.12 is a timing diagram of a data processing method in a specific embodiment;
[0040] Fig.13 The static display effects and dynamic interactive events and their corresponding implementation methods included in the displayed data chart in one embodiment;
[0041] Fig.14 is a structural block diagram of a data processing device in one embodiment;
[0042] Fig.15 is a structural block diagram of a data processing device in another embodiment;
[0043] Fig.16 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] The data processing method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the front-end device 102 communicates with the server 104 through the network. The front-end device 102 responds to the data query instruction sent by the user and sends a data query request to the server 104, wherein the data query instruction includes the target time period to be queried; the front-end device 102 receives the query data and chart attribute data fed back by the server 104, and then renders based on the chart attribute data and the query data to obtain a data chart showing the query data. Among them, the query data is the data corresponding to the target time period that the server 104 queries and obtains from the preset database based on the data query request, and the chart attribute data is the chart attribute corresponding to the query data determined by the server 104 according to the preset chart type after obtaining the query data. Among them, the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the marking line display position corresponding to the horizontal axis, and the marking line display position corresponding to the vertical axis. The data processing method provided in this application can be applied to the terminal 102 or the server 104 in the above application environment.
[0046] The front end is the front part of the website, which runs on a browser such as a PC (personal computer) or a mobile terminal to display web pages for users to browse. The front end device 102 represents a PC terminal, which can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0047] In one embodiment, Figure 2 As shown, a data processing method is provided, which is applied to Figure 1 The front-end device in is taken as an example to illustrate, including steps S210 to S230.
[0048] Step S210, in response to the data query instruction, sending a data query request to the server; wherein the data query request includes a target time period to be queried.
[0049] The data query instruction is sent by the user through the front-end device when the user wants to query data. For example, the user clicks a data query button on the display interface, which is regarded as the user sending the data query instruction.
[0050] In one embodiment, the data query instruction carries the data type of the data to be queried, for example, the data to be queried is enterprise data, project data, product data or other data. In another embodiment, the data to be queried is historical data, and the data query instruction carries the time period corresponding to the data to be queried, for example, the data within the past year needs to be queried; in other embodiments, the data query instruction may also carry other information. Further, in one of the embodiments, a control for entering the time period may be displayed on the display interface, and when the user enters the target time period in the control and clicks the data query button, it is determined that the data query instruction is detected; or, only the data query button may be displayed on the display interface, and when the click operation on the data query button is detected, it is determined that the data query instruction is detected, and in response to the data query instruction, a control for entering the time period is displayed on the display interface, and after the control receives the target time period to be queried input by the user, a data query request is sent to the server. It can be understood that in other embodiments, sending a data query request to the server in response to the data query instruction may also be implemented in other ways.
[0051] Further, in one embodiment, after receiving the data query request, the server parses it to obtain the target time period to be queried. In a specific embodiment, the server is built based on egg.js (an open source enterprise-level Node.js framework).
[0052] Step S220, receiving query data and chart attribute data fed back by the server; the query data is the data corresponding to the target time period obtained by the server from the preset database, and the chart attribute data is the data corresponding to the query data determined by the server according to the preset chart type.
[0053] The preset database is used to store a certain type of data; in a specific embodiment, the above data processing method is used to provide users with information related to game projects, and the preset database is used to store information related to game projects, including the company to which the game project belongs, the launch time of the game project, the income information corresponding to the game project, etc.; in this embodiment, the query data includes the game projects launched within the target time period, the company name to which each game project belongs, the annual income corresponding to each game project, and the launch time of each game project. In a specific embodiment, the database is built based on mongodb.
[0054] The preset chart type refers to the chart type used by the front-end device to display the query data, which is set in advance according to the actual situation; in one embodiment, the preset chart type can be determined according to the construction framework of the front end; in a specific embodiment, the front end can be built based on the element-ui (a desktop UI framework based on Vue.js 2.0) framework of vue, and the preset chart type is echarts (enterprise charts, commercial-grade data charts, a pure JavaScript chart library chart plug-in; in another specific embodiment, based on the antd (a component library) framework of react, the preset chart type is bizcharts (a React chart library based on G2 encapsulation) chart plug-in. Further, in one embodiment, the preset chart type can be sent to the server together with the data query request by the front-end device, and in other embodiments, the preset chart type can also be sent to the server in advance by the front-end device.
[0055] In one embodiment, the attribute data required to display the data in the preset chart type can be determined based on the preset chart type. In this embodiment, after obtaining the query data, the server determines the chart attribute data required to display the query data in the preset chart type based on the preset chart type and the query data.
[0056] Furthermore, in one embodiment, the feedback received by the front end from the server also includes the level corresponding to each query data. In this embodiment, after the server obtains the query data within the target time period in the preset database, it also includes the step of: classifying the query data according to the preset level, and classifying the query data into the corresponding level. Taking the application of the above method to providing users with information related to game projects as an example, the preset level can be an income level, such as an annual income level or a quarterly income level, etc. After obtaining the query data within the target time period in the preset database according to the data type, it also includes: according to the annual income of each game project, the query data within the target time period is divided into the corresponding preset income level.
[0057] Step S230, rendering is performed based on the chart attribute data and the query data to obtain a data chart that displays the query data.
[0058] Among them, rendering based on chart attribute data and query data refers to the whole process of the front end converting the data fed back by the server into images seen by the human eye.
[0059] In one embodiment, the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a display position of a marking line corresponding to the horizontal axis, and a display position of a marking line corresponding to the vertical axis. In this embodiment, rendering is performed based on the chart attribute data and the query data to obtain a data chart showing the query data, including: obtaining a rectangular coordinate system according to the horizontal axis keyword, the vertical axis keyword, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis, and displaying the coordinate point corresponding to each query data in the rectangular coordinate system.
[0060] In this embodiment, the query data is displayed in a rectangular coordinate system. After obtaining the query data, the server needs to calculate the horizontal axis keywords and their display positions, the vertical axis keywords and their display positions, the horizontal axis corresponding marking line display positions, and the vertical axis corresponding marking line display positions of the rectangular coordinate system. After receiving the above-mentioned chart attribute data, the front end performs rendering to obtain the corresponding rectangular coordinate system. Among them, the horizontal axis keywords and the vertical axis keywords can be determined according to the data attributes of the query data respectively.
[0061] The horizontal axis keywords and the vertical axis keywords represent the words to be displayed on the horizontal axis and the vertical axis, and are used to represent the information of the corresponding display data in the coordinate axis. In one embodiment, the horizontal axis represents time, and the horizontal axis keywords are related to time. The vertical axis represents the ownership of the data, and the vertical axis keywords are related to the ownership of the data. The display position of the horizontal axis keywords and the display position of the vertical axis keywords represent the display position of each keyword on the coordinate axis. In a specific embodiment, still taking the application scenario of game project related information as an example, the vertical axis keywords include the names of each company; the horizontal axis keywords include the launch time of the game project.
[0062] The marking lines corresponding to the horizontal axis and the vertical axis respectively represent the marking lines to be displayed on the horizontal axis and the vertical axis, and are used to divide the display area of the data corresponding to each keyword on the horizontal axis or the vertical axis. In one embodiment, the marking lines include scale lines and / or grid lines; wherein the scale lines are short measuring lines similar to ruler dividing lines, intersecting with the coordinate axis; the grid lines are extensions of the scale lines on the coordinate axis, and pass through the drawing area, that is, the auxiliary lines displayed in the editing area for aligning images or texts like style. The front end can display corresponding marking lines in the horizontal axis and the vertical axis of the rectangular coordinate system according to the display position of the marking lines.
[0063] After the corresponding rectangular coordinate system is obtained by rendering the chart attribute data, the query data is sequentially displayed at the coordinate point position corresponding to the rectangular coordinate system according to the information of the query data itself, that is, a chart showing the query data is obtained, which is recorded as a data chart in this embodiment. Taking the application scenario of the relevant information of the game project as an example, the horizontal axis keyword is the online time of the game project, and the vertical axis keyword is the company name. According to the online time of any game project (query data) and the name of the company to which it belongs, the coordinate point corresponding to the game project in the rectangular coordinate system can be determined, and then the information of the game project can be displayed at the coordinate point position.
[0064] In this embodiment, a chart plug-in is used to display data. The attribute information required by the chart plug-in is calculated on the background server and passed to the front-end page for graphics rendering. This greatly simplifies the development workload and reduces the use of HTML elements and CSS styles. Based on some characteristics of the preset type of chart plug-in itself, the scalability and extensibility of the solution can be improved.
[0065] In the above data processing method, the front end responds to the data query instruction sent by the user, sends a data query request carrying the target time period to be queried to the server, then receives the query data and corresponding chart attribute data fed back by the server, and renders according to the chart attribute data and query data, thereby obtaining a data chart showing the query data. Wherein, the query data is the data in the target time period searched and obtained from the preset database by the server after receiving the data query request, and the chart attribute data is the attribute data corresponding to the query data determined by the server according to the preset chart type; then the chart attribute data and the query data are fed back to the front end. Wherein, the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis. The above method finally displays the query data with a preset chart type, wherein the attribute data required to display the query data by the preset chart type is determined by the server for the query data and fed back to the front end, thereby avoiding the use of a large number of HTML tags and greatly simplifying the development workload.
[0066] Further, in one embodiment, if Figure 3 As shown, rendering is performed based on the chart attribute data and the query data to obtain a data chart showing the query data, and also includes step S310: based on the chart attribute data, using the sequence attributes of the preset chart type to display each query data as a preset graphic.
[0067] In a specific embodiment, the preset chart type uses an echarts chart plug-in, and the series attribute of echarts is used to display each query data as a preset graph. It should be noted that each query data is displayed in the interface with a preset graph. In other embodiments, the functional attributes of other chart plug-ins can also be used to achieve the above-mentioned static display effect. Among them, the preset graph can be set to any type of graph, for example, it can be set to a rectangle, a circle, etc.
[0068] Furthermore, the name of the query data may be displayed in a preset graphic corresponding to each displayed query data, for example, the name of a game project may be displayed.
[0069] In another embodiment, please continue to refer to Figure 3 , rendering is performed based on the chart attribute data and the query data to obtain a data chart showing the query data, and also includes step S320: reading the level corresponding to each query data; based on the chart attribute data, displaying the query data corresponding to the same level as the same background color.
[0070] After the server obtains the query data from the preset database, it will also classify each query data into a corresponding preset level according to the preset level, and the feedback query data carries the corresponding level; after receiving the query data feedback from the server, the front end can read the level corresponding to each query data, and then can determine the query data belonging to the same level. In a specific embodiment, the levels include supreme, high, medium and low.
[0071] Furthermore, in other embodiments, after reading the level corresponding to each query data, the query data of the same level can also be displayed as the same fill type, for example, the display graphics of the query data of the same level are all filled with slashes; or the query data of the same level can be displayed as the same graphics; or the query data of the same level can also be displayed as the same graphic border lines, such as solid lines, dotted lines, etc.
[0072] In a specific embodiment, taking the application scenario of game project related information as an example, the preset level can be an income level, such as an annual income level or a quarterly income level, etc. The determination of the level of the query data includes the steps of: the server reads the income value of each query data, and divides it into the corresponding preset income level according to the income value.
[0073] In a specific embodiment, the preset chart type uses an echarts chart plug-in, and the display color attribute of echarts is used to display the query data belonging to the same level as the same color. In other embodiments, the functional attributes of other chart plug-ins can also be used to achieve the above static display effect.
[0074] like Figure 4 Shown is a schematic diagram of a data chart showing query data in a specific embodiment. In this embodiment, an application scenario of querying relevant information of a game project is taken as an example.
[0075] In this embodiment, a special static display is made in combination with some information in the query data, including displaying the query data in the form of preset graphics in the data chart, and displaying the query data belonging to the same level as the same background color, so that more intuitive information can be displayed to the user with richer display effects; among them, the above-mentioned static display effect is achieved by using the attributes in the preset chart type, which avoids the use of a large number of HTML tags and reduces the development workload.
[0076] Please continue to refer to Figure 3In one embodiment, after rendering is performed based on the chart attribute data and the query data to obtain a data chart that displays the query data, step S330 is also included: when a mouse pointer hovering operation is detected at the display position of the query data, the first data to be displayed corresponding to the first target query data is obtained according to the prompt box component properties of the data chart, and the first data to be displayed is displayed; wherein the first target query data includes the query data on which the mouse pointer hovering operation is detected.
[0077] The mouse pointer indicates the position of the mouse on the computer's graphical interface; the mouse pointer hovering indicates that the mouse pointer stays on some icons, text or pictures on the web page. In this embodiment, when the mouse pointer is detected hovering at the display position of the query data, the data to be displayed corresponding to the query data (recorded as the first target query data in this embodiment) is obtained. In this embodiment, in order to distinguish it from other names, it is recorded as the first data to be displayed, and the first data to be displayed is displayed in the data chart. The position of displaying the data to be displayed can also be pre-set according to actual conditions; in a specific embodiment, the display position of the first data to be displayed is within the preset range of the display position of the first target query data.
[0078] In one embodiment, the data to be displayed corresponding to the target query data includes part of the information in the query data; in a specific embodiment, taking the application scenario of querying game project related information as an example, when a mouse hover operation is detected, the income information and the corresponding income level information in the game project data are displayed.
[0079] In a specific embodiment, the preset chart type is an echarts chart plug-in, and the tooltip component attribute of the data chart refers to the tooltip attribute. Figure 5 , which is a schematic diagram of displaying corresponding first data to be displayed when a mouse hovering operation is detected in a specific embodiment.
[0080] In another embodiment, after rendering is performed based on the chart attribute data and the query data to obtain a data chart that displays the query data, step S340 is also included: when a mouse click event is detected to be triggered at the display position of the query data, second data to be displayed corresponding to the second target query data is obtained, and the second data to be displayed is displayed; wherein the second target query data includes the query data where the mouse click event is detected.
[0081] The mouse click event (onclick) is an event triggered when the mouse is clicked; in this embodiment, the mouse click event triggered at the display position of the query data can be preset according to the actual situation. Further, when the mouse click event is detected to be triggered at the display position of the query data, the corresponding data to be displayed (recorded as the second data to be displayed in this embodiment) is obtained according to the preset event content and displayed in the data chart. Among them, the position for displaying the data to be displayed can also be preset according to the actual situation.
[0082] In one embodiment, the data to be displayed corresponding to the target query data includes information determined according to the query data; in a specific embodiment, taking the application scenario of querying game project related information as an example, when a mouse click event is detected, the level corresponding to the game project and the total income of the level are displayed at the specified location. It can be understood that in this embodiment, if the user clicks the display graph of the query data with the mouse, the corresponding income level and the total income of the income level will be displayed in the data chart. Figure 6 As shown, it is a schematic diagram of displaying the corresponding second data to be displayed when a mouse click event is detected in a specific embodiment. The content shown in the solid line box corresponds to the second data to be displayed in this embodiment.
[0083] In this embodiment, through two dynamic interactive events (mouse hover display and mouse click display of corresponding data), more information can be displayed in the data chart, providing users with richer information; and by utilizing the inherent properties of the preset chart type and mouse click events, the use of a large number of HTML tags and styles is also avoided, reducing development workload.
[0084] In one embodiment, Figure 7 As shown, after receiving the query data and chart attribute data fed back by the server, the process further includes steps S710 to S730.
[0085] Step S710, reading the level corresponding to each query data.
[0086] Step S720: Displaying a level graphic representing the level in the data chart.
[0087] In one embodiment, the display style of the level graphic includes display graphics and background colors, etc., wherein the display graphics of the level graphic can be preset according to actual conditions, and the background color can be set to the same background color as the query data corresponding to the level.
[0088] Furthermore, in one embodiment, after displaying the level graph in the data chart, the method further includes: displaying the corresponding level name in the data chart. Figure 8Shown is a schematic diagram showing a grade graphic representing a grade in a specific embodiment.
[0089] Step S730, when a mouse click operation is detected at the display position of the level graphic, the third target query data corresponding to the target level graphic is read according to the visibility attributes of the data chart, and the third target query data is displayed or hidden on the display interface; wherein, the target level graphic includes the level graphic where the click operation is detected.
[0090] In this embodiment, if the user clicks on a level graphic representing a level with a mouse, the query data corresponding to the level graphic is displayed or hidden in the data chart. Figure 8 As shown, compared to Figure 6 In the data chart shown, game items corresponding to the medium level are hidden in the data chart.
[0091] In this embodiment, through static display and dynamic interactive events (displaying level graphics and clicking on the display level graphics to display or hide data of the corresponding level), more information can be displayed in the data chart, providing users with richer information; and by utilizing the inherent properties of the preset chart type and mouse click events, the use of HTML tags and styles is also avoided, reducing development workload.
[0092] In one embodiment, Fig. 9 As shown, the process of determining the chart attribute data includes steps S910 to S950:
[0093] Step S910: Divide the target time period into multiple sub-time periods, and determine each sub-time period as a horizontal axis keyword.
[0094] Among them, after dividing the target time period, a plurality of different sub-time periods are obtained; in this embodiment, the sub-time period is used as the horizontal axis keyword. The query data obtained from the preset database all correspond to time, and the corresponding time can be the acquisition time, recording time, storage time, online time of the query data, or the age data corresponding to the time when the query data is collected, etc. It can be understood that after reading the time corresponding to the query data, the query data can be classified into the sub-time period, that is, it falls into different positions on the horizontal axis.
[0095] Step S920, reading the attribution name of each query data, and determining each attribution name as an initial vertical axis keyword.
[0096] The ownership of the data may be any ownership; for example, in one embodiment, the ownership of the query data includes the source address of the query data (for example, the data comes from a web page, a journal text, or statistics, etc.), the owner of the query data (for example, the user of the height and weight information), the company to which the query data belongs (for example, the company to which the game project belongs), etc. In this embodiment, the ownership names corresponding to the query data are read, and all the ownership names are used as the initial vertical axis keywords; the final vertical axis keywords are obtained after the initial vertical axis keywords are screened, which are used as one of the chart attribute data of the query data.
[0097] Step S930 , for any initial vertical axis keyword, the number of query data corresponding to each corresponding coordinate point is counted, and the target coordinate point corresponding to the largest number of query data is determined.
[0098] It can be understood that a set of determined horizontal axis coordinate values and vertical axis coordinate values in the coordinate system can determine a unique coordinate point. In this embodiment, the query data corresponding to the same coordinate point may include multiple query data. The number of query data falling into each coordinate point corresponding to the same initial vertical axis keyword is counted, and the coordinate point with the largest number of query data falling into each initial vertical axis keyword is determined and recorded as the target coordinate point. For example, the vertical axis keyword C AB The corresponding coordinate points (2019Q4, C AB ) includes 3 query data, coordinate points (2020Q1, C AB ) contains 1 corresponding query data, so the vertical axis coordinate C AB The target coordinate point with the largest number of corresponding query data is (2019Q4, C AB ).
[0099] Step S940: numbering the initial vertical axis keywords in sequence based on the number of query data contained in the target coordinate point.
[0100] The initial vertical axis keywords are numbered in sequence according to the number of query data contained in the target coordinate point, including: sequentially adding serial numbers after the initial vertical axis keywords, and the maximum serial number is the number of query data contained in the target coordinate point. In a specific embodiment, the target coordinate point corresponding to the initial vertical axis keyword contains 3, and the initial vertical axis keyword is numbered with the value 3, and the result is: C AB -1, C AB -2 and C AB -3.
[0101] Step S950: determine the initial vertical axis keyword carrying the number as the vertical axis keyword.
[0102] In one specific embodiment, the initial vertical axis keyword after the sequence number is added: C AB -1, C AB -2 and C AB -3 is determined as the vertical axis keyword.
[0103] In this embodiment, by determining the attribution name after the number as the vertical axis keyword, it can be ensured that each data is displayed at a separate coordinate point, and the consequences of displaying multiple data at one coordinate point causing data overlap and incomplete display can be avoided.
[0104] Further, in one embodiment, if Fig.10 As shown, before determining the initial vertical axis keywords carrying numbers as vertical axis keywords, step S1010 is also included: determining the median numbers corresponding to the initial vertical axis keywords.
[0105] Determine the median number corresponding to the initial vertical axis keyword, that is, for each number corresponding to the same initial keyword, calculate the number corresponding to the median value; in a specific embodiment, if only one number is included, the median number is 1. In this embodiment, a median number is determined for all initial vertical axis keywords carrying numbers.
[0106] In this embodiment, determining the initial vertical axis keyword carrying the number as the vertical axis keyword includes step S1020: determining the initial vertical axis keyword carrying the median number as the vertical axis keyword.
[0107] In a specific embodiment, the initial vertical axis keyword C AB The corresponding numbers include C AB -1, C AB -2 and C AB -3 as an example, the median number is the number with a value of 2; in this embodiment, C AB -2 is determined as the vertical axis keyword.
[0108] Furthermore, in the present embodiment, after the initial vertical axis keyword carrying the number is determined as the vertical axis keyword, step S1030 is also included: for any vertical axis keyword: the position of the initial vertical axis keyword carrying the median number is determined as the display position of the vertical axis keyword; step S1040, the line display position corresponding to the smallest number and the largest number in each number is determined as the line display position of the vertical axis.
[0109] With the initial vertical axis keyword C AB The corresponding numbers include C AB -1, C AB -2 and C AB -3 as an example, the smallest number is C AB -1, the maximum number is C AB-3. In this embodiment, C AB -1 and C AB The -3 line display position is determined as the line display position of the vertical axis.
[0110] In this embodiment, the display positions of the vertical axis keywords and the corresponding markings are simplified through certain logic, so that a more concise data chart can be obtained; and, because in this embodiment, each query data has a corresponding display position, in the final displayed data chart, each query data is displayed separately and completely falls into the corresponding coordinate point, which can make the display interface of the data chart neater and the displayed information more complete.
[0111] In one embodiment, after dividing the target time period into multiple sub-time periods and determining each sub-time period as a horizontal axis keyword, the method further includes: arranging the horizontal axis keywords in chronological order to obtain display positions of the horizontal axis keywords and display positions of markings corresponding to the horizontal axis.
[0112] In this embodiment, the horizontal axis keywords are determined based on the target time period of the queried data; in a specific embodiment, the target time period is 2019Q3 to 2020Q2, which is divided into sub-time periods of 2019Q3, 2019Q4, 2020Q1 and 2020Q2, which will be determined as the horizontal axis keywords. 2019Q3, 2019Q4, 2020Q1 and 2020Q2 are arranged in chronological order to obtain the order of display positions corresponding to each horizontal axis keyword; in this embodiment, all horizontal axis keywords need to be displayed, so the horizontal axis keyword's marking line display position and the horizontal axis corresponding marking line display position are displayed.
[0113] In one embodiment, Fig.11 As shown, a data processing method is provided, which is applied to Figure 1 The background server in is taken as an example to illustrate, including steps S1110 to S1140.
[0114] Step S1110, receiving a data query request sent by the front end; the data query request is sent by the front end in response to a data query instruction, and the data query request includes a target time period to be queried.
[0115] Step S1120: acquiring query data within a target time period from a preset database according to the data query request.
[0116] Step S1130, determining the chart attribute data corresponding to the query data according to the preset chart type, wherein the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis.
[0117] Step S1140, sending query feedback results to the front end based on the query data and the chart attribute data; the query feedback results are used to enable the front end to render based on the chart attribute data and the query data to obtain a data chart that displays the query data.
[0118] For the specific limitations on the data processing method, please refer to the limitations on the data processing method above, which will not be repeated here.
[0119] In the above data processing method, after receiving the data query request sent by the front end, the server obtains the query data of the target time period from the preset database according to the target time period to be queried, and determines the chart attribute data corresponding to the query data based on the preset chart type, and feeds back the query data and the corresponding chart attribute data to the front end, so that the front end renders based on the query data and the chart attribute data to obtain a data chart showing the query data. Among them, the chart attribute data includes: the horizontal axis keywords determined according to the query data, the vertical axis keywords determined according to the query data, the display position of the horizontal axis keywords, the display position of the vertical axis keywords, the display position of the markings corresponding to the horizontal axis, and the display position of the markings corresponding to the vertical axis. Since the chart attributes corresponding to the query data are determined according to the requirements of the preset chart type after the data is obtained on the server side, the front end can directly render based on these data to display the query data with the preset chart type, avoiding the front end from using a large number of HTML tags and styles, and reducing the development workload.
[0120] In one embodiment, after obtaining the query data within the target time period in the preset database, the step of: classifying the query data according to the preset level, and classifying the query data into the corresponding level. Taking the application of the above method to providing users with information related to game projects as an example, the preset level can be an income level, such as an annual income level or a quarterly income level, etc. After obtaining the query data within the target time period in the preset database according to the data query request, the step of: classifying the query data within the target time period into the corresponding preset income level according to the income value of each game project.
[0121] The present application also provides an application scenario, which applies the above data processing method. In this application scenario, a graphic showing the distribution of game items launched at different times is implemented on a PC web page, and certain interactive functions are presented by hovering and clicking the mouse. Specifically, the application of the data processing method in this application scenario is as follows:
[0122] like Fig.12The timing diagram of the method of this embodiment is shown. In this embodiment, the front end uses the element-ui framework based on vue, and the preset chart type is the echarts chart plug-in; the backend server is based on egg.js.
[0123] The user opens a web page on the PC and logs in to the account. In this embodiment, enterprise WeChat login is taken as an example; the smart gateway verifies the account information successfully and authorizes the user to log in.
[0124] Receive the data query instruction sent by the user, obtain the start and end time to be queried (the above-mentioned target time period) entered by the user, initiate a data query request, call the relevant query interface, the interface passes parameters including the target time period to the background server, and calls the corresponding background interface.
[0125] After receiving the data query request, the backend server executes the query logic: query and obtain the query data within the target time period from the preset database, including all game projects launched by the investment company, the company name, the launch time, and the corresponding annual income data. The backend server divides the acquired data into levels according to the income level, and calculates the chart attribute data required for the echarts chart to display the query data. The query data and chart attribute data are fed back to the PC web page through the API interface of the VUE framework.
[0126] Among them, according to the number of games launched at that time, a serial number is added after the name of the investment company, so that an investment company is divided into multiple parts on the y-axis. When displayed on the chart, only the name in the middle of the investment company is displayed, and the serial number at the end is removed; in addition, the scale lines and grid lines only show the beginning and end positions of the investment company, and the middle part is hidden. When the game and the corresponding investment company, the game launch time and annual income data are queried in the background, the relevant data of the chart attributes are calculated, and together with the relevant information of the game to be displayed, it is returned to the front end, and the front end can render according to these.
[0127] The chart attribute data includes: the value on the y-axis, the position of the label axisLabel to be displayed on the y-axis, the position of the tick mark axisTick to be displayed on the y-axis, the position of the grid line splitLine to be displayed on the y-axis, the value on the x-axis, etc.
[0128] Example of results related to chart properties to be passed to the front end:
[0129] const xAxis=['2019Q1','2019Q2','2019Q3','2019Q4','2020Q1','2020Q2',...];
[0130] / / The value on the y-axis, the same company is numbered according to the number of games launched at a single time point,
[0131] const yAxis=['company_A_1','company_A_2','company_A_3','company_B_1','company_C_1','company_C_2','company_C_3','company_C_4','company_C_5'];
[0132] / / The position of the tick marks on the y-axis that do not need to be hidden
[0133] / / company A hides company_A_2, and company C hides C_2, C_3, and C_4
[0134] const yAxisTick=[1,3,4,5,9];
[0135] / / The position of the grid lines on the y-axis that do not need to be hidden
[0136] const ySplitLine=[1,3,4,5,9];
[0137] / / The position of the label to be displayed on the y-axis
[0138] / / company_A display position: compay_A_2, company_B display position: company_B_1, company_C display position: company_C_3
[0139] const yAxisLabel = [2, 4, 7]
[0140] The game-related data in the front-end chart needs to be grouped and displayed by income level. Each group of data includes the game name, company, launch time, annual income, etc.; the relevant examples are as follows:
[0141] / / supermeRes: game data with annual revenue of superme level, game: game name, company: company, release_date: launch time, year_revenue: annual revenue
[0142] const supermeRes=[{game:'game1',company:'company_A',release_date:'2020Q1',year_revenue:2000}];
[0143] / / highRes: game data with high annual income,
[0144] const highRes=[{game:'game2',company:'**',release_date:'***',year_revenue:2000}];
[0145] / / mediumRes: Game data with annual revenue of medium level,
[0146] const mediumRes=[{game:'game3',company:'**',release_date:'**',year_revenue:2000}];
[0147] / / lowRes: game data with low annual income,
[0148] const lowRes=[{game:'game4',company:'**',release_date:'**',year_revenue:2000}];
[0149] After receiving the query data and the corresponding chart attribute data, the PC webpage renders it to obtain a data chart showing the query data. Fig.13 Shown is a static display effect and a dynamic interactive event and their corresponding implementation methods included in a displayed data chart in an embodiment.
[0150] In the above embodiment, the echarts plug-in is used to make a graph, and certain logical techniques are used in the background to calculate the attribute information related to echarts and pass it to the front-end page for graphic rendering. This greatly simplifies the development workload, reduces the use of HTML elements and CSS styles, and improves the scalability and extensibility of the entire solution based on some characteristics of the graphic plug-in itself.
[0151] It should be understood that, although each step in each flow chart involved in the above-described embodiment is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each flow chart involved in the above-described embodiment may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps.
[0152] In one embodiment, Fig.14 As shown, a data processing device is provided, which can be a part of a computer device using a software module or a hardware module, or a combination of the two. The device specifically includes: a query request sending module 1410, a receiving module 1420 and a rendering module 1430, wherein:
[0153] The query request sending module 1410 is used to send a data query request to the server in response to a data query instruction; wherein the data query request includes a target time period to be queried.
[0154] The receiving module 1420 is used to receive the query data and chart attribute data fed back by the server; the query data is the data corresponding to the target time period obtained by the server from the preset database, and the chart attribute data is the data corresponding to the query data determined by the server according to the preset chart type. Among them, the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis.
[0155] The rendering module 1430 is used to perform rendering based on the chart attribute data and the query data to obtain a data chart that displays the query data.
[0156] In the above data processing device, the front end responds to the data query instruction sent by the user, sends a data query request carrying the target time period to be queried to the server, then receives the query data and corresponding chart attribute data fed back by the server, and renders according to the chart attribute data and query data, thereby obtaining a data chart showing the query data. Wherein, the query data is the data within the target time period searched and obtained from the preset database by the server after receiving the data query request, and the chart attribute data is the attribute data corresponding to the query data determined by the server according to the preset chart type; then the chart attribute data and the query data are fed back to the front end. Wherein, the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis. The above device finally displays the query data with the preset chart type, wherein the attribute data required to display the query data by the preset chart type is determined by the server for the query data and fed back to the front end, thereby avoiding the use of a large number of HTML tags and greatly simplifying the development workload.
[0157] In one embodiment, the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a display position of a marking line corresponding to the horizontal axis, and a display position of a marking line corresponding to the vertical axis; in this embodiment, the rendering module 1430 of the above-mentioned device is specifically used to: obtain a rectangular coordinate system according to the horizontal axis keyword, the vertical axis keyword, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis, and display the corresponding coordinate point of each query data in the rectangular coordinate system.
[0158] In one embodiment, the rendering module 1430 of the above device is further used to display each query data as a preset graph using a preset graph type based on the graph attribute data.
[0159] In one embodiment, the rendering module 1430 of the above device includes: a level reading unit for reading the level corresponding to each query data; the rendering module 1430 is also used to display the query data corresponding to the same level as the same background color based on the chart attribute data.
[0160] In one embodiment, the above-mentioned device also includes: a detection module, which is used to obtain the first data to be displayed corresponding to the first target query data according to the prompt box component properties of the data chart when a mouse pointer hovering operation is detected at the display position of the query data, and display the first data to be displayed; wherein the first target query data includes the query data on which the mouse pointer hovering operation is detected.
[0161] In one embodiment, the above-mentioned device also includes: a detection module, which is used to obtain the second data to be displayed corresponding to the second target query data and display the second data to be displayed when a mouse click event is detected to be triggered at the display position of the query data; wherein the second target query data includes the query data that detects the triggering of the mouse click event.
[0162] In one embodiment, the above-mentioned device also includes: a level reading unit, which is used to read the level corresponding to each query data; in this embodiment, the rendering module 1430 is also used to display a level graphic representing the level in the data chart; when a mouse click operation is detected at the display position of the level graphic, the third target query data corresponding to the target level graphic is read according to the visibility and hiding attributes of the data chart, and the third target query data is displayed or hidden on the display interface; wherein, the target level graphic includes the level graphic where the click operation is detected.
[0163] In one embodiment, the query data includes game projects launched within the target time period, the company names of the game projects, the annual revenue corresponding to the game projects, and the launch time of the game projects; the vertical axis keywords include the company names; the horizontal axis keywords include the launch time.
[0164] In another embodiment, the present application also provides a data processing device, such as Fig.15 As shown, the device includes: a request receiving module 1510, a data acquisition module 1520, an attribute determination module 1530 and a feedback module 1540. Among them:
[0165] The request receiving module 1510 is used to receive a data query request sent by the front end; the data query request is sent by the front end in response to a data query instruction, and the data query request includes a target time period to be queried.
[0166] The data acquisition module 1520 is used to acquire the query data within the target time period in the preset database according to the data query request. The chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis.
[0167] The attribute determination module 1530 is used to determine the chart attribute data corresponding to the query data according to the preset chart type.
[0168] Feedback module 1540 is used to send query feedback results to the front end based on query data and chart attribute data; the query feedback results are used to enable the front end to render based on the chart attribute data and query data to obtain a data chart that displays the query data.
[0169] After receiving the data query request sent by the front end, the above-mentioned data processing device obtains the query data of the target time period from the preset database according to the target time period to be queried, determines the chart attribute data corresponding to the query data based on the preset chart type, and feeds back the query data and the corresponding chart attribute data to the front end, so that the front end renders based on the query data and the chart attribute data to obtain a data chart showing the query data. Among them, the chart attribute data includes: the horizontal axis keyword determined according to the query data, the vertical axis keyword determined according to the query data, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis. Since the chart attributes corresponding to the query data are determined according to the requirements of the preset chart type after the data is obtained on the server side, the front end can directly render based on these data to display the query data with the preset chart type, avoiding the front end from using a large number of HTML tags and styles, and reducing the development workload.
[0170] Furthermore, in one embodiment, the attribute determination module 1530 of the above-mentioned device includes: a time period division correspondence, which is used to divide the target time period into multiple sub-time periods, and determine each sub-time period as a horizontal axis keyword; a reading unit, which is used to read the attribution name of each query data, and determine each attribution name as an initial vertical axis keyword; a statistical unit, which is used to count the number of query data corresponding to each corresponding coordinate point for any initial vertical axis keyword, and determine the target coordinate point with the largest number of corresponding query data; a numbering unit, which is used to number the initial vertical axis keywords in sequence based on the number of query data contained in the target coordinate point; the attribute determination module 1530 is specifically used to determine the initial vertical axis keyword carrying the number as the vertical axis keyword.
[0171] In one embodiment, the above-mentioned device also includes: a median number determination unit, which is used to determine the median number corresponding to each initial vertical axis keyword; the attribute determination module 1530 is specifically used to determine the initial vertical axis keyword carrying the median number as the vertical axis keyword; the device also includes: a keyword display position determination unit, which is used to determine the position of the initial vertical axis keyword carrying the median number as the display position of the vertical axis keyword for any vertical axis keyword; a marking display position determination unit, which is used to determine the marking display position corresponding to the minimum number and the maximum number in each number as the marking display position of the vertical axis.
[0172] The specific definition of the data processing device and the data processing device can refer to the definition of the data processing method above, which will not be repeated here. The above-mentioned data processing device and each module in the data processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0173] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0174] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0175] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0176] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0177] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0178] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0179] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0180] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: The method comprises: In response to the data query instruction, a data query request is sent to the server; wherein the data query request includes a target time period to be queried; Receive query data, chart attribute data and the level corresponding to the query data fed back by the server; the query data is the data corresponding to the target time period obtained by the server from a preset database, the chart attribute data is the data corresponding to the query data determined by the server according to a preset chart type, and the level corresponding to the query data is that the server classifies the query data according to the preset level and classifies the query data into the corresponding level; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a marking line display position corresponding to the horizontal axis, and a marking line display position corresponding to the vertical axis; Rendering is performed based on the chart attribute data and the query data to obtain a data chart showing the query data; The process of determining the chart attribute data includes: dividing the target time period into multiple sub-time periods, and determining each of the sub-time periods as the horizontal axis keyword; reading the attribution name of each of the query data, and determining each of the attribution names as the initial vertical axis keyword; the attribution of the query data includes the source address of the query data and the owner of the query data; for each of the initial vertical axis keywords, the number of query data falling into each coordinate point corresponding to each initial vertical axis keyword is counted respectively, and for each initial vertical axis keyword, a coordinate point with the largest number of query data falling into is determined as the target coordinate point; the initial vertical axis keywords are numbered in sequence based on the number of query data contained in the target coordinate point; the median number corresponding to each initial vertical axis keyword is determined, and the initial vertical axis keyword carrying the median number is determined as the vertical axis keyword; for any vertical axis keyword, the position of the initial vertical axis keyword carrying the median number is determined as the display position of the vertical axis keyword; the marking display position corresponding to the smallest number and the largest number in each number is determined as the marking display position of the vertical axis.
2. The data processing method according to claim 1, characterized in that: The rendering based on the chart attribute data and the query data to obtain a data chart showing the query data includes: According to the horizontal axis keyword, vertical axis keyword, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis, a rectangular coordinate system is obtained, and the corresponding coordinate points of each query data in the rectangular coordinate system are displayed.
3. The data processing method according to claim 2, characterized in that: The rendering based on the chart attribute data and the query data to obtain a data chart showing the query data also includes: Based on the chart attribute data, the query data are displayed as preset graphics respectively using the sequence attribute of the preset chart type; and / or, Reading the level corresponding to each query data; Based on the graph attribute data, query data corresponding to the same level are displayed with the same background color.
4. The data processing method according to claim 3, characterized in that: After rendering is performed based on the chart attribute data and the query data to obtain a data chart showing the query data, the method further includes: When a mouse pointer hovering operation is detected at the display position of the query data, first data to be displayed corresponding to the first target query data is obtained according to the prompt box component attribute of the data chart, and the first data to be displayed is displayed; wherein the first target query data includes the query data where the mouse pointer hovering operation is detected; and / or, When a mouse click event is detected to be triggered at the display position of the query data, second data to be displayed corresponding to the second target query data is obtained, and the second data to be displayed is displayed; wherein the second target query data includes the query data that detects the triggering of the mouse click event.
5. The data processing method according to claim 4, characterized in that: After receiving the query data, the chart attribute data and the level corresponding to the query data fed back by the server, the method further includes: displaying a grade graphic representing the grade in the data chart; When a mouse click operation is detected at the display position of the level graphic, the third target query data corresponding to the target level graphic is read according to the visibility attributes of the data chart, and the third target query data is displayed or hidden on the display interface; wherein, the target level graphic includes the level graphic where the click operation is detected.
6. A data processing method, characterized in that: The method comprises: receiving a data query request sent by a front end; the data query request is sent by the front end in response to a data query instruction, and the data query request includes a target time period to be queried; Acquire query data within the target time period in a preset database according to the data query request, and classify the query data according to preset levels, and classify the query data into corresponding levels; Determining chart attribute data corresponding to the query data according to a preset chart type; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a marking line display position corresponding to the horizontal axis, and a marking line display position corresponding to the vertical axis; Sending query feedback results to the front end based on the query data and the chart attribute data; the query feedback results are used to enable the front end to render based on the chart attribute data and the query data to obtain a data chart showing the query data; The process of determining the chart attribute data includes: dividing the target time period into multiple sub-time periods, and determining each of the sub-time periods as the horizontal axis keyword; reading the attribution name of each of the query data, and determining each of the attribution names as the initial vertical axis keyword; the attribution of the query data includes the source address of the query data and the owner of the query data; for each of the initial vertical axis keywords, the number of query data falling into each coordinate point corresponding to each initial vertical axis keyword is counted respectively, and for each initial vertical axis keyword, a coordinate point with the largest number of query data falling into is determined as the target coordinate point; the initial vertical axis keywords are numbered in sequence based on the number of query data contained in the target coordinate point; the median number corresponding to each initial vertical axis keyword is determined, and the initial vertical axis keyword carrying the median number is determined as the vertical axis keyword; for any vertical axis keyword, the position of the initial vertical axis keyword carrying the median number is determined as the display position of the vertical axis keyword; the marking display position corresponding to the smallest number and the largest number in each number is determined as the marking display position of the vertical axis.
7. A data processing device, characterized in that: The device comprises: A query request sending module, used to send a data query request to the server in response to a data query instruction; wherein the data query request includes a target time period to be queried; A receiving module, used for receiving query data, chart attribute data and the level corresponding to the query data fed back by the server; the query data is the data corresponding to the target time period obtained by the server from a preset database, the chart attribute data is the data corresponding to the query data determined by the server according to a preset chart type, and the level corresponding to the query data is the server classifying the query data according to the preset level and classifying the query data into the corresponding level; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a marking line display position corresponding to the horizontal axis, and a marking line display position corresponding to the vertical axis; A rendering module, used for rendering based on the chart attribute data and the query data to obtain a data chart showing the query data; It also includes an attribute determination module, including: a time period division unit, which is used to divide the target time period into multiple sub-time periods, and determine each of the sub-time periods as the horizontal axis keyword; a reading unit, which is used to read the attribution name of each of the query data, and determine each of the attribution names as the initial vertical axis keyword; a statistical unit, which is used to count the number of query data falling into each coordinate point corresponding to each initial vertical axis keyword for each of the initial vertical axis keywords, and determine a coordinate point with the largest number of query data falling into each initial vertical axis keyword for each initial vertical axis keyword, and determine it as the target coordinate point; a numbering unit, which is used to number the initial vertical axis keywords in sequence based on the number of query data contained in the target coordinate point; a median number determination unit, which is used to determine the median number corresponding to each initial vertical axis keyword, and determine the initial vertical axis keyword carrying the median number as the vertical axis keyword; a keyword display position determination unit, which is used to determine the position of the initial vertical axis keyword carrying the median number as the display position of the vertical axis keyword for any vertical axis keyword; a marking line display position determination unit, which is used to determine the marking line display position corresponding to the smallest number and the largest number in each number as the marking line display position of the vertical axis.
8. The device according to claim 7, characterized in that The rendering module is further used for: According to the horizontal axis keyword, vertical axis keyword, the display position of the horizontal axis keyword, the display position of the vertical axis keyword, the display position of the marking line corresponding to the horizontal axis, and the display position of the marking line corresponding to the vertical axis, a rectangular coordinate system is obtained, and the corresponding coordinate points of each query data in the rectangular coordinate system are displayed.
9. The device according to claim 8, characterized in that The rendering module is further used to: based on the chart attribute data, use the sequence attribute of the preset chart type to display each of the query data as a preset graph; The rendering module includes a level reading unit, which is used to read the level corresponding to each query data; The rendering module is further used to display the query data corresponding to the same level as the same background color based on the chart attribute data.
10. The device according to claim 9, characterized in that Also included are detection modules for: When a mouse pointer hovering operation is detected at the display position of the query data, first data to be displayed corresponding to the first target query data is obtained according to the prompt box component attribute of the data chart, and the first data to be displayed is displayed; wherein the first target query data includes the query data where the mouse pointer hovering operation is detected; And / or, when a mouse click event is detected to be triggered at the display position of the query data, second data to be displayed corresponding to the second target query data is obtained and the second data to be displayed is displayed; wherein the second target query data includes the query data that detects the triggering of the mouse click event.
11. The device according to claim 10, characterized in that The rendering module is further used for: A level graphic representing the level is displayed in the data chart; when a mouse click operation is detected at the display position of the level graphic, third target query data corresponding to the target level graphic is read according to the visibility attribute of the data chart, and the third target query data is displayed or hidden on the display interface; wherein the target level graphic includes the level graphic at which the click operation is detected.
12. A data processing device, characterized in that: The device comprises: A request receiving module, used to receive a data query request sent by the front end; the data query request is sent by the front end in response to a data query instruction, and the data query request includes a target time period to be queried; A data acquisition module, configured to acquire the query data within the target time period from a preset database according to the data query request, and classify the query data according to preset levels, and classify the query data into corresponding levels; an attribute determination module, for determining the chart attribute data corresponding to the query data according to a preset chart type; wherein the chart attribute data includes: a horizontal axis keyword determined according to the query data, a vertical axis keyword determined according to the query data, a display position of the horizontal axis keyword, a display position of the vertical axis keyword, a display position of a marking line corresponding to the horizontal axis, and a display position of a marking line corresponding to the vertical axis; A feedback module, used to send a query feedback result to the front end based on the query data and the chart attribute data; the query feedback result is used to enable the front end to render based on the chart attribute data and the query data to obtain a data chart showing the query data; The attribute determination module further includes: a time period division unit, used to divide the target time period into a plurality of sub-time periods, and determine each of the sub-time periods as the horizontal axis keyword; a reading unit, used to read the attribution name of each of the query data, and determine each of the attribution names as the initial vertical axis keyword; a counting unit, used to count the number of query data corresponding to each corresponding coordinate point for any of the initial vertical axis keywords, and determine the target coordinate point with the largest number of corresponding query data; a numbering unit, used to number the initial vertical axis keywords in sequence based on the number of query data contained in the target coordinate point; The attribute determination module is used to determine the initial vertical axis keyword carrying the number as the vertical axis keyword.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data display method and device for Echarts (Enterprise Charts)
CN106610926A
