CN115686506A - Data display method and device, electronic equipment and storage medium - Google Patents

Data display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115686506A
CN115686506A CN202110854285.5A CN202110854285A CN115686506A CN 115686506 A CN115686506 A CN 115686506A CN 202110854285 A CN202110854285 A CN 202110854285A CN 115686506 A CN115686506 A CN 115686506A
Authority
CN
China
Prior art keywords
data
component
display
content
data display
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.)
Pending
Application number
CN202110854285.5A
Other languages
Chinese (zh)
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.)
Guangzhou Tencent Technology Co Ltd
Original Assignee
Guangzhou Tencent 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 Guangzhou Tencent Technology Co Ltd filed Critical Guangzhou Tencent Technology Co Ltd
Priority to CN202110854285.5A priority Critical patent/CN115686506A/en
Publication of CN115686506A publication Critical patent/CN115686506A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses a data display method, a data display device, electronic equipment and a storage medium; the method and the device for displaying the object code file can receive an operation instruction of the object code file, the object code file comprises at least one data display component, a data mapping relation set is obtained according to the operation instruction, the data mapping relation set comprises mapping relations between the data display components and component data in a preset data format, one group of component data corresponds to at least one data display component, component data corresponding to each data display component are obtained according to the data mapping relation set, and the object code file is operated and displayed according to the component data of each data display component; therefore, front-end and back-end developers can independently develop the data display page, and the front-end and back-end developers do not need to communicate when the front-end developers need to develop different component forms for data display, so that the software development efficiency is improved.

Description

Data display method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a data display method and device, electronic equipment and a storage medium.
Background
With the rapid development of society, software developers often need to configure different forms of data display pages according to the requirements of users for acquiring data, for example, different forms of charts such as a broken line chart, a pie chart, a column chart and the like are displayed on the pages to acquire data information.
At present, the main method adopted when configuring a data display page is that a front-end developer sets a display form of data in the data display page, and then a back-end developer processes the data according to the display form of the data and then carries out butt joint with the front-end page. However, with the adoption of the scheme, the data formats corresponding to different chart forms are different, and developers at the front end and the back end need to communicate repeatedly in the development process, so that the software development efficiency is influenced.
Disclosure of Invention
Embodiments of the present invention provide a data display method and apparatus, an electronic device, and a storage medium, which enable front-end and back-end developers to independently develop data display pages, and do not need to communicate when displaying in different component forms, thereby improving software development efficiency.
The embodiment of the invention provides a data display method, which comprises the following steps:
receiving an operating instruction of an object code file, wherein the object code file comprises at least one data display component;
acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises mapping relations between data display components and component data in a preset data format, and one group of component data corresponds to at least one data display component;
acquiring component data corresponding to each data display component according to the data mapping relation set;
and running and displaying the object code file according to the component data of each data display component.
Accordingly, an embodiment of the present invention provides a data display device, including:
the instruction receiving unit is used for receiving an operation instruction of an object code file, and the object code file comprises at least one data display component;
the set acquisition unit is used for acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises a mapping relation between a data display component and component data in a preset data format, and one group of component data corresponds to at least one data display component;
the data acquisition unit is used for acquiring component data corresponding to each data display component according to the data mapping relation set;
and the operation display unit is used for displaying the operation of the object code file according to the component data of each data display component.
Optionally, the component data in the preset data format includes at least one group of data content, the data display component includes a data processing code corresponding to a target data content, the data processing code is used to convert the target data content into a content displayed by a corresponding data display component, the operation display unit includes a data content determining unit and a data processing unit, and the data content determining unit is used to determine, according to the data processing code in each data display component, a target data content that needs to be processed by the data display component in the component data corresponding to the processing of each data display component;
and the data processing unit is used for running and displaying the target code file based on the data processing code corresponding to the target data content in each data display component and the target data content.
Optionally, the component data further includes a data display style identifier corresponding to each data content, the data processing code includes a data calculation code and a calculation result display code, the data calculation code is used to calculate the target data content to obtain a calculation result, and the calculation result display code is used to display the calculation result according to a result display style corresponding to the calculation result determined by the data display style identifier to obtain the content displayed by the data display component;
the data processing unit is used for calculating the target data content according to the data calculation codes corresponding to the target data content in each data display assembly to obtain a calculation result corresponding to the target data content;
determining a result display style corresponding to a calculation result of each data content of the component data in the component display styles of the data display components according to the data display style identification corresponding to each data content;
displaying the calculation result corresponding to the target data content according to the result display style corresponding to the calculation result through the calculation result display code corresponding to the target data content in each data display component to obtain the content displayed by each data display component;
and running and displaying the object code file based on the content displayed by the data display component.
Optionally, the component data further includes data type description information, and the data calculation code includes a data unit conversion code;
the data processing unit is used for determining a data unit corresponding to the target data content according to data type description information corresponding to the target data content in each data display assembly and a corresponding relation between preset data type description information and the data unit;
and performing unit conversion on the target data content according to the data unit conversion code corresponding to the target data content and the data unit corresponding to the target data content to obtain a calculation result corresponding to the target data content.
Optionally, the component data further includes a data dimension, the data display component further includes a component displayable dimension, the data processing unit further includes a data dimension determining unit in front of the data processing unit, and is configured to acquire the data dimension in the component data, and if the data dimension is not greater than the component displayable dimension, execute the data processing code corresponding to the target data content in each of the data display components, and the target data content, and perform an operation display on the target code file.
Optionally, the data display component includes a component type identifier, and the operation display unit further includes a display style determining unit before the operation display unit, configured to obtain a component mapping relationship set according to the operation instruction, where the component mapping relationship set includes a mapping relationship between a preset component type identifier and a preset component display style;
determining a component display style corresponding to each data display component according to the component mapping relation set and the component type identification of the data display component;
and the operation display unit is used for performing operation display on the object code file according to the component data and the component display style of each data display component.
Optionally, one component display style includes at least one content display style, and the data display component further includes a preset display content and a content display style identifier;
the operation display unit is used for determining a content display style corresponding to the preset display content from the component display styles of the data display component according to the content display style identification of the data display component;
and running and displaying the object code file according to the component data of each data display component, the preset display content and the content display style corresponding to the preset display content.
Optionally, the set obtaining unit further includes a set updating unit, configured to receive a new component display style and a component type identifier set for the new component display style;
and setting the new component type identifier and the mapping relation between the new component type identifier and the new component display style in the component mapping relation set to obtain an updated component mapping relation set.
Optionally, the instruction receiving unit further includes a code generating unit, configured to obtain a data display page image and the component mapping relationship set, where the data display page image includes at least one component display style element;
performing element analysis on the data display page image to obtain at least one component display style element;
determining a component type identifier corresponding to each component display style element from the component mapping relation set according to each component display style element;
and generating an object code file based on the component type identification corresponding to each component display style element.
Optionally, the component data includes simulation data, and the simulation data is used for simulating data required by the object code file during operation.
Correspondingly, the embodiment of the invention also provides electronic equipment, which comprises a memory and a processor; the memory stores an application program, and the processor is used for running the application program in the memory to execute the steps in any data display method provided by the embodiment of the invention.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to perform steps in any one of the data display methods provided by the embodiments of the present invention.
By adopting the scheme of the embodiment of the invention, the operation instruction of the object code file can be received, the object code file comprises at least one data display component, a data mapping relation set is obtained according to the operation instruction, the data mapping relation set comprises the mapping relation between the data display component and component data in a preset data format, one group of component data corresponds to at least one data display component, the component data corresponding to each data display component is obtained according to the data mapping relation set, and the object code file is operated and displayed according to the component data of each data display component; because the component data in the embodiment of the invention is in a preset data format, the same group of component data can correspond to at least one data display component, and the same group of component data can be called when front-end developers develop different data display components, so that the front-end developers and the back-end developers can independently develop data display pages, and do not need to communicate when displaying in different component forms, thereby improving the software development efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic scene diagram of a data display method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data display method provided by an embodiment of the invention;
FIG. 3 is a schematic diagram of a page after an object code file is run and displayed according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another page after the object code file is displayed in operation according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another page after the object code file is displayed in operation according to an embodiment of the present invention;
FIG. 6 is another flow chart of a data display method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a data display device according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of another structure of a data display device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The embodiment of the invention provides a data display method and device, electronic equipment and a computer-readable storage medium. Specifically, embodiments of the present invention provide a data display method suitable for a data display apparatus, which may be integrated in an electronic device.
The electronic device may be a terminal or other devices, including but not limited to a mobile terminal and a fixed terminal, for example, the mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a notebook computer, a smart car, and the like, wherein the fixed terminal includes but is not limited to a desktop computer, a smart television, and the like.
The electronic device may also be a device such as a server, and the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform, but is not limited thereto.
The data display method of the embodiment of the invention can be realized by a server, and can also be realized by a terminal and the server together.
The following describes the data display method implemented by the terminal and the server together.
As shown in fig. 1, the data display system provided by the embodiment of the present invention includes a terminal 10, a server 20, and the like; the terminal 10 and the server 20 are connected via a network, such as a wired or wireless network, wherein the terminal 10 may exist as a terminal for a developer to run the object code file.
The terminal 10 may be a terminal for storing and operating an object code file for a user, and may be configured to receive an operation instruction of the object code file, where the object code file includes at least one data display component, and obtain a data mapping relationship set according to the operation instruction, where the data mapping relationship set includes a mapping relationship between the data display component and component data in a preset data format, where a group of component data corresponds to the at least one data display component, obtain component data corresponding to each data display component according to the data mapping relationship set, and perform operation display on the object code file according to the component data of each data display component.
The server 20 may be configured to store the data mapping relationship set and the component data in the preset data format.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Embodiments of the present invention will be described from the perspective of a data display device, which may be specifically integrated in a server or a terminal.
As shown in fig. 2, a specific flow of the data display method of this embodiment may be as follows:
201. an operating instruction of an object code file is received, the object code file including at least one data display component.
With the development of program development technology, the development mode of front-end and back-end separation is also more and more widely applied. The front end generally refers to a part of software or a client on a terminal, which needs to be displayed to a user; the backend generally refers to a part that implements data access, software functions, software stability, and the like in a background of the terminal or a server.
It can be considered that the front part mainly focuses on the presentation of the page to the user, and the back part mainly focuses on the content of the service logic, including the service logic of the function implementation, the service logic of the interaction with the database, and so on.
The target code file is a code file developed for the front end part of a program such as a webpage, a client, software and the like, and may be a code file formally developed, or a test code file which is not developed completely or needs to be tested in the development process, and the like.
It will be appreciated that one or more data display components may be included in the object code file. The various components in the object code file may be considered separate code units.
For example, fig. 3 may be a schematic diagram of a page obtained after the target code file is displayed, where a text component displaying the content of "transaction profile", a display component including the content of "transaction amount", "4.24%" and the like under the data overview, and a display component including the content of "old user", "46.58%" and the like under the transaction user analysis may all be data display components in the same target code file.
In some examples, a data display component may include at least one sub-component, for example, a display component containing "transaction amount", "4.24%" and the like under the data overview may be considered as a data display component, wherein "transaction amount", "4.24%" are sub-components of the data display component.
Wherein, the data display component in the embodiment of the invention can be regarded as simple encapsulation of data and methods. It should be noted that the data encapsulated in the data display component is not component data in the embodiment of the present invention, but front-end display content set by a front-end developer in the development process.
The running instruction of the object code file can be an instruction generated by a code compiler after a front-end developer triggers running in the code compiler; or, the operation instruction of the object code file may be an instruction generated by the terminal after the user triggers and displays the page corresponding to the object code file, and the like.
In some alternative examples, the object code file may have other code that is developed autonomously by a front-end developer in addition to the data display component, and the compiler may also run the autonomously developed code in addition to the data display component when running the object code file.
That is to say, the object code file further includes a self-development code, and the step "displaying the object code file according to the component data of each data display component by running" may specifically include:
and running and displaying the object code file according to the component data and the self-development code of each data display component.
The self-development code is the code developed by the front-end developer outside the data display component.
It is to be understood that the data display component may be a complete code of a specific component implementation, or may be a method for calling a certain component or certain components written in advance, which is not limited in the present invention.
202. And acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises a mapping relation between the data display component and component data in a preset data format, and one group of component data corresponds to at least one data display component.
It will be appreciated that the component data required by the different data display components in displaying may be different. Therefore, a data mapping relationship set may be constructed in advance, where a mapping relationship between the data display component and the component data in the preset data format refers to that each data display component corresponds to a set of component data in the preset data format.
The preset data format of the component data may be determined according to a preset programming specification. Before program development is carried out, a programming specification can be informed to a developer in advance, so that the developer develops component data meeting a preset data format according to the programming specification when developing.
For example, the programming specification may specify that, in addition to writing specific values, a back-end developer needs to write dimensions of data to be displayed in the data display component, types of data to be written, specific descriptions of the data, and so on. For example, a back-end developer may write component data according to the following format specification table:
Figure BDA0003183539900000081
Figure BDA0003183539900000091
wherein, the meta field can be further specified as follows:
name of field Means of Description of the preferred embodiment
dimension_count Number of dimensions For distinguishing cases of different dimensions
index_key Meta information of main dimension field
data_key Meta information of a sub-dimensional field
data_value Meta information of value field
type Data type enumeration values Such as mch _ id, date, price, etc
description DETAILED DESCRIPTIONS
It is understood that there may be other field limitations in the programming specification, and the invention is not limited in this regard.
In some optional examples, the execution instruction may carry identification information of the data display component, and before the step "obtaining the data mapping relationship set according to the execution instruction", the method may further include:
and detecting the identification information carrying condition of the operation instruction.
Correspondingly, when the operation instruction includes the identification information of the data display component, the step of obtaining the data mapping relation set according to the operation instruction may be executed. If the operation instruction does not include the identification information of the data display component, the step of obtaining the data mapping relation set according to the operation instruction is not executed, and the object code file is directly operated through a code compiler.
In other examples, the object code file may have a data obtaining interface written therein, and when an operation instruction of the object code file is received, the code compiler generally executes codes in the object code file according to a code sequence in the object code file.
When the code compiler executes the data acquisition code corresponding to the data acquisition interface, the data mapping relation set can be acquired through the data acquisition interface, and the like.
203. And acquiring component data corresponding to each data display component according to the data mapping relation set.
In some embodiments, the data display component and the component data in the data mapping relationship set may be that the code of the data display component and the component data are stored correspondingly, or may also be that the identification information of the data display component and the component data are stored correspondingly, and the like.
Specifically, the operation instruction may include identification information of the data display components, and after the data mapping relationship set is obtained, component data corresponding to each data display component may be determined according to the identification information in the operation instruction, the data display component corresponding to the identification information, and the mapping relationship between the data display component and the component data in the preset data format.
For example, the component data may be constructed as follows:
"index" { "keys": [ "1", "2" ], "names": [ "Merchant 1", "Merchant 2" ] },
“data”:{122,234},
“meta”:{
data _ value { "description": merchant ID "," type ": mch _ ID" },
“dimension_count”:1,
"index _ key" { "description": amount of money "," type ": price }
Alternatively, the component data may be constructed as follows:
“index”:{“keys”:[“1”,“2”],“names”:[]},
“data”:{
{“keys”:“1”,
"name": merchant 1",
“values”:“122”},
{“keys”:“2”,
"name": merchant 2",
“values”:“234”},
},
“meta”:{
data _ value { "description": merchant ID "," type ": mch _ ID" },
“dimension_count”:2,
"index _ key" { "description": amount "," type ": price" }
In order to facilitate the developer to understand the data in the component data, the back-end developer can add description information of the numerical value in addition to the specific numerical value when creating the component data. In some optional examples, the component data in the preset data format may include description information of the numerical value in addition to the specific numerical value, for example, the description information may be metadata. Metadata is data that describes other data, and by which meaning about the data can be obtained.
For example, the content of meta part in the above two pieces of component data is description information of data of the data part.
It will be appreciated that the data dimensions of the component data provided to different data display components may be different, for example, the data dimensions may be zero-dimensional, one-dimensional, two-dimensional, multi-dimensional, high-dimensional, and so forth. For example, the component data may be a single value, and the corresponding data dimension is zero-dimensional, or the component data may be a simple array, and the corresponding data dimension is one-dimensional, or the component data may also be an array formed by a plurality of objects, and the data dimension corresponding to the component data is two-dimensional at this time, and the like.
For example, in the component data corresponding to the data display component a, there may be a row of one-dimensional data on the number of new users per month of a store, and in the component data corresponding to the data display component B, there may be two-dimensional data on the number of new users per month of a store and B store (two objects).
Thus, the data dimension of the component data can be written in the data content description information. Generally, zero-dimensional data can be a scalar, one-dimensional data can be composed of ordered or unordered data in a peer-to-peer relationship, the data are organized in a linear mode, and the data are in the peer-to-peer relationship; can be represented by lists, sets, arrays. The two-dimensional data can be formed by a plurality of one-dimensional data and can be represented by a matrix or a list; multidimensional data can be formed by one-dimensional or two-dimensional data expanding in a new dimension.
In some alternative examples, primary and secondary dimensions may be set for the data to better describe the data when displayed. Where the primary and secondary dimensions describe information from different dimensions. For example, as shown in fig. 3, when transaction user information of a merchant is displayed, there may be a new user 1111, an old user 1112, a main dimension may be set as a new and old user, a sub dimension may be set as a number of transaction persons, and the like.
204. And running and displaying the object code file according to the component data of each data display component.
In the practical application process, one group of component data can correspond to at least one data display component, and different data display components can respectively set different data processing modes for the same group of component data. For example, the component data may include two sets of data contents, a and B, the data display component a may process only the data content a, the data display component B may process only the data content B, the data display component C may process both the data contents a and B, and so on.
Therefore, the component data in the preset data format may include at least one set of data content, and the data display component may include data processing codes corresponding to the target data content, where the data processing codes are used to convert the target data content into the content displayed by the corresponding data display component.
Correspondingly, step 204 may specifically include:
determining target data content to be processed by the data display component in the component data corresponding to the processing of each data display component according to the data processing code in each data display component;
and running and displaying the target code file based on the data processing code corresponding to the target data content in each data display component and the target data content.
Because the different data display components respectively set the data processing codes corresponding to the target data content aiming at the target data content, the data display components developed by front-end developers can analyze the component data to obtain the target data content for processing aiming at the same component data; correspondingly, when the back-end developer provides data, different component data corresponding to different data display components do not need to be provided for different data display components, and only one component data conforming to a preset data format needs to be provided. Greatly improving the development efficiency.
In the related art, the component data generally corresponds to the data display component directly, and a developer needs to directly configure database information, a chart type and the like corresponding to the data display component in the process of developing the data display component. When the target code file is operated, the fixedly displayed component data is directly obtained from the database, so that the flexibility is not provided, and the complex user requirements cannot be met. Therefore, the operation code of the data can be set in the component, the component data is further calculated after the component data is acquired, and the calculation result can be displayed.
That is, the component data may include, in addition to the data content, a data display style identification corresponding to each data content. The data processing code may include a data calculation code and a calculation result display code, the data calculation code may be configured to calculate target data content to obtain a calculation result, and the calculation result display code may be configured to display the calculation result according to a result display style corresponding to the calculation result determined by the data display style identifier to obtain content displayed by the data display component.
Optionally, the step of performing operation display on the object code file based on the data processing code corresponding to the object data content in each data display component and the object data content may specifically include:
calculating the target data content according to the data calculation codes corresponding to the target data content in each data display assembly to obtain a calculation result corresponding to the target data content;
determining a result display style corresponding to a calculation result of each data content of the component data in the component display styles of the data display components according to the data display style identification corresponding to each data content;
displaying the calculation result corresponding to the target data content according to the result display style corresponding to the calculation result through the calculation result display code corresponding to the target data content in each data display component to obtain the content displayed by each data display component;
and performing operation display on the object code file based on the content displayed by the data display component.
The data display style identifier may indicate a result display style of a calculation result corresponding to the data content. For example, the data display style identifier may be a data type corresponding to the data content, and the developer may set a result display style corresponding to the data content of the data type a as the result display style a; or, the data display style identifier may be directly a style identifier corresponding to the result display style, for example, result display styles a, B, and C, a data display style identifier a may be set for a certain data content, and a result display style representing a calculation result corresponding to the data content is a, and so on.
In the practical application process, a back-end developer can directly store data of a certain unit into a database, but when the data display component at the front end processes the component data, conversion between units may be required. Therefore, when developing the component data, the back-end developer can set a data unit corresponding to a certain type of data, and when the data display component needs to perform unit conversion, the back-end developer can determine the unit of the component data according to the data type of the component data and then perform conversion. Namely: the component data further includes data type description information, the data calculation code includes a data unit conversion code, and the step "calculating the target data content according to the data calculation code corresponding to the target data content in each data display component to obtain the calculation result corresponding to the target data content" may specifically include:
determining a data unit corresponding to the target data content according to data type description information corresponding to the target data content in each data display assembly and a corresponding relation between preset data type description information and the data unit;
and performing unit conversion on the target data content according to the data unit conversion code corresponding to the target data content and the data unit corresponding to the target data content to obtain a calculation result corresponding to the target data content.
The unit conversion is a numerical conversion between different units of the same property. The common unit conversion may be a length unit conversion, a weight unit conversion, a pressure unit conversion, an area unit conversion, a capacitance unit conversion, a volume unit conversion, a temperature unit conversion, or the like.
For example, the data type description information may be directly specific data field names, such as data, keys or values, etc.
In practical applications, however, in component data, many fields such as states, types, sexes and the like usually store numbers, but if the fields need to be judged during development, a condition judgment manner such as if is directly used for judging specific numbers, and if there are many fields, a developer has difficulty in distinguishing which number represents what field, and the code is also not considerable. Therefore, the enumeration definition can be used, the corresponding value of the enumeration is stored in the specific data content part of the component data, and the name of the enumeration is used when the code is written, so that a developer can know what state the value or the field of the data content part is at a glance of the code, and the developer can clearly understand.
That is, the data type description information may also be information different from the data field name, for example, the data type description information may be an enumeration type of setting data, an enumeration type corresponding to data of the data field in the data content is "trade _ money", an enumeration type corresponding to data of the keys field is "simple _ hour", and the like.
The back-end developer may preset a corresponding relationship between the data type description information and the data unit, for example, the data unit corresponding to "trade _ money" is "element", the data unit corresponding to "simple _ hour" is "hour", and the like.
When the front end needs to display the data content of the data field 'trade _ money' type by taking 'ten thousand yuan' as a unit, a data unit corresponding to the data content can be determined based on the data type description information and the corresponding relation between the data type description information and the data unit, and then the data content of the data field 'trade _ money' type is subjected to unit conversion through a data unit conversion code. For example, the data content of the data field is 10000, and the calculation result obtained after the conversion is 1.
For example, as shown in fig. 4, 401 in fig. 4 is a schematic page diagram generated after an object code file is run and displayed, a back-end developer may write a 110000 numerical value in the data content of the component data, and may directly process and display the 110000 numerical value in a subcomponent corresponding to the "transaction amount" without data unit conversion.
However, in the line graph section, or when the user performs a trigger operation such as clicking or sliding, and the terminal displays a data display component such as "transaction amount 11 ten thousand on day 6/7" in 402 in fig. 4 in response to the trigger operation by the user, it is necessary to perform processing such as unit conversion on 110000 and then display it.
In some specific embodiments, to facilitate the back-end developer writing component data, different programming specifications may be used if the front-end needs to display different dimensions of data, e.g., a simple programming dimension may be used for 0-dimensional or 1-dimensional data, and a relatively complex programming dimension may be used for 2-dimensional or multidimensional data. For example, the back end needs to provide transaction data of two users, and when the front end displays the data by using a 1-dimensional data display component, the transaction data of the two users can be directly written in the same array; when the front end displays data by a 2-dimensional or multi-dimensional data display component, each group of data can only correspondingly write transaction data of one user.
It can be understood that for the data display component, the dimensions to be displayed are different, and the processing modes of the component data are also different, so that after the component data are acquired, the programming dimensions of the component data can be judged first, and if the programming dimensions of the component data can be matched with the dimensions of the data to be displayed by the data display component, the component data are processed. Namely: the component data can include data dimensions, and the data display component can include component displayable dimensions;
based on the data processing code corresponding to the target data content in each data display component and the target data content, before the running display of the target code file, the method further comprises the following steps:
and acquiring data dimension in the component data, and if the data dimension is not larger than the displayable dimension of the component, executing a data processing code corresponding to the target data content in each data display component and the target data content, and running and displaying the target code file.
The displayable dimension of the component is the number of the dimensions that can be displayed by the data display component, for example, a developer can set the number of the dimensions that can be displayed by the pie chart to be 1, the line chart can display the dimensions of 1, 2, and 3, at this time, the displayable dimension of the component including the data display component of the pie chart is 1, and the displayable dimension of the group price of the data display component including the line chart is 3.
It is to be appreciated that if the data dimension exceeds the component displayable dimension, the data display component may not be able to display the data content or the computed result corresponding to the data content normally.
The data dimension in the component data can be obtained by judging according to the data structure in the component data, for example, transaction data of two users can be directly written in the same array, and the data dimension of the component data can be judged to be 1 dimension; each group of data only corresponds to the writing of transaction data of one user, and the data dimension of the component data can be judged to be 2-dimensional or multidimensional and the like.
Therefore, the data dimension can be directly written in the component data, and the data dimension in the component data is obtained by reading the data dimension. For example, a "dimension _ count" field may be included in the component data, and the corresponding value of the field is the data dimension of the component data, and so on.
The data dimension of the component data is judged simply from the data structure, if the data in the component data has problems, the structure of the data can correspond to the data display component of a certain dimension, at the moment, the data display component can be displayed normally, but the displayed data has problems. Therefore, the dimension can be determined first, and if the data dimension cannot correspond to the displayable dimension of the component, a prompt message that the data is wrong can be sent to a developer or a user.
It should be noted that the data dimension in the embodiment of the present invention is not the number of independent space-time coordinates in the field of mathematics or physics, for example, an infinitesimal point without length is 0-dimensional, a plane is 2-dimensional, and the like. The data dimension in the embodiment of the present invention refers to a dimension when a certain set of data is observed or expressed, and may be understood as a thinking dimension or an evaluation dimension. For example, for a group of users, the users can be divided into new users and old users according to the data dimension, and the data dimension at this time is the dimension of the new and old users of 1 dimension, which is an evaluation dimension for the user identity.
For example, as shown in FIG. 5, the actual display dimension of the data display component at this time is 3-dimensional, namely three dimensions of a new customer, a leave customer, and a reflow customer.
In some alternative examples, the data display components may be specific component codes, and when the data display components are needed, the codes of each data display component may be directly executed to realize the display of the data display components.
In other alternative embodiments, in order to improve the efficiency of front-end development, some preset styles of components may be developed in advance by a developer for the front-end developer to select at the time of development. The front-end developer selects the component style to be used, so that the time for developing the component can be saved.
Therefore, the data display component may not include specific component codes, but include a target component type identifier, and before the step "displaying the component data of the component according to the data, and performing the run display on the target code file", the method may further include:
acquiring a component mapping relation set according to the operation instruction, wherein the component mapping relation set comprises a mapping relation between a preset component type identifier and a preset component display style;
determining a component display style corresponding to each data display component according to the component mapping relation set and the component type identification of the data display component;
according to the component data of each data display component, the running display of the object code file is carried out, and the method comprises the following steps:
and running and displaying the object code file according to the component data and the component display style of each data display component.
In the front-end development process, the display effect of a page component is generally generated according to a preset style, for example, the style may include the width and height of a list, the font color and font size in a pie chart, the background color of a bar chart, the position of each component in a page, and the like.
The component type identifier may be a component name, a component identification number, or the like, which can distinguish an identifier of each component in a preset component display style. For example, the preset component display style may include style 1, style 2, and style 3, and when the component type in the data display component is identified as 1, it may be considered that the preset component display style 1 is to be used.
Specifically, the preset component display style may be stored in the style template library in correspondence with the component type identifier, and the component mapping relationship set may be obtained according to the operation instruction, which may be a process of accessing the style template library when the target code file is operated to a code including the target component type identifier.
In the practical application process, the component display style may only provide the display effect of the component, and the specific display content in the component may be set by a front-end developer according to the requirement, so that the set content can be displayed at the corresponding position of the component display style, therefore, one component display style includes at least one content display style, and the data display component may include a preset display content and a content display style identifier;
the running display of the object code file according to the component data and the component display style of each data display component may specifically include:
determining a content display style corresponding to preset display content from the component display styles of the data display component according to the content display style identification of the data display component;
and running and displaying the object code file according to the component data of each data display component, the preset display content and the content display style corresponding to the preset display content.
Wherein the content display style may correspond to a particular component position in the components. That is, in the component display style, it may be set that the content a located at the a position is displayed in the style a, and the content B located at the B position is displayed in the style B.
The content display style identifier may be an identifier that may distinguish each of preset content display styles, such as a field name or a parameter name of the display content. For example, the preset content display style may include a style a, a style b, and a style c, and when the content display style in the data display component is identified as a, the preset content display style a may be considered to be used.
It can be appreciated that as user requirements continue to develop and modify, developers may continue to develop new component display styles during the development process. When the component display style developed by the front-end developer does not exist in the style template library, the new component display style can be stored in the style template library, so that if the front-end developer needs to use the component display style again later, the component display style can be directly determined from the component mapping relation set without redevelopment.
That is, before the step "obtaining the data mapping relationship set according to the execution instruction", the method may further include:
receiving a new component display style and a component type identifier set for the new component display style;
and setting a new component type identifier and a mapping relation between the new component type identifier and a new component display style in the component mapping relation set to obtain an updated component mapping relation set.
In some optional embodiments, identifying a pre-designed User Interface (User Interface, UI) diagram for component identification through machine learning, selecting a corresponding component from components existing in a template library according to an identification result to generate an object code file, and implementing conversion from a UI diagram to code automatic generation, that is, before the step "receiving an operation instruction of an object code file", the method may further include:
acquiring a data display page image and a component mapping relation set, wherein the data display page image comprises at least one component display style element;
performing element analysis on the data display page image to obtain at least one component display style element;
determining a component type identifier corresponding to each component display style element from the component mapping relation set according to each component display style element;
and generating an object code file based on the component type identification corresponding to each component display style element.
The data display page image may be a pre-designed UI diagram, and the format and content of the data display page image are not limited in the embodiment of the present invention.
The component display style element is a component drawn in the UI diagram, for example, a text display component, a table component, a line drawing component, and the like drawn in the UI diagram may be considered as a component display style element.
For example, after a table component is parsed from the data display page image, a component type identifier corresponding to the table component may be determined from the component mapping relationship set. And generating an object code file based on the component type identification.
In the actual application process, in order to facilitate the front-end developer to confirm the development effect and the like, the target code file can be tested. If the back-end developer does not complete the creation of the data at this time, the target code file can be tested by using the simulation data.
That is, the component data may be simulation data, where the simulation data may be used to simulate data that the object code file needs to obtain from other files or data storage locations such as a database during normal operation.
In the data display method according to the embodiment of the present invention, the component data may be stored in a block chain.
As can be seen from the above, by adopting the scheme of the embodiment of the present invention, an operation instruction of an object code file may be received, where the object code file includes at least one data display component, a data mapping relationship set is obtained according to the operation instruction, the data mapping relationship set includes a mapping relationship between the data display component and component data in a preset data format, where a group of component data corresponds to the at least one data display component, component data corresponding to each data display component is obtained according to the data mapping relationship set, and the object code file is displayed in an operation manner according to the component data of each data display component; because the component data in the embodiment of the invention is in a preset data format, the same group of component data can correspond to at least one data display component, and the calling of the same group of component data can be realized when a front-end developer develops different data display components, so that the front-end developer and a back-end developer can independently develop data display pages without communication when displaying in different component forms, and the software development efficiency is improved.
The method according to the preceding embodiment is illustrated in further detail below by way of example.
In this embodiment, the system shown in fig. 1 will be described by taking an example in which the object code file includes a data display component.
As shown in fig. 6, the specific flow of the data display method of this embodiment may be as follows:
601. and the terminal receives the operation instruction of the object code file and operates the object code file.
Specifically, a developer may perform program development on a terminal, generate an object code file, and trigger the operation of the object code file on the terminal. And the terminal responds to the trigger operation of the developer, generates an operation instruction aiming at the target code file and starts to operate the target code file.
Or, the object code file that has been developed by the developer may be deployed on a terminal of the user through operations such as installation of the user, and when the user requests to display a certain page, the terminal may be triggered to generate an operation instruction for the object code file, and the object code file is started to be operated.
Or, other electronic devices may also directly send an operation instruction for the object code file to the terminal, for example, the operation of the terminal is controlled by a remote control or the like.
602. And the terminal runs to the code line where the data display component is positioned, and generates a component acquisition request according to the component type identifier in the data display component.
For example, a developer may be required in advance in a programming specification to use a class with an identifier of "modules" when data display components are programmed, and when a terminal runs to a code line where the modules are located, the terminal is triggered to detect component type identification of codes in the modules class.
For example, a developer may write the following code in an object code file to represent a data display component:
“modules”:[{
“name”:“text1”,
“component”:“decoration-text”,
"content": transaction Profile "}
The parameter corresponding to the component may indicate a component type, that is, a target component type identifier in the data display component is a percentage-text, and the target component type identifier corresponds to a component. The parameter corresponding to the name is a name customized for the component by a developer, and when the target code file has a plurality of components of the same type, the components can be distinguished according to the customized name. The parameter corresponding to the content is the content set by the developer and displayed in the component, that is, when the target code file is completely run, the data displayed in the page shows the content of the "transaction profile" that should be included in the component.
The terminal can generate an acquisition request for acquiring the target component indicated by the target component type identifier according to the target component type identifier resolution-text.
603. And the terminal acquires the component mapping relation set and determines that the component mapping relation set comprises the component type identification of the data display component.
For example, a component of the decryption-text type, a component of the normal-text type, and a component of the simpletab type may be stored in the component mapping relationship set correspondingly. The terminal can determine whether the component mapping relation set comprises the target component of the type according to the target component corresponding to the target component acquisition request.
It is understood that if the component mapping relationship set does not include the target component of the type, the running of the target code file may be stopped, and a developer or a user may be prompted for a running error. Alternatively, compilation of the target component may continue in accordance with a general code compilation method, and so on.
604. And the terminal determines a component display style corresponding to the data display component according to the component mapping relation set and the target component type identifier.
In some examples, in order to save the storage space of the terminal, only the component mapping relationship set may be stored in the terminal, and the component mapping relationship only represents the corresponding relationship between the component type and the component. When the target component type is included in the component mapping relationship set, the component display style corresponding to the target component type can be obtained from the server.
In other examples, the terminal may further store a component display style of each component in the mapping relationship in addition to the mapping relationship, and when it is determined that the component mapping relationship set includes the target component type, directly obtain a component display style corresponding to the target component type from a storage location of the component display style in the terminal.
605. And the terminal acquires the data mapping relation set and acquires component data corresponding to the data display component according to the data mapping relation set.
In some embodiments, the set of data mapping relationships may be an Application Programming Interface (API) set by developers in the object code file, and the object code file may access the component data provided by the back-end developers through the data API.
It can be understood that, if a front-end and back-end separated development mode is not adopted, when the front-end content or the back-end data is frequently changed according to the business requirements, the development progress of the whole page is affected.
In a development scene with separated front and back ends, in the related art, front-end development needs to depend on data of a back-end interface, but when a back-end developer is insufficient or cannot complete the back-end development, the front-end developer cannot start the development in a delayed manner, or the front-end developer can complete a corresponding static page (without data interaction) by referring to a page design drawing, and can only wait until the back-end developer completes the back-end development and then perform secondary development to assist in completing interface docking.
In the scheme of the embodiment of the invention, even if a back-end developer does not configure back-end data, the front-end developer can develop and debug the data display component through preset simulation data.
Therefore, in other embodiments, the set of data mapping relationships may be directly provided in the object code file, or the set of data mapping relationships may be stored in correspondence with the component display style, and so on.
The corresponding component data can be analog data (mock data), front-end developers can firstly perform analog development based on the mock data, the front-end developers and the rear-end developers can start parallel work only by defining interface documents through the mock data, development progress between the front-end developers and the rear-end developers is not influenced mutually, and only data interfaces of the rear-end developers need to be accessed in a final joint debugging stage.
In the actual application process, the front-end and back-end developers can define a data API together after decomposing development requirements, and the data API may include: a request Resource Locator (URL), a request mode, a request parameter, a data response mode, and the like. For example, a URL may be a general item prefix and/or a specific API name, among others.
The front-end developer can simulate the data correspondingly displayed when the request returns according to the interface convention.
And when the terminal runs the target code file, simulating data interaction of the target code file according to the simulated mock data.
And developing a corresponding data API by a background developer according to the interface convention. After the back-end developer delivers the interface API, the front-end developer can directly modify the data API, and the whole project can be submitted to a tester for testing after the simulated data environment is switched to the corresponding real data environment.
606. And the terminal determines the data dimension of the data content in the component data and the data type corresponding to each data content according to the meta information in the component data.
The data content description information may be metadata. Metadata is data that describes other data, or structural data that provides information about a resource. Metadata is data describing objects such as information resources or data, and is used for the purpose of: identifying a resource; evaluating the resources; tracking changes in the use of the resource; the method realizes simple and efficient management of a large amount of networked data; the information resource can be effectively found, searched, integrally organized and effectively managed.
For example, the component data may be represented by the following code:
“data”:{
“result”:{
“data”:[“1111”,“1234”],
"indexes": keys [ "1", "2" ], "names": new user "," old user "] },
“meta”:{
"data _ value" { "alias": number of trades "," description ": number of trades", "name": track _ user "," type ": track _ user" },
“dimension_count”:1,
"index _ key" { "alias": new and old user "," description ": new and old user (1-new user, 2-old user, 999-total)", "name": act _ type "," type ": act _ type } }
The information in the meta is data content description information, which describes the data in the data, for example, the information may be used to describe fields such as a major dimension, a minor dimension, and a numerical value.
For example, the dimension _ count field in meta may indicate the number of dimensions of data for distinguishing the cases of zero dimension, one dimension, two dimension, multi-dimension, etc. The data _ value field is also a data content description information for describing meta information of the value field, and the index _ key field is for describing meta information of the main dimension field. The alias field is used to indicate a unit of data, and the description field is a description of data provided for easy understanding of the data. name is the value for presentation in the corresponding primary or secondary dimension, and type field indicates.
607. And the terminal performs data processing based on the data display dimension of each data display component, the data content corresponding to each data display component and the data type corresponding to the data content.
For example, the terminal may first determine whether the data display component can normally display the data content in the component data according to the data dimension in the metadata and the data display dimension of the data display component.
If the data dimension is not greater than the data display dimension, corresponding calculation is performed on the data content, for example, when a line graph needs to be displayed, unit conversion is performed according to the data content and the data type, the slope of the line graph in the line graph is calculated based on the conversion result, and the like.
608. And the terminal performs operation display on the target code file according to the data processing result.
The running and displaying of the object code file may refer to running the code in the object code file and generating a data display page corresponding to the object code file based on a running result.
As can be seen from the above, in the embodiment of the present invention, since the component data is in the preset data format, the same group of component data may correspond to at least one data display component, and when the front-end developer develops different data display components, the same group of component data may also be called, so that the front-end developer and the back-end developer may independently develop data display pages, and do not need to communicate when displaying in different component forms, thereby improving software development efficiency.
In order to better implement the method, correspondingly, the embodiment of the invention also provides a data display device.
Referring to fig. 7, the apparatus may include:
an instruction receiving unit 701, which may be configured to receive an operation instruction of an object code file, where the object code file may include at least one data display component;
a set obtaining unit 702, configured to obtain a data mapping relationship set according to an operation instruction, where the data mapping relationship set may include mapping relationships between data display components and component data in a preset data format, where a group of component data corresponds to at least one data display component;
the data obtaining unit 703 may be configured to obtain component data corresponding to each data display component according to the data mapping relationship set;
the operation display unit 704 may be configured to perform operation display on the object code file according to the component data of each data display component.
In an optional example, the component data in the preset data format may include at least one group of data content, the data display component may include data processing code corresponding to the target data content, the data processing code may be used to convert the target data content into content displayed by the corresponding data display component, the operation display unit 704 may include a data content determining unit 7041 and a data processing unit 7042, and the data content determining unit 7041 may be configured to determine, according to the data processing code in each data display component, that each data display component processes the target data content that needs to be processed by the data display component in the corresponding component data;
data processing unit 7042 may be configured to run and display the object code file based on the data processing code corresponding to the object data content in each data display component and the object data content.
In an optional example, the component data may further include data display style identifiers corresponding to the respective data contents, the data processing code may include a data calculation code and a calculation result display code, the data calculation code may be configured to calculate the target data content to obtain a calculation result, and the calculation result display code may be configured to display the calculation result according to a result display style corresponding to the calculation result determined by the data display style identifiers to obtain the content displayed by the data display component;
data processing unit 7042, configured to calculate the target data content according to the data calculation code corresponding to the target data content in each data display component, to obtain a calculation result corresponding to the target data content;
determining a result display style corresponding to a calculation result of each data content of the component data in the component display styles of the data display components according to the data display style identification corresponding to each data content;
displaying the calculation result corresponding to the target data content according to the result display style corresponding to the calculation result through the calculation result display code corresponding to the target data content in each data display component to obtain the content displayed by each data display component;
and performing running display on the object code file based on the content displayed by the data display component.
In an optional example, the component data may further include data type description information, and the data calculation code may include a data unit conversion code;
the data processing unit 7042 may be configured to determine a data unit corresponding to the target data content according to data type description information corresponding to the target data content in each data display component and a correspondence between preset data type description information and the data unit;
and performing unit conversion on the target data content according to the data unit conversion code corresponding to the target data content and the data unit corresponding to the target data content to obtain a calculation result corresponding to the target data content.
In an optional example, the component data may further include a data dimension, the data display component may further include a component displayable dimension, and the data processing unit 7042 may further include a data dimension determining unit 705, which may be configured to acquire the data dimension in the component data, and if the data dimension is not greater than the component displayable dimension, execute a step of running and displaying the target code file based on the data processing code corresponding to the target data content in each data display component and the target data content.
In an optional example, the data display component may include a component type identifier, as shown in fig. 8, before the display unit 704 is executed, a display style determination unit 706 may be further included, which may be configured to obtain a component mapping relationship set according to the execution instruction, where the component mapping relationship set may include a mapping relationship between a preset component type identifier and a preset component display style;
determining a component display style corresponding to each data display component according to the component mapping relation set and the component type identifier of the data display component;
the operation display unit 704 may be configured to perform operation display on the object code file according to the component data and the component display style of each data display component.
In an optional example, one component display style may include at least one content display style, and the data display component may further include preset display content and a content display style identifier;
the operation display unit 704 may be configured to determine, according to the content display style identifier of the data display component, a content display style corresponding to the preset display content from the component display styles of the data display component;
and running and displaying the object code file according to the component data of each data display component, the preset display content and the content display style corresponding to the preset display content.
In an optional example, the set obtaining unit 702 may further include a set updating unit 707, which may be configured to receive a new component display style and a component type identifier set for the new component display style;
and setting a new component type identifier and a mapping relation between the new component type identifier and a new component display style in the component mapping relation set to obtain an updated component mapping relation set.
In an optional example, the instruction receiving unit 701 may further include a code generating unit 708 before it, which may be configured to obtain a data display page image and a component mapping relationship set, where the data display page image may include at least one component display style element;
performing element analysis on the data display page image to obtain at least one component display style element;
determining a component type identifier corresponding to each component display style element from the component mapping relation set according to each component display style element;
and generating an object code file based on the component type identification corresponding to each component display style element.
In one optional example, the component data may include simulation data, which may be used to simulate data needed by the object code file at runtime.
As can be seen from the above, with the data display device provided in the embodiment of the present invention, when a front-end developer develops different data display components, the same set of component data can also be called, so that the front-end developer and a back-end developer can independently develop data display pages, and do not need to communicate or redevelop when displaying in different component forms, thereby improving software development efficiency.
In addition, an embodiment of the present invention further provides an electronic device, where the electronic device may be a terminal or a server, and as shown in fig. 9, a schematic structural diagram of the electronic device according to the embodiment of the present invention is shown, specifically:
the electronic device may include components such as a Radio Frequency (RF) circuit 901, a memory 902 including one or more computer-readable storage media, an input unit 903, a display unit 904, a sensor 905, an audio circuit 906, a Wireless Fidelity (WiFi) module 907, a processor 908 including one or more processing cores, and a power supply 909. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
RF circuit 901 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information from a base station and then processing the received downlink information by one or more processors 908; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuit 901 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 901 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE), email, short Messaging Service (SMS), etc.
The memory 902 may be used to store software programs and modules, and the processor 908 executes various functional applications and data processing by operating the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phone book, etc.) created according to the use of the electronic device, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 902 may also include a memory controller to provide access to the memory 902 by the processor 908 and the input unit 903.
The input unit 903 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 903 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (such as operations by the user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 908, and receives and executes commands from the processor 908. In addition, the touch sensitive surface can be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 903 may include other input devices in addition to a touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 904 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 904 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is communicated to the processor 908 to determine the type of touch event, and the processor 908 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 9 the touch sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
The electronic device may also include at least one sensor 905, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that turns off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of identifying the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
Audio circuitry 906, a speaker, and a microphone may provide an audio interface between a user and the electronic device. The audio circuit 906 may transmit the electrical signal converted from the received audio data to a speaker, and the electrical signal is converted into a sound signal by the speaker and output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by the audio circuit 906 and converted into audio data, which is then processed by the audio data output processor 908, and then transmitted to, for example, another electronic device via the RF circuit 901, or the audio data is output to the memory 902 for further processing. The audio circuitry 906 may also include an earbud jack to provide communication of peripheral headphones with the electronic device.
WiFi belongs to short-distance wireless transmission technology, and the electronic equipment can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 907, and provides wireless broadband internet access for the user. Although fig. 9 shows the WiFi module 907, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 908 is a control center of the electronic device, connects various parts of the entire cellular phone using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby integrally monitoring the cellular phone. Optionally, processor 908 may include one or more processing cores; preferably, the processor 908 may integrate an application processor, which primarily handles operating system, user interface, applications, etc. with a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 908.
The electronic device also includes a power supply 909 (e.g., a battery) that provides power to the various components, which may preferably be logically coupled to the processor 908 via a power management system, such that the functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 909 may also include any component, such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 908 in the electronic device loads an executable file corresponding to a process of one or more application programs into the memory 902 according to the following instructions, and the processor 908 runs the application programs stored in the memory 902, thereby implementing various functions as follows:
receiving an operating instruction of an object code file, wherein the object code file comprises at least one data display component;
acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises mapping relations between data display components and component data in a preset data format, and one group of component data corresponds to at least one data display component;
acquiring component data corresponding to each data display component according to the data mapping relation set;
and running and displaying the object code file according to the component data of each data display component.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the data display methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
receiving an operating instruction of an object code file, wherein the object code file comprises at least one data display component;
acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises a mapping relation between a data display component and component data in a preset data format, and one group of component data corresponds to at least one data display component;
acquiring component data corresponding to each data display component according to the data mapping relation set;
and running and displaying the object code file according to the component data of each data display component.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any data display method provided by the embodiment of the present invention, the beneficial effects that can be achieved by any data display method provided by the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to an aspect of the application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the method provided in the various alternative implementations in the above embodiments.
The data display method, apparatus, electronic device and storage medium provided by the embodiments of the present invention are described in detail above, and the principle and the implementation of the present invention are explained by applying specific embodiments herein, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

1. A method of displaying data, comprising:
receiving an operating instruction of an object code file, wherein the object code file comprises at least one data display component;
acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises mapping relations between data display components and component data in a preset data format, and one group of component data corresponds to at least one data display component;
acquiring component data corresponding to each data display component according to the data mapping relation set;
and running and displaying the object code file according to the component data of each data display component.
2. The data display method according to claim 1, wherein the component data in the preset data format includes at least one set of data content, the data display component includes a data processing code corresponding to a target data content, and the data processing code is used for converting the target data content into a content displayed by the corresponding data display component;
the operating and displaying the object code file according to the component data of each data display component comprises the following steps:
determining target data content which needs to be processed by the data display assembly in assembly data corresponding to the processing of the data display assembly according to the data processing code in the data display assembly;
and running and displaying the target code file based on the data processing code corresponding to the target data content in each data display component and the target data content.
3. The data display method according to claim 2, wherein the component data further includes a data display style identifier corresponding to each of the data contents, the data processing code includes a data calculation code and a calculation result display code, the data calculation code is configured to calculate the target data content to obtain a calculation result, and the calculation result display code is configured to display the calculation result according to a result display style corresponding to the calculation result determined by the data display style identifier to obtain the content displayed by the data display component;
the running display of the object code file based on the data processing code corresponding to the object data content in each data display component and the object data content comprises the following steps:
calculating the target data content according to the data calculation codes corresponding to the target data content in each data display assembly to obtain a calculation result corresponding to the target data content;
determining a result display style corresponding to a calculation result of each data content of the component data in the component display styles of the data display components according to the data display style identification corresponding to each data content;
displaying a calculation result corresponding to the target data content according to a result display style corresponding to the calculation result through a calculation result display code corresponding to the target data content in each data display component to obtain the content displayed by each data display component;
and running and displaying the object code file based on the content displayed by the data display component.
4. The data display method according to claim 3, wherein the component data further includes data type description information, and the data calculation code includes a data unit conversion code;
the calculating the target data content according to the data calculation code corresponding to the target data content in each data display component to obtain the calculation result corresponding to the target data content includes:
determining a data unit corresponding to the target data content according to data type description information corresponding to the target data content in each data display assembly and a corresponding relation between preset data type description information and the data unit;
and performing unit conversion on the target data content according to the data unit conversion code corresponding to the target data content and the data unit corresponding to the target data content to obtain a calculation result corresponding to the target data content.
5. The data display method of claim 2, wherein the component data further comprises data dimensions, the data display components further comprising component displayable dimensions;
before the target code file is run and displayed based on the data processing code corresponding to the target data content in each data display component and the target data content, the method further comprises the following steps:
and acquiring data dimensions in the component data, and if the data dimensions are not larger than the displayable dimensions of the components, executing the step of running and displaying the target code file based on the data processing code corresponding to the target data content in each data display component and the target data content.
6. The data display method of claim 1, wherein the data display component comprises a component type identifier;
before the operating and displaying the object code file according to the component data of each data display component, the method further comprises:
acquiring a component mapping relation set according to the operation instruction, wherein the component mapping relation set comprises a mapping relation between a preset component type identifier and a preset component display style;
determining a component display style corresponding to each data display component according to the component mapping relation set and the component type identification of the data display component;
the running display of the object code file according to the component data of each data display component comprises the following steps:
and running and displaying the object code file according to the component data and the component display style of each data display component.
7. The data display method of claim 6, wherein one component display style comprises at least one content display style, the data display component further comprises a preset display content and a content display style identification;
the operating display of the object code file according to the component data and the component display style of each data display component comprises the following steps:
determining a content display style corresponding to the preset display content from the component display styles of the data display component according to the content display style identification of the data display component;
and running and displaying the object code file according to the component data of each data display component, the preset display content and the content display style corresponding to the preset display content.
8. The data display method of claim 6, wherein before the obtaining the set of data mapping relationships according to the operation instruction, further comprising:
receiving a new component display style and a component type identifier set for the new component display style;
and setting the new component type identifier and the mapping relation between the new component type identifier and the new component display style in the component mapping relation set to obtain an updated component mapping relation set.
9. The data display method of claim 6, wherein before receiving the operation instruction of the object code file, the method further comprises:
acquiring a data display page image and the component mapping relation set, wherein the data display page image comprises at least one component display style element;
performing element analysis on the data display page image to obtain at least one component display style element;
determining a component type identifier corresponding to each component display style element from the component mapping relation set according to each component display style element;
and generating an object code file based on the component type identification corresponding to each component display style element.
10. A method as claimed in any one of claims 1 to 9, wherein the component data includes simulation data for simulating data required when the object code file is run.
11. A data display device, comprising:
the instruction receiving unit is used for receiving an operation instruction of an object code file, and the object code file comprises at least one data display component;
the set acquisition unit is used for acquiring a data mapping relation set according to the operation instruction, wherein the data mapping relation set comprises a mapping relation between a data display component and component data in a preset data format, and one group of component data corresponds to at least one data display component;
the data acquisition unit is used for acquiring component data corresponding to each data display component according to the data mapping relation set;
and the operation display unit is used for displaying the operation of the object code file according to the component data of each data display component.
12. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the data display method according to any one of claims 1 to 10.
13. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the data display method according to any one of claims 1 to 10.
CN202110854285.5A 2021-07-28 2021-07-28 Data display method and device, electronic equipment and storage medium Pending CN115686506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110854285.5A CN115686506A (en) 2021-07-28 2021-07-28 Data display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110854285.5A CN115686506A (en) 2021-07-28 2021-07-28 Data display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115686506A true CN115686506A (en) 2023-02-03

Family

ID=85059594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110854285.5A Pending CN115686506A (en) 2021-07-28 2021-07-28 Data display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115686506A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116610304A (en) * 2023-07-18 2023-08-18 腾讯科技(深圳)有限公司 Page code generation method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116610304A (en) * 2023-07-18 2023-08-18 腾讯科技(深圳)有限公司 Page code generation method, device, equipment and storage medium
CN116610304B (en) * 2023-07-18 2024-01-02 腾讯科技(深圳)有限公司 Page code generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108345543B (en) Data processing method, device, equipment and storage medium
US9241242B2 (en) Information recommendation method and apparatus
US9098314B2 (en) Systems and methods for web based application modeling and generation
CN111178012A (en) Form rendering method, device and equipment and storage medium
US10175954B2 (en) Method of processing big data, including arranging icons in a workflow GUI by a user, checking process availability and syntax, converting the workflow into execution code, monitoring the workflow, and displaying associated information
CN106295353B (en) Engine vulnerability detection method and detection device
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
US11741002B2 (en) Test automation systems and methods using logical identifiers
CN111125269A (en) Data management method, blood relationship display method and related device
CN111078556B (en) Application testing method and device
CN108984374B (en) Method and system for testing database performance
US20170199912A1 (en) Behavior topic grids
US10019519B2 (en) Methods and systems for utilizing global entities in software applications
CN111427577A (en) Code processing method and device and server
CN115686506A (en) Data display method and device, electronic equipment and storage medium
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
CN105915615A (en) Method for displaying application information in mobile equipment and device thereof
CN114265777B (en) Application program testing method and device, electronic equipment and storage medium
CN113468260A (en) Data analysis method and device, electronic equipment and storage medium
CN113282285A (en) Code compiling method and device, electronic equipment and storage medium
CN110309454B (en) Interface display method, device, equipment and storage medium
CN114490307A (en) Unit testing method, device and storage medium
CN115543314A (en) Report generation method, device, equipment and storage medium
Singhal Place me: location based mobile app for Android platform
WO2020019536A1 (en) Method and apparatus for filling in requirement rollback scheme, and terminal and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40080492

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination