CN110704481A - Method and device for displaying data - Google Patents

Method and device for displaying data Download PDF

Info

Publication number
CN110704481A
CN110704481A CN201810662222.8A CN201810662222A CN110704481A CN 110704481 A CN110704481 A CN 110704481A CN 201810662222 A CN201810662222 A CN 201810662222A CN 110704481 A CN110704481 A CN 110704481A
Authority
CN
China
Prior art keywords
data
displayed
server
display rule
acquisition request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810662222.8A
Other languages
Chinese (zh)
Other versions
CN110704481B (en
Inventor
任强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810662222.8A priority Critical patent/CN110704481B/en
Publication of CN110704481A publication Critical patent/CN110704481A/en
Application granted granted Critical
Publication of CN110704481B publication Critical patent/CN110704481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a device for displaying data, and relates to the technical field of computers. One embodiment of the method comprises: sending an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed; receiving data to be displayed and a display rule array returned by a server; traversing the numerical values in the display rule array, and extracting data matched with the numerical values from the data to be displayed for display. In the embodiment, the logic of the server and the logic of the client are separated, the server only provides data and display rules, and the client displays the data according to the sorting rules provided by the server, so that a large amount of repetitive work of the server is reduced, the load of the server is reduced, and the working efficiency is improved.

Description

Method and device for displaying data
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for displaying data.
Background
The data display is to output the data in a visible or readable form, and the data can be displayed directly, in a data table, in various statistical graphs and the like. The data display result can simply and conveniently acquire the information brought by the data so as to eliminate the ambiguity of the decision. With the rapid development of big data, data is increasingly complex from both quantitative space and dimensional hierarchy, so how to rapidly and accurately display data has important significance today when big data technology rapidly develops.
In the method for displaying data in the prior art, when a client needs to display data according to a certain specified rule, a back-end server sorts the data according to the specified rule, and then returns the sorted data to the client.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: if the data structures of all dimensions of the data to be displayed are different, the data need to be sequenced according to the sequence rule aiming at all the dimensions of the back-end server, a large amount of repetitive work is executed, the efficiency is low, and the back-end server needs to sort the data structures of the data, so that the workload is large and complicated.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for displaying data, which can reduce a large amount of repetitive work of a server, reduce a load of the server, and improve work efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of presenting data.
The method for displaying data, which is provided by the embodiment of the invention, is applied to a client and comprises the following steps: sending an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed; receiving data to be displayed and a display rule array returned by the server; traversing the numerical values in the display rule array, and extracting the data matched with the numerical values from the data to be displayed for display.
Optionally, the data structure form of the data to be displayed is a key-value pair form.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a system for presenting data.
The system for displaying data in the embodiment of the invention comprises: the client is used for sending an acquisition request to the server, receiving data to be displayed and a display rule array returned by the server, traversing numerical values in the display rule array, extracting data matched with the numerical values from the data to be displayed and displaying the data, wherein the acquisition request carries a unique identifier of the data to be displayed and a display rule of the data to be displayed; the server is used for receiving the acquisition request sent by the client and returning the data to be displayed and the display rule array to the client according to the acquisition request.
Optionally, the server is further configured to: acquiring the data to be displayed according to the unique identification of the data to be displayed in the acquisition request, and converting the data to be displayed into a preset data structure form; and generating the display rule array according to the display rule of the data to be displayed in the acquisition request, and sending the display rule array to the client.
Optionally, the preset data structure is in the form of a key-value pair.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a method of presenting data.
The method for displaying data, provided by the embodiment of the invention, is applied to a system for displaying data, and comprises the following steps: the method comprises the steps that a client sends an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed; the server receives an acquisition request sent by the client, and returns data to be displayed and a display rule array to the client according to the acquisition request; the client receives the data to be displayed and the display rule array returned by the server; and the client traverses the numerical values in the display rule array, and extracts the data matched with the numerical values from the data to be displayed for display.
Optionally, before the server returns the data to be displayed and the display rule array to the client according to the acquisition request, the method further includes: the server acquires the data to be displayed according to the unique identifier of the data to be displayed in the acquisition request, and converts the data to be displayed into a preset data structure form; and the server generates the display rule array according to the display rule of the data to be displayed in the acquisition request, and sends the display rule array to the client.
Optionally, the preset data structure is in the form of a key-value pair.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an apparatus for presenting data.
The device for displaying data provided by the embodiment of the invention is arranged at a client and comprises: the system comprises a sending module, a receiving module and a display module, wherein the sending module is used for sending an acquisition request to a server, and the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed; the receiving module is used for receiving the data to be displayed and the display rule array returned by the server; and the display module is used for traversing the numerical values in the display rule array and extracting the data matched with the numerical values from the data to be displayed for display.
Optionally, the data structure form of the data to be displayed is a key-value pair form.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors implement the method for displaying data of the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, and when the program is executed by a processor, the program implements a method of presenting data of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the server and the client are logically separated, the server provides data and display rules, and the client displays the data according to the sorting rules provided by the server, so that a large amount of repetitive work of the server can be reduced, the load of the server is reduced, and the working efficiency is improved; according to the embodiment of the invention, the server side acquires the data to be displayed according to the unique identifier in the acquisition request and converts the data to be displayed into a preset data structure form, so that the data structure form can be unified, and the working efficiency is improved; the preset data structure form in the embodiment of the invention can be a key value pair mode, so that the data can be quickly inquired according to the unique identification of the data by utilizing the characteristic of a key value storage mode; in the embodiment of the invention, the server generates the display rule array by using the display rule in the acquisition request, and then sends the display rule array to the client, so that the client can display the data according to the rule array; according to the embodiment of the invention, the client displays the data in the data to be displayed in sequence according to the numerical values in the display rule array, so that the steps of sequencing the data can be reduced, and the working efficiency is further improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of presenting data according to one embodiment of the invention;
fig. 2 is a schematic flow chart of a server side acquiring data to be displayed and a display rule array in the system for displaying data according to the embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a process of displaying data to be displayed by a client according to a display rule array in the system for displaying data according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of the main steps of a method of presenting data according to yet another embodiment of the invention;
FIG. 5 is a schematic view of a main flow of a method of presenting data according to one referential embodiment of the present invention;
FIG. 6 is a schematic diagram of the main modules of a device showing data according to an embodiment of the invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The following is a detailed explanation of technical terms involved in the examples of the present invention:
data structure: a data structure refers to a collection of data elements that have one or more relationships with each other and the relationship components between the data elements in the collection.
List: a list is a finite sequence of data items, i.e. a collection of data items arranged in a linear order, and the basic operations performed on such a data structure include the search, insertion and deletion of elements.
Map < Key, Value >: the set of Map interface definitions is also called a lookup table, and is used for storing a so-called "Key-Value" mapping pair. Keys can be viewed as indices of Value, and objects that are keys are not repeatable in a set.
Array: an ordered sequence of elements. If a set of a finite number of variables of the same type is named, then this name is the array name. The individual variables that make up an array are referred to as the components of the array, also referred to as the elements of the array, and sometimes as subscript variables. The numerical numbering used to distinguish the various elements of the array is referred to as the subscript. An array is a form in which elements having the same type are organized in an unordered fashion for processing convenience in programming. These collections of unordered homogeneous data elements are called arrays.
The JavaBean: a reusable component written in the object oriented programming language Java, written as JavaBean, classes must be specific and common and have a constructor without parameters. The JavaBean exposes the internal domain to the member attribute, set and get method acquisition by providing a common method conforming to the consistent design mode.
FIG. 1 is a schematic diagram of the main steps of a method of presenting data according to one embodiment of the invention. As shown in fig. 1, as an embodiment of the present invention, applied to a client, the main steps of the method for presenting data may include:
step S101: and sending an acquisition request to a server, wherein the acquisition request carries the unique identifier of the data to be displayed and the display rule of the data to be displayed. For example, the data to be presented is: data of seven large areas in china (northeast, north China, etc.); the unique identifier of the data to be displayed is: the name of the seven major areas; the display rule is: and displaying the data according to the regional order of north China, east China, south China, southwest China, northeast China and northwest China.
In the embodiment of the invention, the data structure form of the data to be displayed can be a key value pair form. Where a Key-value pair is an implementation of a mapping in a programming language to a mathematical concept, the Key (Key) is used as an index to an element, and the value (value) represents the stored and read data. In the invention, the Key Value pair mode may be that the display index element of the data to be displayed is Key, and the Value of the data to be displayed is Value. For example, the data is required to be displayed according to the sequence of the areas, namely north China, east China, south China, north east China and north west, the Key of the data to be displayed is the area, and the Value is the data to be displayed.
Step S102: and receiving the data to be displayed and the display rule array returned by the server. In the invention, the server is only responsible for inquiring the data to be displayed and does not care about the data sequence required by the processing client, so that the data displayed according to the display sequence is delivered to the processing client. The purpose of this step is that the client receives the data to be displayed inquired by the server and the display rule array generated by the server.
Step S103: traversing the numerical values in the display rule array, and extracting data matched with the numerical values from the data to be displayed for display. And circularly displaying the rule array by the client, namely traversing the values in the display rule array, then comparing the value taken out each time with the Key of the data to be displayed, and taking out the corresponding value as the displayed data. Because the presentation order is included in the presentation rule array, the data for fetching the presentation is also ordered.
For example, a Map stores Key Value pairs with a region as Key and data to be displayed as Value, and requires that the data is displayed according to the sequence of the region including north, east, south, west, center, north and west, then the display rule array is { north, east, south, west, center, north and west }, then the display rule array is cycled to take out the Value in the array, and the Value is taken as the Key in the Map, and then the corresponding Value is taken out. For example, the first numerical value north in the array is taken out, and then the first numerical value north is used as a Key to search in Map, the Key word is the mapping relation of north China, if the first numerical value north is found, the corresponding numerical value Map. Map is a Key-Value pair form, and is mapped to a data structure of Value through Key, such as a Map for storing employee information, and the data form is as follows: ("name", "one note"), ("employee number", "12345"), ("contact address", "12345678"). The name, employee number and contact address are keys, and the Value at the back is the Value, map.get ("name") corresponding to these keys, so that the Value whose Key is the name in this Map, that is, "Zhang a certain", can be obtained.
The invention also discloses a system for displaying data. According to one embodiment of the invention, a system for presenting data may comprise: a server and a client. Wherein the client may be configured to: sending an acquisition request to a server, wherein the acquisition request carries a unique identifier of the data to be displayed and a display rule of the data to be displayed; receiving data to be displayed and a display rule array returned by a server; traversing the numerical values in the display rule array, and extracting data matched with the numerical values from the data to be displayed for display. The server may be configured to: and receiving an acquisition request sent by the client, and returning the data to be displayed and the display rule array to the client according to the acquisition request.
As still another embodiment of the present invention, the server may further be configured to: acquiring the data to be displayed according to the unique identifier of the data to be displayed in the acquisition request, and converting the data to be displayed into a preset data structure form; and generating a display rule array according to the display rule of the data to be displayed in the acquisition request, and sending the display rule array to the client. In the invention, data is shown at a client, and the data is stored in a back-end server. The purpose of this step is that the client sends an acquisition request to the server, and after receiving the acquisition request, the server acquires the data to be displayed from the database (or other storage devices storing data, which is not limited in this invention). In consideration of the data dimension and the data structure inconsistency, after the server acquires the data, the server converts the data to be displayed into a preset data structure form. In addition, the server stores the display rule in the display rule array, and then sends the display rule array to the client, so that the client conveniently traverses values in the cyclic array and sequentially displays the data to be displayed.
Fig. 2 is a schematic flow chart of a server side acquiring data to be displayed and a display rule array in the system for displaying data according to the embodiment of the present invention. As shown in fig. 2, according to the unique identifier of the data to be presented, the server queries and returns List < OrgData > named dataList from the database, where List < OrgData > is the return format of the data, List is a List, and OrgData is an object, and here, corresponding to JavaBean in Java, the object includes a region and data to be presented. Then, the server converts the dataList into a Key as a region, and the Value is a Map < Key, Value > data structure of the data to be displayed.
It was mentioned above that the server returns the query result for the data to be presented to List < OrgData > named DataList, which is converted to a key-value pair Map data structure named dataMap. In the invention, the server defines an object ResultData, the attribute comprises Map type data (used for storing dataMaps) and a display rule array (used for storing sequencing rules), then the dataMaps and the defined display rule array are respectively assigned to the maps and the array in the ResultData, and then the results are returned to the client. And then, the client traverses the numerical values in the display rule array, and extracts data matched with the numerical values from the data to be displayed for display. Fig. 3 is a schematic flow chart illustrating the data to be displayed by the client according to the display rule array in the system for displaying data according to the embodiment of the present invention.
Fig. 4 is a schematic diagram of the main steps of a method of presenting data according to yet another embodiment of the invention. As shown in fig. 4, as another embodiment of the present invention, applied to a system for presenting data, the main steps of the method for presenting data may include:
step S401: the method comprises the steps that a client sends an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed;
step S402: the server receives an acquisition request sent by the client, and returns data to be displayed and a display rule array to the client according to the acquisition request;
step S403: the client receives data to be displayed and a display rule array returned by the server;
step S404: and the client traverses the numerical values in the display rule array, and extracts data matched with the numerical values from the data to be displayed for display.
In addition, in this embodiment of the present invention, before the server returns the data to be displayed and the display rule array to the client according to the acquisition request in step S402, the method for displaying the data may further include: the server acquires the data to be displayed according to the unique identifier of the data to be displayed in the acquisition request, and converts the data to be displayed into a preset data structure form; and the server generates a display rule array according to the display rule of the data to be displayed in the acquisition request, and sends the display rule array to the client.
Fig. 5 is a schematic diagram of a main flow of a method of presenting data according to one referential embodiment of the present invention. As shown in fig. 5, the main flow of the method for presenting data may include:
step S501: the method comprises the steps that a client sends an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed;
step S502: the server side obtains the data to be displayed according to the unique identification of the data to be displayed, and converts the data to be displayed into a data structure form of a key value pair, wherein a key word of the key value pair is a display element index of the data, and the value is an element value of the data to be displayed;
step S503: the server stores the display rule of the data to be displayed in a display rule array to generate a display rule array;
step S504: the server side sends the data to be displayed and the display rule array to the client side;
step S505: and the client traverses the numerical values in the display rule array, and extracts data matched with the numerical values from the data to be displayed for display.
It should be noted that the present invention does not limit the sequence of step S502 and step S503, and the sequence of step S502 and step S503 may be adjusted according to the actual situation, that is, step S503 may be executed first, step S502 may be executed later, or step S502 and step S503 may be executed simultaneously.
According to the technical scheme for displaying the data, the logic of the server and the logic of the client are separated, the server provides the data and the display rule, and the client displays the data according to the sorting rule provided by the server, so that a large amount of repetitive work of the server can be reduced, the load of the server is reduced, and the working efficiency is improved; according to the embodiment of the invention, the server side acquires the unique identifier in the request according to the requirement to acquire the data to be displayed and converts the data to be displayed into the preset data structure form, so that the data structure form can be unified, and the working efficiency is improved; the preset data structure form in the embodiment of the invention can be a key value pair mode, so that the data can be quickly inquired according to the unique identification of the data by utilizing the characteristic of a key value storage mode; in the embodiment of the invention, the server generates the display rule array by using the display rule in the acquisition request, and then sends the display rule array to the client, so that the client can display the data according to the rule array; according to the embodiment of the invention, the client displays the data in the data to be displayed in sequence according to the numerical values in the display rule array, so that the steps of sequencing the data can be reduced, and the working efficiency is further improved.
FIG. 6 is a schematic diagram of the main modules of a device showing data according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 for displaying data according to the embodiment of the present invention is disposed at a client, and mainly includes the following modules: a sending module 601, a receiving module 602 and a presentation module 603.
The sending module 601 may be configured to send an obtaining request to the server, where the obtaining request carries the unique identifier of the data to be displayed and the display rule of the data to be displayed. The receiving module 602 may be configured to receive data to be displayed and a display rule array returned by the server. The display module 603 may be configured to traverse the values in the display rule array, and extract data matching the values from the data to be displayed for display.
In the embodiment of the invention, the data structure form of the data to be displayed is a key value pair form.
From the above description, it can be seen that the logics of the server and the client are separated, the server provides data and display rules, and the client displays the data according to the sorting rules provided by the server, so that a large amount of repetitive work of the server can be reduced, the load of the server is reduced, and the working efficiency is improved; according to the embodiment of the invention, the server side acquires the unique identifier in the request according to the requirement to acquire the data to be displayed and converts the data to be displayed into the preset data structure form, so that the data structure form can be unified, and the working efficiency is improved; the preset data structure form in the embodiment of the invention can be a key value pair mode, so that the data can be quickly inquired according to the unique identification of the data by utilizing the characteristic of a key value storage mode; in the embodiment of the invention, the server generates the display rule array by using the display rule in the acquisition request, and then sends the display rule array to the client, so that the client can display the data according to the rule array; according to the embodiment of the invention, the client displays the data in the data to be displayed in sequence according to the numerical values in the display rule array, so that the steps of sequencing the data can be reduced, and the working efficiency is further improved.
Fig. 7 illustrates an exemplary system architecture 700 to which the method of presenting data or the apparatus presenting data of embodiments of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for presenting data provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the apparatus for presenting data is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, a receiving module, and a presentation module. The names of the modules do not form a limitation on the modules themselves in some cases, and for example, the sending module may also be described as a "module sending an acquisition request to a server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: sending an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed; receiving data to be displayed and a display rule array returned by a server; traversing the numerical values in the display rule array, and extracting data matched with the numerical values from the data to be displayed for display.
According to the technical scheme of the embodiment of the invention, the server and the client are logically separated, the server provides data and display rules, and the client displays the data according to the sequencing rules provided by the server, so that a large amount of repetitive work of the server can be reduced, the load of the server is reduced, and the working efficiency is improved; according to the embodiment of the invention, the server side acquires the unique identifier in the request according to the requirement to acquire the data to be displayed and converts the data to be displayed into the preset data structure form, so that the data structure form can be unified, and the working efficiency is improved; the preset data structure form in the embodiment of the invention can be a key value pair mode, so that the data can be quickly inquired according to the unique identification of the data by utilizing the characteristic of a key value storage mode; in the embodiment of the invention, the server generates the display rule array by using the display rule in the acquisition request, and then sends the display rule array to the client, so that the client can display the data according to the rule array; according to the embodiment of the invention, the client displays the data in the data to be displayed in sequence according to the numerical values in the display rule array, so that the steps of sequencing the data can be reduced, and the working efficiency is further improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for presenting data, applied to a client, includes:
sending an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed;
receiving data to be displayed and a display rule array returned by the server;
traversing the numerical values in the display rule array, and extracting the data matched with the numerical values from the data to be displayed for display.
2. The method of claim 1, wherein the data structure of the data to be presented is in the form of key-value pairs.
3. A system for presenting data, comprising: a service end and a client end, wherein,
the client is used for sending an acquisition request to the server, receiving data to be displayed and a display rule array returned by the server, traversing numerical values in the display rule array, extracting data matched with the numerical values from the data to be displayed and displaying the data, wherein the acquisition request carries a unique identifier of the data to be displayed and a display rule of the data to be displayed;
the server is used for receiving the acquisition request sent by the client and returning the data to be displayed and the display rule array to the client according to the acquisition request.
4. The system of claim 3, wherein the server is further configured to:
acquiring the data to be displayed according to the unique identification of the data to be displayed in the acquisition request, and converting the data to be displayed into a preset data structure form;
and generating the display rule array according to the display rule of the data to be displayed in the acquisition request, and sending the display rule array to the client.
5. The system of claim 4, wherein the predetermined data structure is in the form of key-value pairs.
6. A method for displaying data is applied to a system for displaying data, and comprises the following steps:
the method comprises the steps that a client sends an acquisition request to a server, wherein the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed;
the server receives an acquisition request sent by the client, and returns data to be displayed and a display rule array to the client according to the acquisition request;
the client receives the data to be displayed and the display rule array returned by the server;
and the client traverses the numerical values in the display rule array, and extracts the data matched with the numerical values from the data to be displayed for display.
7. The method according to claim 6, wherein before the server returns the data to be displayed and the display rule array to the client according to the acquisition request, the method further comprises:
the server acquires the data to be displayed according to the unique identifier of the data to be displayed in the acquisition request, and converts the data to be displayed into a preset data structure form;
and the server generates the display rule array according to the display rule of the data to be displayed in the acquisition request, and sends the display rule array to the client.
8. The method of claim 7, wherein the predetermined data structure is in the form of key-value pairs.
9. The utility model provides a device of show data which sets up in the customer end, includes:
the system comprises a sending module, a receiving module and a display module, wherein the sending module is used for sending an acquisition request to a server, and the acquisition request carries a unique identifier of data to be displayed and a display rule of the data to be displayed;
the receiving module is used for receiving the data to be displayed and the display rule array returned by the server;
and the display module is used for traversing the numerical values in the display rule array and extracting the data matched with the numerical values from the data to be displayed for display.
10. The apparatus of claim 9, wherein the data structure of the data to be presented is in the form of key-value pairs.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-2.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-2.
CN201810662222.8A 2018-06-25 2018-06-25 Method and device for displaying data Active CN110704481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810662222.8A CN110704481B (en) 2018-06-25 2018-06-25 Method and device for displaying data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810662222.8A CN110704481B (en) 2018-06-25 2018-06-25 Method and device for displaying data

Publications (2)

Publication Number Publication Date
CN110704481A true CN110704481A (en) 2020-01-17
CN110704481B CN110704481B (en) 2024-04-05

Family

ID=69192673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810662222.8A Active CN110704481B (en) 2018-06-25 2018-06-25 Method and device for displaying data

Country Status (1)

Country Link
CN (1) CN110704481B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000329A (en) * 2020-09-11 2020-11-27 支付宝(杭州)信息技术有限公司 Data display method, device, equipment and medium
CN112256445A (en) * 2020-07-24 2021-01-22 北京沃东天骏信息技术有限公司 Data processing method, device and equipment based on application program and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000075849A2 (en) * 1999-06-08 2000-12-14 Brio Technology, Inc. Method and apparatus for data access to heterogeneous data sources
US6366954B1 (en) * 1998-05-14 2002-04-02 Sun Microsystems, Inc. Method and data format for exchanging data between a Java system database entry and an LDAP directory service
WO2014158182A2 (en) * 2013-03-29 2014-10-02 Ajit Bhave Organizing and fast searching of data
CN104462390A (en) * 2014-12-10 2015-03-25 华中科技大学 Method and system for improving efficiency of adaptive layout of webpages
CN107085574A (en) * 2016-02-15 2017-08-22 阿里巴巴集团控股有限公司 A kind of page data processing method and server
CN107404508A (en) * 2016-05-20 2017-11-28 阿里巴巴集团控股有限公司 Access method, client and the electronic equipment of customer terminal webpage

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6366954B1 (en) * 1998-05-14 2002-04-02 Sun Microsystems, Inc. Method and data format for exchanging data between a Java system database entry and an LDAP directory service
WO2000075849A2 (en) * 1999-06-08 2000-12-14 Brio Technology, Inc. Method and apparatus for data access to heterogeneous data sources
WO2014158182A2 (en) * 2013-03-29 2014-10-02 Ajit Bhave Organizing and fast searching of data
CN104462390A (en) * 2014-12-10 2015-03-25 华中科技大学 Method and system for improving efficiency of adaptive layout of webpages
CN107085574A (en) * 2016-02-15 2017-08-22 阿里巴巴集团控股有限公司 A kind of page data processing method and server
CN107404508A (en) * 2016-05-20 2017-11-28 阿里巴巴集团控股有限公司 Access method, client and the electronic equipment of customer terminal webpage

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SAMUEL HURON 等: ""Constructing Visual Representations: Investigating the Use of Tangible Tokens"", IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, vol. 20, no. 12, XP011563386, DOI: 10.1109/TVCG.2014.2346292 *
ZHENZHEN XU 等: ""Data preprocessing and fitting algorithm based on marine data sampled by multiple underwater gliders"", 2016 12TH WORLD CONGRESS ON INTELLIGENT CONTROL AND AUTOMATION (WCICA) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256445A (en) * 2020-07-24 2021-01-22 北京沃东天骏信息技术有限公司 Data processing method, device and equipment based on application program and storage medium
CN112000329A (en) * 2020-09-11 2020-11-27 支付宝(杭州)信息技术有限公司 Data display method, device, equipment and medium
CN112000329B (en) * 2020-09-11 2023-09-05 支付宝(杭州)信息技术有限公司 Data display method, device, equipment and medium

Also Published As

Publication number Publication date
CN110704481B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN109614402B (en) Multidimensional data query method and device
CN110019080B (en) Data access method and device
CN108897874B (en) Method and apparatus for processing data
CN109508361B (en) Method and apparatus for outputting information
CN110689268B (en) Method and device for extracting indexes
CN111309760A (en) Data retrieval method, system, device and storage medium
CN109903105B (en) Method and device for perfecting target commodity attributes
CN112765152A (en) Method and apparatus for merging data tables
US20210382896A1 (en) High Efficiency Data Querying
CN112818026A (en) Data integration method and device
CN114021156A (en) Method, device and equipment for organizing vulnerability automatic aggregation and storage medium
US20150120697A1 (en) System and method for analysis of a database proxy
US9792355B2 (en) Searches for similar documents
CN106599241B (en) Visual management method for big data in GIS software
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
CN110704481B (en) Method and device for displaying data
CN114490723A (en) Unified retrieval method, device, electronic equipment and storage medium
CN110895591A (en) Method and device for positioning self-picking point
CN111488386B (en) Data query method and device
CN112905600A (en) Data query method and device, storage medium and electronic equipment
CN110795456B (en) Map query method and device, computer equipment and storage medium
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN109697234B (en) Multi-attribute information query method, device, server and medium for entity
EP2830289B1 (en) Adaptable reporting in a multi-client telecommunication network
CN111026629A (en) Method and device for automatically generating test script

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant