Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 2 is a process for displaying information provided in the embodiment of the present application, which specifically includes the following steps:
s201: and determining the size of the terminal screen.
In practical applications, people usually use the entity display area to display the data information contained in each entity, and in order to enable the entity display area to display all the data information contained in each entity within a display range that does not exceed the size of the terminal screen when the entity display area displays the data information, in this embodiment of the present application, the terminal can determine the entity display area whose display range does not exceed the size of the terminal screen according to the size of the terminal screen, and before that, the terminal needs to determine the size of its own screen. In order to further explain the method provided by the embodiment of the present application in detail, only the entity display area in the ER diagram will be taken as an example for detailed description.
The ER diagram generally includes a plurality of entities, where each entity corresponds to an entity display area, and each entity display area occupies a certain area of a terminal screen, so that relationships among the entities can be displayed as completely as possible, and a user can view all data information included in each entity in the entity display area without a scrolling operation when viewing the data information displayed in the entity display area, and therefore, it is necessary that a display range of the entity display area is not too large, that is, cannot exceed a size of the terminal screen, and since a size of the terminal screen is not changed, when determining the display range of each entity display area, the terminal can determine the size of the terminal screen based on the size of the terminal screen, and before that, the terminal can determine the size of the terminal screen.
In practical application, each terminal screen has respective parameters, the parameters usually include parameters related to the size of the terminal screen, and when the terminal runs, each parameter of the screen can be obtained from a running operating system, so that the terminal can determine the size of the terminal screen according to each parameter of the terminal screen. In addition, the user can also actively input the size of the screen, so that the terminal determines the size of the screen after monitoring the size of the screen input by the user.
It should be noted that, in practical applications, when displaying the ER diagram, the whole terminal screen is not necessarily occupied, and a user sometimes displays the ER diagram in one window interface in the terminal screen according to personal habits, so in this embodiment of the present application, the terminal may also determine the size of the window interface in the terminal screen for displaying the ER diagram, as the determined size of the terminal screen, and the specific determination process is as follows: the terminal can determine the size of the window interface by acquiring data information related to the window interface from an operating system run by the terminal.
S202: and determining an entity display area according to the size of the terminal screen, wherein the display range of the entity display area does not exceed the size of the terminal screen.
After the terminal determines the size of the terminal screen, the display range of the entity display area for displaying the data information contained in each entity can be determined according to the size of the screen, wherein the display range of the entity display area does not exceed the size of the terminal screen.
Specifically, when the terminal determines the display range of the entity display area according to the determined size of the terminal screen, the display range of the entity display area may be set within a range in which the length and the width of the entity display area do not exceed the length and the width of the terminal screen, as shown in fig. 3A, 3B, and 3C.
Fig. 3A, 3B, and 3C are schematic diagrams illustrating determining a display range of an entity display area according to an embodiment of the present disclosure.
Assuming that the display range of the entity display area is as shown in fig. 3A, where only a part of the display range of the entity display area is displayed in the terminal screen, and the dotted line part is a part where the width of the display range of the entity display area exceeds the width of the terminal screen, in this embodiment of the present application, the terminal does not determine the display range of the entity display area as shown in fig. 3A as the display range of the entity display area. And assuming that the display range of another entity display area is as shown in fig. 3B, wherein only a part of the display range of the entity display area is also displayed in the terminal screen, and the dotted line part is a part of the display range of the entity display area, which has a length exceeding the length of the terminal screen, because the length of the entity display area exceeds the length of the terminal screen, in the embodiment of the present application, the terminal also does not determine the display range of the entity display area as shown in fig. 3B as the display range of the entity display area. Fig. 3C shows a display range of the third entity display area, and the display range of the entity display area is all displayed in the terminal screen, so that, since the display range of the entity display area does not exceed the range of the length and the width of the terminal screen, in the embodiment of the present application, the terminal may determine the display range of the entity display area shown in fig. 3C as the display range of the entity display area.
Furthermore, the terminal may set the display range of the entity display area as a default display range on the premise that the display range of the entity display area does not exceed the size of the terminal screen, for example, the display range of the entity display area is determined as 1/10 of the size of the terminal screen according to a preset condition.
In addition to setting the display range of the entity display area as a default display range, the terminal may also determine the display range of the entity display area according to the determined size of the terminal screen and the number of entities to be displayed in the ER map input by the user. Specifically, the terminal may use the formula S ═ (S)1-S0) Calculating the display range of each entity display area by using the data, wherein S is the display range of the entity display area and S1For determining the size, S, of the terminal screen0To prepareThe size of the reserved area, n is the number of entities, the reserved area usually includes the area occupied by the relation connecting line (used for representing the relation between the entities) between the entity display areas and some other blank areas, and the terminal can determine the reserved area S according to the preset setting0The size of (2).
For example, a user inputs an instruction for displaying 15 entities in the ER diagram to the terminal according to actual requirements, and after receiving the instruction, the terminal displays the instruction according to the number of the entities 15 and the preset size S of the reserved area1(S) can be further determined according to the formula S ═ S1-S0) And/n, determining the display range of each entity display area as 1/20 of the size of the terminal screen.
It should be noted that the above formula for determining the display range of the entity display area is not unique, and the terminal may also determine the display range of the entity display area according to other similar formulas, which is not limited herein.
S203: determining data information to be displayed in the entity display area.
After the display range of each entity display area is determined, the terminal can determine the data information corresponding to each entity to be displayed in each entity display area. And one entity display area is used for displaying data information corresponding to one entity. For each entity display area, the data information corresponding to the entity name can be determined in the database according to the entity name input by the user in the entity display area or according to the preset entity name corresponding to the entity display area, namely the data information to be displayed in the entity display area. Of course, the data information manually input in the entity display area by the user can also be determined as the data information to be displayed in the entity display area.
In addition, the method for determining the relation between the entities may also be determined according to the entity name input by the user in the entity display area, or according to a preset entity name corresponding to the entity display area, which is not limited in this application.
S204: according to a preset display format, partial information which does not exceed the display range of the entity display area in the data information is displayed in the entity display area, and the rest information in the data information is hidden.
After determining the display range of each entity display area and the data information to be displayed in each entity display area, the terminal may display corresponding data information in each entity display area according to a preset display format, where the number of the data information displayed in each entity display area does not exceed the maximum number of the data information that can be displayed in each entity display area in the preset display format, and if the number exceeds the maximum number, the data information exceeding the maximum number may be hidden in the entity display area, and in the following step S205, when it is monitored that the user performs a specified operation, the hidden remaining information is displayed in the entity display area.
Specifically, the terminal may split the data information to be displayed in each entity display area into a plurality of pieces of sub information according to a preset display format and the display range of the entity display area determined in step S202, and when displaying, display one piece of sub information in the entity display area, and hide the remaining sub information. And the display range of each split sub-information is not beyond the display range of the entity display area when the split sub-information is displayed in the preset display format.
Further, when splitting the data information to be displayed in an entity display area, the terminal may first determine, according to the display range of the entity display area and a preset display format, a maximum number of characters that can be displayed in the display range of the entity display area when displaying the data information in the display format, then determine any specified number of characters that is not greater than the maximum number of characters, and finally split the data information to be displayed in the entity display area into a plurality of pieces of sub information with the specified number of characters as a number of characters included in one piece of sub information, where the preset display format may include a font, a font size, and the like when displaying the data information, as shown in fig. 4.
Fig. 4 is a schematic diagram of splitting data information according to an embodiment of the present application.
In fig. 4, the entity 1 includes 260 data information in total, and assuming that 130 characters (the maximum number of characters) can be displayed at most in the entity display area when the data information is displayed in the preset display format in the entity display area determined in step S202, the number of the designated characters can be determined to be 120 characters, and then the 260 data information is split into a plurality of pieces of sub information with 120 characters as a unit, where the number of characters included in each piece of sub information does not exceed 120 characters.
When displaying, according to the sequence of each character in the data information, displaying the first sub information by default, and hiding the remaining sub information, for example, if a solid line box in fig. 4 represents an entity display area, displaying the first sub information in the entity display area, and a dotted line box represents each hidden sub information after splitting.
S205: and when it is monitored that the user executes the specified operation, displaying the residual information in the entity display area.
After the terminal displays the data information contained in each entity display area in the ER diagram, whether a user executes a specified operation on the entity display area or not can be monitored, and when it is monitored that the user executes the specified operation, one piece of sub information hidden in the entity display area is displayed in the entity display area.
Specifically, after the terminal displays one piece of sub information in the entity display area and hides the remaining sub information, an operation button corresponding to an appointed operation may be displayed in the entity display area, so that the user can execute the appointed operation through the operation button, and when the terminal monitors that the user clicks the operation button, the currently displayed piece of sub information in the entity display area is hidden and one piece of sub information in the remaining sub information is displayed, as shown in fig. 5.
Fig. 5 is a detailed schematic diagram of an entity display area displayed in an ER diagram according to an embodiment of the present application.
For example, fig. 5 is an entity display area of an entity 1 in an ER diagram, where the entity 1 includes 560 data information, and after the terminal determines the 560 data information, the terminal may split the 560 data information through the above step S204 to obtain each piece of sub information and the quantity thereof (the quantity is not the number of characters, but the quantity of the data information), and display the total quantity of the data information and the quantity of the sub information in the entity display area.
Since only one sub-message can be displayed in the entity display area and other sub-messages are hidden in the entity display area, in order to enable the user to switch the currently displayed sub-message in the entity display area to another sub-message through a specified operation, the terminal can display one or more operation buttons for switching the sub-messages in the entity display area, such as the direction arrows shown in fig. 5 represent the operation buttons.
When the terminal monitors that the user clicks the operation button shown in fig. 5, and determines that the user performs the specified operation, the currently displayed sub-information in the entity display area may be switched to another sub-information adjacent to the sub-information, that is, the currently displayed sub-information is hidden, and another sub-information arranged before or after the currently displayed sub-information is displayed in the entity display area (when the data information is divided into a plurality of sub-information, the sub-information is sorted according to the sorting order of characters in the data information). Specifically, when the user clicks the operation button indicated by the left directional arrow in fig. 5, the terminal may switch the currently displayed sub information in the entity display area to the previous sub information adjacent to the sub information, and when the user clicks the operation button indicated by the right directional arrow in fig. 5, the terminal may switch the currently displayed sub information in the entity display area to the next sub information adjacent to the sub information.
It should be noted that the above-described specifying operation performed by the user is not limited to an operation of clicking a button, and the user may slide the entity display area up and down or left and right or switch each sub-information by a specified gesture operation on the touch screen terminal to obtain the required sub-information.
In the above embodiment, the process that the terminal displays the data information included in each entity in each determined entity display area is described in detail, in the above process, the terminal may determine the display range of the entity display area within an appropriate range that does not exceed the size of the terminal screen according to actual needs, and split the data information included in each entity into a plurality of pieces of sub information with the maximum number of characters displayed in the entity display area as a unit, where only one piece of sub information is displayed in the entity display area, and other pieces of sub data information are hidden in the entity display area. When the terminal monitors the designated operation executed by the user, the terminal can use the other sub information left in the sub information displayed in the current entity display area, and compared with the method needing to adjust the display content through the scroll operation in the prior art, the method can effectively reduce the operation of the user when the user views the data information contained in each entity, and improve the convenience of the user operation.
In the embodiment of the application, the position of each entity display area displayed in the ER diagram is not fixed, a user can drag the entity display area according to the actual requirement of the user to move the entity display area to the required position of the user, and in the moving process of the entity display area, the relation connecting line between the entity display area and other entity display areas can be correspondingly adjusted along with the movement of the entity display area, or the corresponding adjustment can not be performed, and after the entity display area is moved, the user can automatically adjust according to the actual requirement of the user.
In step S202, in order to facilitate that the user can determine the display range of the entity display area adapted to the user' S own needs according to the actual needs of the user, in this embodiment of the present application, the user may also actively determine the display range of each entity display area in the ER diagram, that is, the user may draw each entity display area in the ER diagram according to the actual needs of the user by using the drawing tool of the ER diagram.
The display range threshold may be determined by the formula S (S) in step S2021-S0) The value of/n is determined, and the determined S can be used as the display range threshold value. In addition, when the display range of the entity display area drawn by the user exceeds the display range threshold determined by the terminal, the terminal can also forcibly adjust the entity display area drawn by the user to be within the display range threshold.
In the embodiment of the present application, in order to display the connections between the entity display areas in the ER diagram as much as possible, the terminal may reduce the display range of each entity display area as much as possible, and since the entity display areas may display the data information included in each entity, when the user uses the ER diagram, the user needs to view the data information included in each entity in addition to the connections between the entity display areas through the ER diagram, so as not to affect the user in viewing the data information displayed in each entity display area, when the user performs an enlarging operation such as double-clicking the entity display area, pressing and enlarging the entity display area, the reduced entity display area may be enlarged, so that the user can conveniently view data information contained in each entity display area, and when the user performs a reducing operation such as clicking a blank area, the enlarged entity display area may be reduced to an original display range.
Based on the same idea, the method for displaying information provided in the embodiment of the present application further provides an apparatus for displaying information, as shown in fig. 6.
Fig. 6 is a schematic structural diagram of an information display device according to an embodiment of the present application, which specifically includes:
a first determining module 601, configured to determine the device screen size;
a second determining module 602, configured to determine an entity display area according to the screen size, where a display range of the entity display area does not exceed the screen size;
an information determining module 603, configured to determine data information to be displayed in the entity display area;
a first display module 604, configured to display, in the entity display area according to a preset display format, a part of information that does not exceed the size of the entity display area in the data information, and hide remaining information in the data information;
a second display module 605, configured to display the remaining information in the entity display area when it is monitored that the user performs a specified operation.
The first display module 604 is specifically configured to split the data information into a plurality of pieces of sub information according to a preset display format and the size of the entity display area, where the size of each piece of sub information when displayed in the preset display format does not exceed the size of the entity display area; and displaying one piece of sub information in the entity display area, and hiding the rest sub information.
The second display module 605 is further configured to, before monitoring that the user performs the specified operation, display an operation button corresponding to the specified operation, so that the user performs the specified operation through the operation button;
the second display module 605 is specifically configured to, when it is monitored that the user clicks the operation button, hide the currently displayed sub information in the entity display area, and display one of the remaining sub information.
The device is applied to display data information in the entity contact ER graph.
The embodiment of the application provides a method and a device for displaying information, the method comprises the steps of determining an entity display area with a display range smaller than the size of a terminal screen, determining data information to be displayed in the entity display area, displaying part of information which does not exceed the display range of the entity display area in the entity display area according to a preset display format, hiding residual information, and displaying the residual information in the entity display area when it is monitored that a user executes specified operation. According to the method, the display range of the entity display area is smaller than the size of the terminal screen, and the content displayed in the current terminal screen is not required to be adjusted through the scrolling operation, so that the data information in the entity display area and the connecting line between the entity display areas for representing the connection between the entities can be displayed within one screen range, and compared with the method for adjusting the display content through the scrolling operation in the prior art, the method can effectively reduce the operation of a user when the user views the data information contained in each entity, and improve the convenience of the user operation.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.