Data display method and device, equipment and storage medium
By judging and converting the tree structure data in the interactive feedback data of the agent, the problem of not being able to adaptively display different business data in the prior art is solved, and a more beautiful display effect is achieved.
Patent Information
- Application Number
- CN202510097262.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
The display interface of existing agents cannot adaptively display the interactive feedback data corresponding to different services, especially the tree structure data, resulting in the unsightly display effect.
By responding to the user's interaction request to the target agent, determine the interactive feedback data corresponding to the interaction request, determine whether the tree structure data needs to be converted into tabular data, convert it if necessary, and display it in the display interface.
The adaptive display of tree structure data in the interactive feedback data corresponding to different services on the display interface is realized, which improves the aesthetics of the display.
Smart Images

Figure CN120045759A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the technical field of data display, and in particular, to a data display method, apparatus, device, and storage medium. Background Art
[0002] An agent refers to an entity that can perceive the environment and take actions to achieve specific goals. Agents are widely used in the field of artificial intelligence and are commonly found in automated systems, robots, virtual assistants, and game characters, etc.
[0003] In the prior art, the display method of interaction feedback data on the display interface of an agent is generally to display a template configured with interaction feedback data in the display interface. Since the template used in this display method is obtained by one-to-one customized configuration according to the characteristics of the business, the configured template can only correspond to one target business, so the configured template cannot be applied to different businesses. Therefore, the interaction feedback data corresponding to different businesses cannot be adaptively displayed in the display interface. Summary of the Invention
[0004] The present application provides a data display method, apparatus, device, and storage medium, which can realize the adaptive display of tree structure data in the interaction feedback data corresponding to an interaction request on a display interface.
[0005] In a first aspect, a data display method is provided, including:
[0006] Responding to an interaction request of a user for a target agent, determining interaction feedback data corresponding to the interaction request, where the interaction feedback data includes at least one tree structure data;
[0007] Judging whether the tree structure data needs to be converted into table data according to the structure information corresponding to the tree structure data and the spatial dimension information of the display interface;
[0008] If the tree structure data needs to be converted into table data, converting the tree structure data into table data;
[0009] Displaying the table data converted from the tree structure data and / or the tree structure data that does not need to be converted into table data in the display interface.
[0010] In a second aspect, a data display apparatus is provided, including:
[0011] An interaction feedback data determination module, configured to respond to an interaction request of a user for a target agent, and determine interaction feedback data corresponding to the interaction request, where the interaction feedback data includes at least one tree structure data;
[0012] A conversion determination module, configured to determine whether the tree - structured data needs to be converted into table data according to the structure information corresponding to the tree - structured data and the spatial dimension information of the display interface;
[0013] A data conversion module, configured to convert the tree - structured data into table data if the tree - structured data needs to be converted into table data;
[0014] A display module, configured to display the table data converted from the tree - structured data and / or the tree - structured data that does not need to be converted into table data on the display interface.
[0015] In a third aspect, an electronic device is provided, including: a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or its various implementation manners.
[0016] In a fourth aspect, a computer - readable storage medium is provided, which is used to store a computer program, and the computer program enables a computer to execute the method in the first aspect or its various implementation manners.
[0017] Through the technical solution provided by this application, after responding to a user's interaction request for a target intelligent agent, it is determined whether the tree - structured data needs to be converted into table data according to the structure information corresponding to the tree structure in the interaction feedback data corresponding to the interaction request and the spatial dimension information of the display interface; then, after determining that the tree - structured data needs to be converted into table data, the tree - structured data is converted into table data; finally, the table data converted from the tree - structured data and / or the tree - structured data that does not need to be converted into table data is displayed on the display interface. This application can realize the adaptive display of the tree structure in the interaction feedback data corresponding to different services on the display interface, and at the same time, make the display of the interaction feedback data on the display interface have aesthetics.
[0018] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is an application scenario diagram provided for an embodiment of this application;
[0021] Figure 2Flowchart of a data display method provided by an embodiment of the present application;
[0022] Figure 3 Schematic diagram of the tree structure of tree structure data A provided by an embodiment of the present application;
[0023] Figure 4 Schematic diagram of the tree structure of tree structure data C provided by an embodiment of the present application;
[0024] Figure 5 Schematic diagrams before and after adjustment of the display space corresponding to target data in the display interface provided by an embodiment of the present application; ( Figure 5 (a) Schematic diagram shown in the display interface when the display spaces corresponding to target data 1 to 5 are preset space sizes; Figure 5 (b) Schematic diagram shown in the display interface after the display spaces corresponding to target data 1 to 5 are adjusted; )
[0025] Figure 6 Schematic diagram of a data display device provided by an embodiment of the present application;
[0026] Figure 7 Schematic block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] An Agent refers to an entity that can perceive the environment and take actions to achieve specific goals. It can be software, hardware, or a system, possessing autonomy, adaptability, and interaction capabilities. By perceiving changes in the environment, the Agent makes judgments and decisions based on the knowledge and algorithms it has learned, and then executes actions to affect the environment or reach the predetermined goals. Agents are widely used in the field of artificial intelligence, commonly found in automated systems, robots, virtual assistants, and game characters, etc. The core lies in its ability to learn autonomously and evolve continuously to better complete tasks and adapt to complex environments.
[0030] In the prior art, the display interface of an Agent is generally in the form of a dialogue window. Currently, in the industry, for the display method of interaction feedback data of the Agent's display interface, especially for the tree-structured data in the interaction feedback data, it is generally to display the interaction feedback data in a template customized according to the characteristics of the target business and then display it in the display interface. This display method not only requires a large amount of front-end code development and one-to-one configuration according to different businesses, but also because the configured template is relatively single and can only correspond to one target business, it cannot apply the configured template to different businesses. Therefore, the interaction feedback data corresponding to different businesses cannot be adaptively displayed in the display interface.
[0031] To solve the above technical problems, the inventive concept of this application is: in response to a user's interaction request for a target Agent, determine the interaction feedback data corresponding to the interaction request, where the interaction feedback data at least includes one tree-structured data; according to the structure information corresponding to the tree-structured data and the spatial dimension information of the display interface, determine whether the tree-structured data needs to be converted into table data; if the tree-structured data needs to be converted into table data, then convert the tree-structured data into table data; display the table data converted from the tree-structured data and / or the tree-structured data that does not need to be converted into table data in the display interface. By determining whether the tree-structured data needs to be converted into table data according to the structure information corresponding to the tree-structured data in the interaction feedback data corresponding to the interaction request and the spatial dimension information of the display interface, this application can enable the tree-structured data in the interaction feedback data corresponding to the interaction request between the target Agent and the business server to be adaptively displayed in the display interface, and at the same time, make the display of the interaction feedback data in the display interface have aesthetic appeal.
[0032] It should be understood that the technical solution of this application can be applied to the following scenarios, but is not limited to:
[0033] In some implementable ways, Figure 1 This is an application scenario diagram provided by an embodiment of this application, as Figure 1As shown in the figure, this application scenario may include an electronic device 110 and a network device 120. The electronic device 110 may establish a connection with the network device 120 through a wired network or a wireless network.
[0034] Exemplarily, the electronic device 110 may be a desktop computer, a laptop computer, a tablet computer, etc., but is not limited thereto. The network device 120 may be a terminal device or a server, but is not limited thereto. In an embodiment of the present application, the electronic device 110 may send a request message to the network device 120, and the request message may be used to request to obtain interaction feedback data corresponding to the interaction request. Further, the electronic device 110 may receive a response message sent by the network device 120, and the response message includes the interaction feedback data corresponding to the interaction request.
[0035] In addition, Figure 1 Exemplarily, one electronic device 110 and one network device 120 are given. In fact, other numbers of electronic devices and network devices may be included, and the present application does not limit this.
[0036] In some other implementable manners, the technical solution of the present application may also be executed by the above-mentioned electronic device 110, or the technical solution of the present application may also be executed by the above-mentioned network device 120, and the present application does not limit this.
[0037] After introducing the application scenario of the embodiments of the present application, the technical solution of the present application will be elaborated in detail below:
[0038] Figure 2 is a flowchart of a data display method provided for an embodiment of the present application. This method is applied to a service server and may be executed by an electronic device 110 as Figure 1 shown, but is not limited thereto. As Figure 2 shown, this method may include the following steps:
[0039] S210. In response to a user's interaction request for a target intelligent agent, determine interaction feedback data corresponding to the interaction request, where the interaction feedback data includes at least one tree structure data.
[0040] It should be noted that after the service server responds to the user's interaction request for the target intelligent agent, the interaction feedback data returned by the service server corresponding to the target intelligent agent may all be tree structure data, or may include data of other data display types, such as table data; therefore, before determining the interaction feedback data corresponding to the interaction request, the following steps are further included:
[0041] S211. Construct the interaction feedback data respectively to obtain a tree storage structure corresponding to each interaction feedback data;
[0042] S212. Analyze the tree - shaped storage structures corresponding to each piece of interaction feedback data based on the interface template features in the interface template library, and determine the data display types corresponding to each piece of interaction feedback data; the interface template features include node depth features, node breadth features, and leaf node attribute features; the data display types include tree - shaped display and table display.
[0043] S213. Determine the tree - shaped structure data and table data in the interaction feedback data according to the data display types corresponding to each piece of interaction feedback data.
[0044] Exemplarily, if the interface template feature 1 corresponding to the tree - shaped structure data is: the node depth is greater than 2, the node breadth is greater than 1, and the leaf node attribute is having an ID. If the depth, breadth, and leaf node attribute in the tree - shaped storage structure corresponding to the interaction feedback data A all match the interface template feature 1, then the interaction feedback data A is determined as tree - shaped structure data; if the interface template feature 2 corresponding to the table data is: the depth is 3, the breadth is greater than 1, the leaf node attribute is having no ID and can be converted into a number. If the depth, breadth, and leaf node attribute in the tree - shaped storage structure corresponding to the interaction feedback data B all match the interface template feature 2, then the interaction feedback data A is determined as table data.
[0045] S220. Judge whether the tree - shaped structure data needs to be converted into table data according to the structure information corresponding to the tree - shaped structure data and the spatial dimension information of the display interface.
[0046] Since when the tree - shaped structure of the tree - shaped structure data displayed on the display interface does not match the spatial dimension of the display interface, such as when the depth or breadth of the tree - shaped structure data is too large, the display effect of the tree - shaped structure data on the display interface is likely to be poor in aesthetics, resulting in the tree - shaped structure data being unfriendly to be displayed in a tree - shaped structure on the display interface; while when the table data is displayed on the display interface, the table template in the interface template library can be set according to the spatial dimension of the display interface, so the table data can display the data in a more regular way on the display interface; therefore, through the structure information corresponding to the tree - shaped structure data and the spatial dimension information of the display interface, judge whether the tree - shaped structure of the tree - shaped structure data displayed on the display interface matches the display interface, that is, judge whether the display effect of the tree - shaped structure data on the display interface is aesthetic, and when the display effect of the tree - shaped structure data on the display interface is not aesthetic, determine that the tree - shaped structure data needs to be converted into table data so that in the subsequent steps, the tree - shaped structure data can be converted into table data and displayed on the display interface.
[0047] S230. If the tree - shaped structure data needs to be converted into table data, then convert the tree - shaped structure data into table data.
[0048] It should be noted that when converting tree - structured data into tabular data, a table template can be determined in the interface template library according to the spatial dimension information of the display interface, and then the nodes in the tree - structured data are filled into the table template to convert the tree - structured data into tabular data that matches the display interface.
[0049] S240: Display the tabular data converted from the tree - structured data and / or the tree - structured data that does not need to be converted into tabular data on the display interface.
[0050] It should be noted that the tree - structured data that does not need to be converted into tabular data can be directly displayed on the display interface according to its own tree structure.
[0051] Here, displaying the tabular data converted from the tree - structured data that needs to be converted into tabular data on the display interface can enable the tree - structured data to automatically configure the display mode according to the spatial dimension information of the display interface, thereby improving the aesthetics of the display of the tree - structured data on the display interface.
[0052] Using the above - mentioned method, after responding to the user's interaction request for the target intelligent agent, by judging whether the tree - structured data needs to be converted into tabular data according to the structure information corresponding to the tree structure in the interaction feedback data corresponding to the interaction request and the spatial dimension information of the display interface; then, after judging that the tree - structured data needs to be converted into tabular data, converting the tree - structured data into tabular data; finally, displaying the tabular data converted from the tree - structured data and / or the tree - structured data that does not need to be converted into tabular data on the display interface; the present application can enable the tree - structured data in the interaction feedback data corresponding to the interaction request of the target intelligent agent to the business server to be adaptively displayed on the display interface, and at the same time, enable the display of the interaction feedback data on the display interface to be aesthetic.
[0053] In some possible implementation embodiments, the structure information of the tree - structured data includes depth information, breadth information, and node layer information; judging whether the tree - structured data needs to be converted into tabular data according to the structure information corresponding to the tree - structured data and the spatial dimension information of the display interface may include the following steps:
[0054] S310: Judge whether the node layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the nodes in the first layer of the tree - structured data.
[0055] Here, the node layer information includes the node quantity information, layer height information, and maximum depth information corresponding to the node layer.
[0056] S320: If the node layer does not need to be split, it is determined that the tree - structured data does not need to be converted into tabular data.
[0057] It can be understood that when the node layer at the first level in the tree structure data does not need to be split, the tree structure data cannot be converted into table data. Therefore, here, by judging whether the node layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the node layer, it is possible to quickly and directly determine the tree structure data that does not need to be converted into table data.
[0058] S330. If the node layer needs to be split, when the depth information of the tree structure data is greater than the preset depth and / or when the breadth information of the tree structure data is greater than the preset breadth, it is determined that the tree structure data needs to be converted into table data.
[0059] Since when the depth information and / or breadth information of the tree structure data is too large, the aesthetics of displaying the tree structure data in the tree structure on the display interface is poor. Therefore, here, when the depth information of the tree structure data is greater than the preset depth and / or when the breadth information of the tree structure data is greater than the preset breadth, the tree structure data is determined to need to be converted into table data, so as to avoid the tree structure data being displayed in the tree structure on the display interface. At the same time, by converting the tree structure into table data, the tree structure data can be displayed in the form of table data on the display interface, which can improve the aesthetics of the tree structure data displayed on the display interface.
[0060] By adopting the above method, after judging whether the node layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the node layer at the first level in the tree structure data, it is possible to directly determine the tree structure data that does not need to be converted into table data; then when the node layer in the tree structure data needs to be split, that is, when the tree structure may need to be converted into table data, according to the depth information of the tree structure data being greater than the preset depth and / or when the breadth information of the tree structure data is greater than the preset breadth, it is determined that the tree structure data needs to be converted into table data, so that the tree structure data is displayed in the form of table data on the display interface to improve the aesthetics of the tree structure data displayed on the display interface.
[0061] In some possible embodiments, if the tree structure data needs to be converted into table data, then converting the tree structure data into table data may include the following steps:
[0062] S410. In the order from the highest to the lowest node level, each node layer in the tree structure data is sequentially used as the first activation layer.
[0063] It can be understood that the node layer at the first level in the tree - structured data is used as the first activation layer. After performing step S420, the node layer below the first activation layer, that is, the node layer at the second level, is used as the new first activation layer, so as to sequentially use each node layer in the tree - structured data as the first activation layer in the order from the highest node level to the lowest node level.
[0064] S420. Generate status information on whether the first activation layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the first activation layer.
[0065] Here, when generating the status information on whether the first activation layer needs to be split, in the order from the highest node level to the lowest node level, first use the node layer at the first level as the first activation layer, and generate the status information on whether it needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to this first activation layer, that is, generate the status information on whether the node layer at the first level needs to be split; then use the node layer at the second level as the new first activation layer, repeat step S420 to generate the status information on whether this first activation layer needs to be split, that is, generate the status information on whether the node layer at the second level needs to be split; and so on, use the node layers at other levels as new first activation layers in the order from the highest node level to the lowest node level, repeat step S420 to generate the status information on whether this first activation layer needs to be split, that is, generate the status information on whether the node layers at the remaining levels need to be split.
[0066] Among them, in order to quickly generate the status information corresponding to each node layer, generating the status information on whether the first activation layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the first activation layer may include the following steps: in the order from the highest node level to the lowest node level, generate the status information on whether each first activation layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to each first activation layer; when the status information of a first activation layer is that it does not need to be split, determine that the status information corresponding to each of all the first activation layers at the lower level of this first activation layer does not need to be split.
[0067] Exemplarily, the tree - structured data A includes node layer 1, node layer 2, node layer 3, node layer 4, and node layer 5 arranged in the order from the highest node level to the lowest node level. In the order from the highest node level to the lowest node level, when node layer 1, node layer 2, and node layer 3 are used as the first activation layer respectively, the status information generated for each first activation layer is that it needs to be split, while when node layer 4 is used as the first activation layer and the status information generated for this first activation layer is that it does not need to be split, then the status information generated when node layer 5 is used as the first activation layer can be directly determined as not needing to be split.
[0068] S430. After obtaining the status information of each node layer in the tree - structured data, perform tabular data conversion processing on the tree - structured data based on the status information.
[0069] It can be understood that in step S420, when each node layer can be obtained as the first activation layer, the status information corresponding to each first activation layer can be obtained. Therefore, the status information of each node layer in the tree - structured data can be determined according to the status information of the corresponding first activation layer.
[0070] Here, after obtaining the status information of each node layer in the tree - structured data, it can be determined whether each node layer needs to be split, that is, it can be determined whether each node layer can be converted into tabular data, and then the node layers in the tree - structured data that can be converted into tabular data and the node layers that cannot be converted into tabular data can be determined, so as to complete the tabular data conversion processing of the tree - structured data based on the node layers that can be converted into tabular data.
[0071] Using the above - mentioned method, according to the spatial dimension information of the display interface and the node layer information corresponding to the node layer, generate the status information of each node layer in the tree - structured data in the order from high to low of the node hierarchy; then, after obtaining the status information of each node layer in the tree - structured data, perform tabular data conversion processing on the tree - structured data only based on the status information, and the tabular data conversion processing of the tree - structured data can be realized.
[0072] In some possible implementation embodiments, generating the status information of whether the first activation layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the first activation layer may include the following steps:
[0073] S510. Calculate the splitting coefficient corresponding to the first activation layer according to the spatial dimension information of the display interface and the node layer information corresponding to the first activation layer.
[0074] Here, the splitting coefficient corresponding to the first activation layer is calculated by the following formula:
[0075]
[0076] Where: P is the splitting coefficient; H toolbar is the height information of the display interface, and the height information of the display interface is determined according to the spatial dimension information of the display interface; n is the node quantity information corresponding to the first activation layer; H span is the layer height information corresponding to the first activation layer; m is the maximum depth information corresponding to the first activation layer; H deep is the distance information occupied by all nodes located below the first activation layer when expanded.
[0077] ToFigure 3 Taking the tree - structured data A shown as an example, if the first activation layer is the second - layer node layer in the tree - structured data, that is, the nodes in the first activation layer include node 1, node 2, and node 3, then n is 3; H span H is the layer - height information corresponding to the second - layer node layer, that is, the height occupied by node 1, node 2, and node 3; m is 4, that is, the maximum depth information corresponding to the first activation layer is the depth information corresponding to node 3 in the first activation layer; H deep H is the distance information occupied by nodes 4, 5, 6, and 7 when expanded.
[0078] S520. Compare the splitting coefficient with the first threshold; the first threshold is preset, and the first threshold is not less than 0.
[0079] S530. If the splitting coefficient is greater than the first threshold, determine that the status information of a first activation layer is not in need of splitting.
[0080] S540. If the splitting coefficient is less than the first threshold, determine that the status information of the first activation layer is in need of splitting.
[0081] It should be noted that the numerical setting of the first threshold can affect the data display type of the tree - structured data on the display interface.
[0082] Exemplarily, when the first threshold is set to 0, since the splitting coefficient corresponding to the first activation layer in the tree - structured data is always greater than 0, the tree - structured data is displayed in a tree structure on the display interface. Therefore, when the tree - structured data A as shown in Figure 3 needs to be displayed in a tree structure on the display interface, the first threshold can be preset to 0 to ensure that the tree - structured data A is displayed in a tree structure on the display interface.
[0083] Also exemplarily, when the first threshold is set to a relatively large value, since the splitting coefficients corresponding to the first activation layers polled in sequence in the tree - structured data are all less than the first threshold, the tree - structured data is displayed in tabular data on the display interface. Therefore, when the tree - structured data B needs to be displayed in tabular data on the display interface, the first threshold can be preset to a relatively large value to ensure that the tree - structured data B is displayed in tabular data on the display interface.
[0084] By adopting the above method, by comparing the splitting coefficient corresponding to the first activation layer calculated according to the spatial dimension information of the display interface and the node - layer information corresponding to the first activation layer with the first threshold, it can be quickly determined whether the status information of the first activation layer is not in need of splitting or in need of splitting, so as to perform the conversion of tabular data on the tree - structured data based on the status information of the first activation layer in subsequent steps.
[0085] In some possible embodiments, the conversion of tree - structured data into tabular data based on status information may include the following steps:
[0086] S610. If the status information of a first activation layer is that splitting is required, then convert the nodes in the first activation layer into tabular data.
[0087] Here, when converting the nodes in a first activation layer into tabular data, the nodes in the first activation layer can be placed in a preset table template so that the nodes in the first activation layer are displayed in the display interface in the form of tabular data.
[0088] Taking Figure 4 the tree - structured data C as an example, by analyzing the status information of each node layer in the tree - structured data C from top to bottom, it can be determined that the status information corresponding to each node layer in the tree - structured data C is that splitting is required. Then, the nodes in the tree - structured data C can be converted into the following tabular data:
[0089] Id Name URL 1 Hehe - 2 Haha - 3 Gege Table
[0090] Among them, when clicking on the URL of node 3, the following table will appear:
[0091] Id Name URL 4 Test Table
[0092] When clicking on the URL of node 4, the following table will appear:
[0093] Id Name URL 5 Test1 Table
[0094] When clicking on the URL of node 5, the following table will appear:
[0095] Id Name URL 6 Test2 -
[0096] S620. If the status information of a first activation layer is that splitting is not required, or the number of levels of a first activation layer reaches a preset number of levels, then store the nodes in the first activation layer and the nodes below the first activation layer in a sub - tree structure at the URL address.
[0097] When the status information of a first activation layer indicates that splitting is not required, it can be determined that all nodes below the first activation layer do not need to be split. After converting the nodes above the first activation layer into tabular data, the nodes in the first activation layer and the nodes below the first activation layer are directly split from the tree-structured data, so that the nodes in the first activation layer and the nodes below the first activation layer can be stored in a sub-tree structure and the sub-tree structure is stored at the URL address, so that by clicking on the URL address on the display interface, the nodes in the first activation layer and the nodes below the first activation layer can be displayed in a sub-tree structure on the display interface.
[0098] When the number of levels of a first activation layer reaches the preset number of levels, if the status information of the node layer one level below the first activation layer still indicates that splitting is required, then there will be a situation where the tree-structured data C in the example of step S610 is converted into multiple tabular data with hierarchical relationships, which affects the aesthetics of the display of the tree-structured data on the display interface. Therefore, here, when the number of levels of a first activation layer reaches the preset number of levels, the nodes in the first activation layer and the nodes below the first activation layer are stored in a sub-tree structure at the URL address, so that the nodes in the first activation layer and the nodes below the first activation layer can be displayed in a sub-tree structure on the display interface, improving the aesthetics of the tree-structured data on the display interface.
[0099] S630. After storing the sub-tree structure at the URL address, in the node layer one level above the first activation layer, determine the target nodes that have a hierarchical relationship with the sub-tree structure, so as to add the URL address to the corresponding position of the target nodes in the tabular data.
[0100] To ensure that the sub-tree structure has a corresponding hierarchical relationship with the nodes in the tabular data, here, after determining the target nodes that have a hierarchical relationship with the sub-tree structure in the node layer one level above the first activation layer, when adding the URL address to the corresponding position of the target nodes in the tabular data, by clicking on the URL address corresponding to the target nodes, the sub-tree structure can be displayed on the display interface.
[0101] Exemplarily, the final tabular data formed by adding the URL address to the corresponding position of the target nodes in the tabular data is as follows:
[0102] Id Name URL 1 Hehe - 2 Haha - 3 Gege Tree
[0103] In this example, by clicking on "Tree" in the URL list corresponding to node 3, the subordinate nodes that have a hierarchical relationship with node 3 can be displayed in a sub-tree structure on the display interface.
[0104] By adopting the above method, based on the status information of the first activation layer, nodes in the first activation layer that need to be split can be converted into tabular data; and when the status information of the first activation layer indicates that splitting is not required, or the number of levels of the first activation layer reaches a preset number of levels, the nodes in the first activation layer and the nodes below the first activation layer are stored in a sub-tree structure at the URL address. Then, according to the determined target nodes that have a hierarchical relationship with the sub-tree structure, the URL address is added to the corresponding position of the target nodes in the tabular data, completing the conversion of the tree structure data into tabular data, so as to improve the aesthetics of the tree structure data on the display interface.
[0105] In some possible implementation embodiments, when the number of levels of a first activation layer reaches a preset number of levels, storing the nodes in the first activation layer and the nodes below the first activation layer in a sub-tree structure at the URL address may include the following steps:
[0106] S710. Determine the node layer at the bottommost layer in the tree structure data as the second activation layer.
[0107] S720. According to the number of nodes in the second activation layer and the number of nodes in the node layer one level above the second activation layer, determine whether the nodes in the second activation layer need to be incorporated into the node layer of its corresponding upper layer.
[0108] Here, according to the number of nodes in the second activation layer and the number of nodes in the node layer one level above the second activation layer, the merging coefficient between the second activation layer and the node layer one level above the second activation layer can be calculated; then, when the merging coefficient is greater than the coefficient threshold, it is determined that the nodes in the second activation layer need to be incorporated into the node layer of its corresponding upper layer; and when the merging coefficient is less than the coefficient threshold, it is determined that the nodes in the second activation layer do not need to be incorporated into the node layer of its corresponding upper layer; where the coefficient threshold is generally set to 0.5.
[0109] Among them, the merging coefficient is calculated by the following formula:
[0110]
[0111] Among them, coef is the merging coefficient; Num i is the number of nodes in the second activation layer; Num i-1 is the number of nodes in the node layer one level above the second activation layer.
[0112] Continuing with the tree - structured data C in the example of step S610, determine the bottom - most node layer in the tree - structured data C as the second activation layer. It can be determined that the nodes in this second activation layer include node 6, and the node layer above this second activation layer includes node 5. Thus, it can be determined that the number of nodes in the second activation layer is 1, and the number of nodes in the node layer above the second activation layer is 1. Through the above - mentioned merging coefficient formula calculation, the merging coefficient between the second activation layer and the node layer above the second activation layer is 1. It can be determined that this merging coefficient 1 is greater than the set coefficient threshold of 0.5. Furthermore, it can be determined that node 6 needs to be incorporated into the upper layer and merged with node 5.
[0113] S730. If it is necessary to incorporate into the node layer of the upper layer corresponding to it, then incorporate the nodes in the second activation layer into the node layer of the upper layer corresponding to it.
[0114] S740. After the nodes in the second activation layer are incorporated into the node layer of the upper layer corresponding to it, determine the node layer above the second activation layer as the new second activation layer, and repeat the above steps until the second activation layer does not need to be incorporated into the node layer of the upper layer corresponding to it or the level number of the second activation layer reaches the preset level number.
[0115] It should be noted that after the nodes in the second activation layer are incorporated into the node layer of the upper layer corresponding to it, the number of nodes in the node layer above the second activation layer changes. For example, in the example of step S720, after node 6 needs to be incorporated into the upper layer and merged with node 5, the number of nodes in the node layer containing node 5 becomes 2. Therefore, when judging whether the nodes in this second activation layer need to be incorporated into the node layer of the upper layer corresponding to it according to the number of nodes in the new second activation layer and the number of nodes in the node layer of the upper layer corresponding to it, it is necessary to determine the current number of nodes in this second activation layer.
[0116] S750. After the nodes in a second activation layer do not need to be incorporated into the node layer of the upper layer corresponding to it or the level number of a second activation layer reaches the preset level number, store the nodes in this second activation layer in a sub - tree structure at the URL address.
[0117] When a second activation layer does not need to be incorporated into the node layer of the upper layer corresponding to it, it can be determined that the nodes in this second activation layer do not need to be converted into table data. The second activation layer can be directly split from the tree - structured data so that the nodes in this second activation layer are stored in a sub - tree structure, and this sub - tree structure is stored at the URL address, so that by clicking on this URL address on the display interface, the nodes in this second activation layer can be displayed on the display interface.
[0118] When the number of levels of a second activation layer reaches a preset number of levels, it can be determined that none of the nodes in the second activation layer need to be converted into tabular data. At the same time, the nodes located above the second activation layer can be converted into a preset number of tabular data so that the display interface displays the preset number of tabular data.
[0119] By using the above method, it is possible to determine whether the nodes in each node layer need to be incorporated into the node layer of the upper layer corresponding thereto in the order of increasing node levels according to the number of nodes corresponding to each node layer; then, when a node layer does not need to be incorporated into the node layer of the upper layer corresponding thereto or the number of levels of a node layer reaches a preset number of levels, the nodes in the node layer are stored in the URL address in a sub-tree structure, so that by clicking on the URL address on the display interface, all the nodes in the sub-tree structure can be displayed on the display interface.
[0120] In some possible embodiments, displaying the tabular data converted from the tree structure data and / or the tree structure data that does not need to be converted into tabular data on the display interface may include the following steps:
[0121] S810: When the sum of the number of tree structure data and tabular data in the interaction feedback data is not less than 2, both the tree structure data and the tabular data are used as target data.
[0122] Since, after the user sends an interaction request to the target agent, the interaction feedback data returned by the service server may include tabular data, and the tree structure data included in the interaction feedback data may need to be converted into tabular data, when displaying the tabular data converted from the tree structure data on the display interface, it is also necessary to display the original tabular data in the interaction feedback data. Therefore, when the sum of the number of tree structure data and tabular data in the interaction feedback data is not less than 2, that is, when sorting the positions of multiple data displayed on the display interface, both the tree structure data and the tabular data in the interaction feedback data need to be used as target data, so that the tabular data and the tree data (the tree data is the tree structure data that does not need to be converted into tabular data and / or the tabular data converted from the tree structure data) in the interaction feedback data can determine their respective corresponding display sequence numbers and display spaces through subsequent steps.
[0123] For example, the interaction feedback data returned by the business server according to the interaction request sent by the user to the target agent includes tree structure data 1, tree structure data 2, and table data 1. Among them, tree structure data 1 needs to be converted into table data 2, and tree structure data 2 does not need to be converted into table data. At this time, since the sum of the number of tree structure data and table data in the interaction feedback data is 3, it is necessary to sort the tree structure data 1, tree structure data 2, and table data 1 in the display interface. Since tree structure data 1 needs to be converted into table data 2, here, tree structure data 1 is used as the first target data, tree structure data 2 is used as the second target data, and the table data is used as the third target data. After determining the display sequence numbers and display spaces corresponding to the first target data, second target data, and third target data through subsequent steps, the display sequence numbers and display spaces corresponding to tree structure data 1, tree structure data 2, and table data 1 can be determined. At the same time, the display sequence numbers and display spaces corresponding to the table data 2 converted from tree structure data 1 can also be determined.
[0124] S820. Calculate the similarity between each target data and the interaction request of the target agent to obtain the similarity corresponding to each target data.
[0125] In order to display the important data in the interaction feedback data at important positions, here, each target data is vectorized by an embedding method, and then the cosine angle or L1-L5 distance method is used to calculate the respective similarities between each target data and the interaction request of the target agent.
[0126] S830. Determine the display sequence number of each target data in the display interface according to the similarity corresponding to the target data.
[0127] Exemplarily, continuing with the example in step S810, if it is determined that the display sequence number corresponding to tree structure data 1 is 2, the display sequence number corresponding to tree structure data 2 is 1, and the display sequence number corresponding to table data 1 is 3, then the display sequence number corresponding to the table data 2 converted from tree structure data 1 is 2.
[0128] Here, the display sequence number of each target data in the display interface can be determined according to the sorting of the similarities corresponding to each target data from large to small.
[0129] Exemplarily, the similarity corresponding to target data 1 is 0.6, the similarity corresponding to target data 2 is 0.1, the similarity corresponding to target data 3 is 0.4, the similarity corresponding to target data 4 is 0.7, the similarity corresponding to target data 5 is 0.8, and the similarity corresponding to target data 6 is 0.9. Then, the display sequence number of target data 1 in the display interface is 4, the display sequence number of target data 2 is 6, the display sequence number of target data 3 is 5, the display sequence number of target data 4 is 3, the display sequence number of target data 5 is 2, and the display sequence number of target data 6 is 1. That is, when target data 1 to 6 are displayed on the display interface, target data 6 is at the first place, target data 5 is at the second place, and target data 2 is at the last place.
[0130] S840. Adjust the display space corresponding to each target data in the display interface according to the spatial dimension information of the display interface, the similarity corresponding to each target data, and the preset spatial dimension.
[0131] Since it is easy to cause occlusion of target data with high similarity in the interactive feedback data when the preset spatial dimension corresponding to the target data in the display interface is insufficient, here, in order to fully display the important data in the interactive feedback data on the display interface, adjust the display space corresponding to each target data in the display interface according to the spatial dimension information of the display interface, the similarity corresponding to each target data, and the preset spatial dimension, so that the important data in each target data can be fully displayed on the display interface.
[0132] Among them, the display space corresponding to each target data in the display interface can be calculated by the following formula:
[0133]
[0134] Among them, space j is the display space corresponding to the jth target data; space is the spatial dimension information of the display interface; min_space j is the preset spatial dimension of the jth target data; sim j is the similarity corresponding to the jth target data; n is the number of all target data.
[0135] Exemplarily, as Figure 5 (a) shows, when the spatial dimension information space of the display interface is 14, the preset spatial dimension min_space j of each target data is 1, and the number of all target data is 5, the similarities corresponding to target data 1 to 5 respectively, and the display spaces of target data 1 to 5 calculated according to the above formula are shown in the following table:
[0136] Data Number Similarity space 1 0.44 5 2 0.33 4 3 0.22 3 4 0 1 5 0 1
[0137] According to the display spaces of the respective target data 1 to 5 in the above table, adjust the display spaces corresponding to each target data in the display interface. The respective display spaces of the adjusted target data 1 to 5 in the display interface are as Figure 5 shown in (b).
[0138] S850. According to the display sequence numbers and display spaces corresponding to each target data in the display interface, display the converted tabular data in the display interface and / or display the tree structure data that does not need to be converted into tabular data in the display interface.
[0139] Here, according to the display sequence numbers and display spaces corresponding to each target data in the display interface, the first target display sequence number and the first target display space corresponding to the tabular data converted from the tree structure data can be determined, and / or the second target display sequence number and the second target display space corresponding to the tree structure data that does not need to be converted into tabular data can be determined; then, according to the first target display sequence number and the first target display space of the tree structure data, display the converted tabular data in the display interface; and / or according to the second target display sequence number and the second target display space, display the tree structure data that does not need to be converted into tabular data in the display interface.
[0140] It should be noted that when displaying the converted tabular data in the display interface and / or displaying the tree structure data that does not need to be converted into tabular data in the display interface, the original tabular data in the interactive feedback data is also displayed at the same time, that is, when displaying the tree structure data and / or tabular data involved in step S850 in the display interface, the original tabular data in the interactive feedback data is also displayed on the display interface according to its corresponding display sequence number and display space.
[0141] Using the above method, when the sum of the number of tabular data and tree structure data in the interactive feedback data is not less than 2, the display sequence numbers of each tree structure data and / or tabular data in the display interface can be determined through the similarity corresponding to each tree structure data and / or tabular data, so as to arrange the tree structure data and / or tabular data with high importance to the obvious position of the display interface; then, according to the space size information of the display interface, as well as the similarity and preset space size corresponding to each tree structure data and / or tabular data, the display space corresponding to each tree structure data and / or tabular data in the display interface is adjusted, so that the tree structure data and / or tabular data with high importance have sufficient display space; finally, according to each tree structure data and / or tabular data according to their respective corresponding display sequence numbers and display spaces, it is possible to realize the adaptive display of the tabular data converted from the tree structure data and / or the tree structure data that does not need to be converted into tabular data in the display interface according to their respective corresponding importance levels.
[0142] Correspondingly, according to the space size information of the display interface, as well as the similarity and preset space size corresponding to the target data, adjusting the display space corresponding to each target data in the display interface may include the following steps:
[0143] S910. When the number of target data is greater than the preset number, the target data with a similarity less than the second threshold is used as the first adjustment data, and the target data with a similarity greater than the second threshold is used as the second adjustment data.
[0144] Since when the number of target data is too large, if the display interface displays all target data, it may cause occlusion of the target data with a high similarity value. Therefore, in order to avoid this situation, by dividing each target data according to the second threshold when the number of target data is greater than the preset number, the target data with high importance (target data with a high similarity value) and the target data with low importance (target data with a small similarity value) can be determined, so that in the subsequent steps, the display space of the target data with low importance can be adjusted to the target data with high importance.
[0145] S920. According to the space size of the display interface, the number of the first adjustment data, and the similarity corresponding to each first adjustment data, determine the adjustment size corresponding to each first adjustment data.
[0146] Among them, the adjustment size corresponding to the first adjustment data can be calculated by the following formula:
[0147]
[0148] where space threshold_iis the adjustment size corresponding to the first adjustment data; space is the space size of the display interface; sim i,j is the similarity corresponding to the j-th first adjustment data within the second threshold; n is the number of second thresholds, where the second threshold is at least one and is a preset value not less than 0; m is the number of first adjustment data corresponding to each second threshold.
[0149] S930. Adjust the display spaces corresponding to the respective first adjustment data according to the adjustment sizes corresponding to the respective first adjustment data, so as to adjust a display area for displaying all the second adjustment data in the display interface.
[0150] It should be noted that since the importance of the first adjustment data is relatively small, when adjusting the display spaces corresponding to the respective first adjustment data, all are to perform a reduction adjustment on the display spaces corresponding to the respective first adjustment data.
[0151] Here, since the similarities corresponding to the first adjustment data are all less than the similarities corresponding to the second adjustment data and the first adjustment data are all located in the lower area of the display interface, when adjusting the display spaces corresponding to the respective first adjustment data, all are performed below the display positions of the second adjustment data in the display interface. Therefore, after completing the adjustment of the display spaces corresponding to the respective first adjustment data, a whole display area for displaying all the second adjustment data can be adjusted in the display interface.
[0152] S940. Complete the adjustment of the display spaces corresponding to the respective second adjustment data within the display area according to the ratio of the display spaces between the respective second adjustment data.
[0153] Here, the ratio of the display spaces between the respective second adjustment data can be obtained according to the display spaces corresponding to the respective second adjustment data.
[0154] In this step, by completing the adjustment of the display spaces corresponding to the respective second adjustment data within the display area according to the ratio of the display spaces between the respective second adjustment data, after the display spaces of the respective second adjustment data are adjusted, the space ratio before the display space adjustment can still be maintained between the respective second adjustment data.
[0155] When the quantity of target data is greater than a preset quantity, by using the above method, the adjustment size corresponding to each piece of target data with a similarity less than a second threshold can be determined based on the spatial size of the display interface, the quantity of target data with a similarity less than the second threshold, and the similarity corresponding to the target data with a similarity less than the second threshold; then, according to each adjustment size, the display space corresponding to each piece of target data with a similarity less than the second threshold is adjusted to adjust out a display area corresponding to all the target data with a similarity greater than the second threshold in the display interface; finally, according to the ratio of the display spaces between the pieces of target data corresponding to each second threshold, the display space corresponding to the target data of the second threshold is adjusted within the display area, and thus the adaptive display space adjustment of the target data according to its corresponding similarity size on the display interface can be realized.
[0156] Figure 6 FIG. 4 is a schematic diagram of a data display device 1000 according to an embodiment provided by the present invention. The device 1000 is applied to a service server, such as Figure 6 As shown, the device 1000 includes:
[0157] An interaction feedback data determination module 1010, configured to determine interaction feedback data corresponding to an interaction request in response to a user's interaction request for a target agent, where the interaction feedback data includes at least one tree structure data;
[0158] A conversion determination module 1020, configured to determine whether the tree structure data needs to be converted into table data according to the structure information corresponding to the tree structure data and the spatial size information of the display interface;
[0159] A data conversion module 1030, configured to convert the tree structure data into table data if the tree structure data needs to be converted into table data;
[0160] A display module 1040, configured to display the table data converted from the tree structure data and / or the tree structure data that does not need to be converted into table data in the display interface.
[0161] In some implementable manners, the structure information of the tree structure data includes depth information, breadth information, and node layer information; the conversion determination module 1020 includes:
[0162] A splitting judgment unit, configured to determine whether the node layer needs to be split according to the spatial size information of the display interface and the node layer information corresponding to the node layer located in the first layer in the tree structure data; the node layer information includes the node quantity information, layer height information, and maximum depth information corresponding to the node layer;
[0163] A first conversion determination unit, configured to determine that the tree structure data does not need to be converted into table data if the node layer does not need to be split;
[0164] A second conversion determination unit, configured to determine that the tree structure data needs to be converted into tabular data if the node layer needs to be split, when the depth information of the tree structure data is greater than a preset depth and / or the breadth information of the tree structure data is greater than a preset breadth.
[0165] In some implementable manners, the data conversion module 1030 includes:
[0166] A polling unit, configured to sequentially use each node layer in the tree structure data as a first activation layer in the order from the highest node level to the lowest node level;
[0167] A status information generation unit, configured to generate status information on whether the first activation layer needs to be split according to the spatial dimension information of the display interface and the node layer information corresponding to the first activation layer;
[0168] A data conversion unit, configured to perform tabular data conversion processing on the tree structure data based on the status information after obtaining the status information of each node layer in the tree structure data.
[0169] In some implementable manners, the status information generation unit includes:
[0170] A splitting coefficient calculation subunit, configured to calculate a splitting coefficient corresponding to the first activation layer according to the spatial dimension information of the display interface and the node layer information corresponding to the first activation layer;
[0171] A comparison subunit, configured to compare the splitting coefficient with a first threshold; the first threshold is preset and the first threshold is not less than 0;
[0172] A first splitting determination subunit, configured to determine that the status information of a first activation layer is not to be split if the splitting coefficient is greater than the first threshold;
[0173] A second splitting determination subunit, configured to determine that the status information of the first activation layer is to be split if the splitting coefficient is less than the first threshold.
[0174] In some implementable manners, the data conversion unit includes:
[0175] A first conversion subunit, configured to convert the nodes in the first activation layer into tabular data if the status information of a first activation layer is to be split;
[0176] A sub-tree structure storage subunit, configured to store the nodes in the first activation layer and the nodes below the first activation layer in a sub-tree structure at a URL address if the status information of a first activation layer is not to be split or the level number of a first activation layer reaches a preset level number;
[0177] A sub-unit for adding a URL address is used to determine, in the node layer one level above the first activation layer, a target node having a hierarchical relationship with the sub-tree structure after storing the sub-tree structure at the URL address, so as to add the URL address to the corresponding position of the target node in the tabular data.
[0178] In some implementable ways, the sub-tree structure storage sub-unit includes:
[0179] A second activation layer determination sub-unit for determining the node layer at the bottommost layer in the tree structure data as the second activation layer;
[0180] An incorporation judgment sub-unit for judging whether the nodes in the second activation layer need to be incorporated into the node layer of the previous layer corresponding thereto according to the number of nodes in the second activation layer and the number of nodes in the node layer one level above the second activation layer;
[0181] A first node incorporation sub-unit for incorporating the nodes in the second activation layer into the node layer of the previous layer corresponding thereto if they need to be incorporated into the node layer of the previous layer corresponding thereto;
[0182] A second node incorporation sub-unit for, after the nodes in the second activation layer are incorporated into the node layer of the previous layer corresponding thereto, determining the node layer one level above the second activation layer as the new second activation layer, and repeating the above steps until the nodes in the second activation layer do not need to be incorporated into the node layer of the previous layer corresponding thereto or the level number of the second activation layer reaches the preset level number;
[0183] A sub-tree structure generation sub-unit for storing the nodes in the second activation layer at the URL address in the form of a sub-tree structure after the nodes in a second activation layer do not need to be incorporated into the node layer of the previous layer corresponding thereto or if the level number of a second activation layer reaches the preset level number.
[0184] In some implementable ways, the display module 1040 includes:
[0185] A target data determination unit for, when the sum of the numbers of tabular data and tree structure data in the interaction feedback data is not less than 2, regarding both the tabular data and the tree structure data in the interaction feedback data as target data;
[0186] A similarity calculation unit for calculating the similarity between each target data and the interaction request of the target agent to obtain the similarity corresponding to each target data;
[0187] A display sequence number determination unit for determining the display sequence number of each target data in the display interface according to the similarity corresponding to the target data;
[0188] A display space adjustment unit, configured to adjust the display spaces corresponding to respective target data in a display interface according to the space size information of the display interface, the similarity degrees corresponding to the respective target data, and a preset space size;
[0189] A display unit, configured to display the converted tabular data in the display interface and / or display the tree structure data that does not need to be converted into tabular data in the display interface according to the display sequence numbers and display spaces corresponding to the respective target data in the display interface.
[0190] Wherein, the display space adjustment unit includes:
[0191] An adjustment data determination subunit, configured to, when the number of the target data is greater than a preset number, use the target data with a similarity degree less than a second threshold as first adjustment data, and use the target data with a similarity degree greater than the second threshold as second adjustment data;
[0192] An adjustment size determination subunit, configured to determine the adjustment sizes corresponding to the respective first adjustment data according to the space size of the display interface, the number of the first adjustment data, and the similarity degrees corresponding to the respective first adjustment data;
[0193] A display area adjustment subunit, configured to adjust the display spaces corresponding to the respective first adjustment data according to the adjustment sizes corresponding to the respective first adjustment data, so as to adjust a display area for displaying all the second adjustment data in the display interface;
[0194] An adjustment subunit, configured to complete the adjustment of the display spaces corresponding to the respective second adjustment data within the display area according to the ratio of the display spaces between the respective second adjustment data.
[0195] It should be understood that the embodiments of the data display device and the embodiments of the data display method can correspond to each other, and similar descriptions can refer to the embodiments of the data display method. To avoid repetition, details are not described herein again. Specifically, Figure 6 The illustrated device 1000 can execute the above embodiments of the data display method, and the foregoing and other operations and / or functions of the respective modules of the device 1000 respectively implement the corresponding processes in the above data display method. For the sake of brevity, details are not described herein again.
[0196] In the foregoing, the apparatus 1000 according to the embodiments of the present invention has been described from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional modules can be implemented in the form of hardware, can also be implemented by instructions in the form of software, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the data display method and the detection method embodiments in the embodiments of the present invention can be completed by the integrated logic circuit in the hardware in the processor and / or instructions in the form of software. The steps of the data display method and the detection method disclosed in conjunction with the embodiments of the present invention can be directly embodied as being executed and completed by the hardware decoding processor, or can be executed and completed by a combination of the hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the above data display method and detection method embodiments.
[0197] Figure 7 FIG. 4 is a schematic block diagram of an electronic device 110 according to an embodiment provided by the present invention.
[0198] As Figure 7 shown, the electronic device 110 may include:
[0199] A memory 111 and a processor 112. The memory 111 is used to store a computer program and transmit the program code to the processor 112. In other words, the processor 112 can call and run the computer program from the memory 111 to implement the method in the embodiments of the present invention.
[0200] For example, the processor 112 can be used to execute the above method embodiments according to the instructions in the computer program.
[0201] In some embodiments of the present invention, the electronic device 110 may include, but is not limited to:
[0202] A general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on.
[0203] In some embodiments of the present invention, the memory 111 includes, but is not limited to:
[0204] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. The volatile memory can be Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synch link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0205] In some embodiments of the present invention, the computer program can be divided into one or more modules, and the one or more modules are stored in the memory 111 and executed by the processor 112 to complete the method provided by the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the controller.
[0206] As Figure 7 shown, the electronic device 110 may further include:
[0207] A transceiver 113, which can be connected to the processor 112 or the memory 111.
[0208] Among them, the processor 112 can control the transceiver 113 to communicate with other devices. Specifically, it can send information or data to other devices, or receive information or data sent by other devices. The transceiver 113 can include a transmitter and a receiver. The transceiver 113 may further include an antenna, and the number of antennas can be one or more.
[0209] It should be understood that the various components in the electronic device are connected through a bus system. Among them, the bus system includes not only a data bus, but also a power bus, a control bus, and a status signal bus.
[0210] The present invention also provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a computer, the computer can execute the methods in the above method embodiments. Or rather, an embodiment of the present invention also provides a computer program product containing instructions. When the instructions are executed by a computer, the computer executes the methods in the above method embodiments.
[0211] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a Digital Video Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.
[0212] Those of ordinary skill in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0213] In several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or modules can be in electrical, mechanical, or other forms.
[0214] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, in each embodiment of the present application, the various functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.
[0215] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A data display method, characterized in that: include: In response to a user's interaction request to a target agent, determining interaction feedback data corresponding to the interaction request, wherein the interaction feedback data at least includes a tree structure data; According to the structure information corresponding to the tree structure data and the space size information of the display interface, determining whether the tree structure data needs to be converted into table data; If the tree structure data needs to be converted into table data, convert the tree structure data into table data; The table data converted from the tree structure data and / or the tree structure data that does not need to be converted into table data are displayed in the display interface.
2. The method according to claim 1, characterized in that The structural information of the tree structure data includes depth information, breadth information and node layer information; and judging whether the tree structure data needs to be converted into table data according to the structural information corresponding to the tree structure data and the spatial size information of the display interface includes: Determine whether the node layer needs to be split according to the spatial size information of the display interface and the node layer information corresponding to the node layer at the first layer in the tree structure data; the node layer information includes the node quantity information and layer height information corresponding to the node layer, and the maximum depth information; If the node layer does not need to be split, determining that the tree structure data does not need to be converted into table data; If the node layer needs to be split, when the depth information of the tree structure data is greater than a preset depth, and / or when the breadth information of the tree structure data is greater than a preset breadth, it is determined that the tree structure data needs to be converted into table data.
3. The method according to claim 2, characterized in that If the tree structure data needs to be converted into table data, converting the tree structure data into table data includes: In descending order of node levels, each node layer in the tree structure data is sequentially used as the first activation layer; Generate status information of whether the first activation layer needs to be split according to the spatial size information of the display interface and the node layer information corresponding to the first activation layer; After the state information of each node layer in the tree structure data is obtained, the tree structure data is converted into table data based on the state information.
4. The method according to claim 3, characterized in that The generating, according to the spatial size information of the display interface and the node layer information corresponding to the first activation layer, the state information of whether the first activation layer needs to be split includes: Calculating a splitting coefficient corresponding to the first activation layer according to the spatial size information of the display interface and the node layer information corresponding to the first activation layer; Comparing the splitting coefficient with a first threshold value; the first threshold value is preset, and the first threshold value is not less than 0; If the splitting coefficient is greater than the first threshold, determining that the state information of the first activation layer does not need to be split; If the splitting coefficient is less than the first threshold, it is determined that the state information of the first activation layer needs to be split.
5. The method according to claim 3, characterized in that: The performing table data conversion processing on the tree structure data based on the state information includes: If the state information of the first activation layer indicates that it needs to be split, converting the nodes in the first activation layer into table data; If the state information of the first activation layer indicates that it does not need to be split, or the number of layers of the first activation layer reaches a preset number of layers, the nodes in the first activation layer and the nodes below the first activation layer are stored at the URL address in a subtree structure; After the subtree structure is stored at the URL address, a target node having a hierarchical relationship with the subtree structure is determined in a node layer located one layer above the first activation layer, so that the URL address is added to the corresponding position of the target node in the table data.
6. The method according to claim 5, characterized in that If the number of levels of the first activation layer reaches a preset number of levels, the nodes in the first activation layer and the nodes below the first activation layer are stored in a subtree structure at the URL address, including: Determine the node layer at the bottom of the tree structure data as the second activation layer; According to the number of nodes in the second activation layer and the number of nodes in the node layer above the second activation layer, determining whether the nodes in the second activation layer need to be integrated into the node layer above the second activation layer; If it is necessary to integrate the nodes in the second activation layer into the node layer of the corresponding upper layer, the nodes in the second activation layer are integrated into the node layer of the corresponding upper layer; After the nodes in the second activation layer are integrated into the node layer of the corresponding upper layer, the node layer located in the upper layer of the second activation layer is determined as a new second activation layer, and the above steps are repeatedly performed until the second activation layer does not need to be integrated into the node layer of the corresponding upper layer, or the number of levels of the second activation layer reaches a preset number of levels; When the nodes in the second activation layer do not need to be integrated into the node layer of the corresponding upper layer, or when the number of levels of the second activation layer reaches the preset number of levels, the nodes in the second activation layer are stored in the URL address in a subtree structure.
7. The method according to claim 1, characterized in that The displaying of the table data converted from the tree structure data and / or the tree structure data that does not need to be converted into table data in the display interface includes: When the sum of the quantity of the table data and the tree structure data in the interactive feedback data is not less than 2, both the table data and the tree structure data in the interactive feedback data are used as target data; Calculating the similarity between each target data and the interaction request of the target intelligent agent to obtain the similarity corresponding to each target data; Determining a display sequence number of each target data in the display interface according to the similarity corresponding to the target data; According to the spatial size information of the display interface, and the similarity and preset spatial size corresponding to each of the target data, adjusting the display space corresponding to each of the target data in the display interface; According to the display sequence number and display space corresponding to each target data in the display interface, the converted table data is displayed in the display interface, and / or the tree structure data that does not need to be converted into table data is displayed in the display interface; The adjusting the display space corresponding to each target data in the display interface according to the spatial size information of the display interface, the similarity corresponding to the target data and the preset spatial size includes: When the number of the target data is greater than a preset number, the target data having a similarity less than a second threshold is used as the first adjustment data, and the target data having a similarity greater than the second threshold is used as the second adjustment data; determining, according to the spatial size of the display interface, the number of the first adjustment data, and the similarity corresponding to each of the first adjustment data, an adjustment size corresponding to each of the first adjustment data; According to the adjustment size corresponding to each of the first adjustment data, the display space corresponding to each of the first adjustment data is adjusted to obtain a display area corresponding to all of the second adjustment data in the display interface; According to the ratio of the display space between the respective second adjustment data, the display space corresponding to the respective second adjustment data is adjusted in the display area.
8. A data display device, characterized in that: include: An interaction feedback data determination module, configured to determine, in response to a user's interaction request to a target agent, interaction feedback data corresponding to the interaction request, wherein the interaction feedback data at least includes a tree structure data; A conversion determination module, used to determine whether the tree structure data needs to be converted into table data according to the structure information corresponding to the tree structure data and the space size information of the display interface; A data conversion module, used for converting the tree structure data into table data if the tree structure data needs to be converted into table data; A display module is used to display the table data converted from the tree structure data and / or the tree structure data that does not need to be converted into table data in the display interface.
9. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.