CN111143355A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN111143355A
CN111143355A CN201911256032.7A CN201911256032A CN111143355A CN 111143355 A CN111143355 A CN 111143355A CN 201911256032 A CN201911256032 A CN 201911256032A CN 111143355 A CN111143355 A CN 111143355A
Authority
CN
China
Prior art keywords
field
result
preset
preset field
cell
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911256032.7A
Other languages
Chinese (zh)
Other versions
CN111143355B (en
Inventor
陈昌源
周亮
周杰
黄璞
陈丽萍
冒佳仪
王广新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911256032.7A priority Critical patent/CN111143355B/en
Publication of CN111143355A publication Critical patent/CN111143355A/en
Application granted granted Critical
Publication of CN111143355B publication Critical patent/CN111143355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure discloses a data processing method, a data processing device, an electronic device and a computer readable storage medium. The method comprises the following steps: receiving an adding request for adding a preset field of an original form into a data analysis model; acquiring a preset field; determining whether the preset field is a repeated field in the result table; renaming the preset field when the preset field is a repeated field; adding the renamed fields to the results table. The method and the device for analyzing the data in the data analysis result table solve the field repetition problem existing in the data analysis result table in the prior art by determining whether the preset field in the original table is a repeated field in the result table, renaming the preset field when the field is the repeated field, and adding the renamed field to the result table.

Description

Data processing method and device
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a data processing method, an apparatus, and a computer-readable storage medium.
Background
The data analysis means that a large amount of collected data is analyzed by using a proper statistical analysis method, and the collected data is summarized, understood and digested so as to maximally develop the function of the data and play the role of the data.
In the prior art, data of a plurality of data tables are generally processed and analyzed, the same fields inevitably appear in the data tables, correspondingly, field renaming inevitably appears in a data analysis result table, and how to deal with field naming conflict is a core problem of data analysis.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The technical problem solved by the present disclosure is to provide a data processing method to at least partially solve the technical problem of data analysis field renaming in the prior art. In addition, a data processing device, a data processing hardware device, a computer readable storage medium and a data processing terminal are also provided.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
a method of data processing, comprising:
receiving an adding request for adding a preset field of an original form into a data analysis model; wherein, the adding request includes the storage address of the original table;
acquiring the preset field according to the storage address;
determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
when the preset field is a repeated field, renaming the preset field;
and adding the renamed field into a first cell with a header in the result table corresponding to the result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
a data processing apparatus comprising:
the request receiving module is used for receiving an adding request for adding a preset field of an original form into the data analysis model; wherein, the adding request includes the storage address of the original table;
the field acquisition module is used for acquiring the preset field according to the storage address;
the repeated determining module is used for determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
the renaming module is used for renaming the preset field when the preset field is a repeated field;
and the result table module is used for adding the renamed fields into a first cell with a table head as a result field in the result table and adding the table name of the original table into a second cell associated with the first cell, wherein the table head of the second cell is the table to which the second cell belongs.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
an electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
a processor for executing the computer readable instructions, such that the processor when executing implements the data processing method of any of the above.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
a computer readable storage medium storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform any of the data processing methods described above.
In order to achieve the above object, according to still another aspect of the present disclosure, the following technical solutions are also provided:
a data processing terminal comprises any one of the data processing devices.
The method and the device for analyzing the data in the data analysis result table solve the field repetition problem existing in the data analysis result table in the prior art by determining whether a preset field in an original table is a repeated field in the result table, renaming the preset field when the preset field is the repeated field, adding the renamed field into a first cell corresponding to a result field at the head of the result table, and adding the table name of the original table into a second cell associated with the first cell, wherein the head of the second cell is a table to which the second cell belongs.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a schematic flow diagram of a data processing method according to one embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram of a data processing method according to one embodiment of the present disclosure;
FIG. 3 is a schematic block diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, or in parallel. Furthermore, method embodiments may include additional steps or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
Example one
In order to solve the technical problem of data analysis field renaming in the prior art, the embodiment of the disclosure provides a data processing method. As shown in fig. 1, the data processing method mainly includes the following steps S11 to S15.
Step S11: receiving an adding request for adding a preset field of an original form into a data analysis model; wherein, the adding request includes the storage address of the original table.
The original form and the preset fields of the original form can be customized by a user through an interface (e.g., a data processing interface). The original table is a basic logical carrier for carrying data, and may be, for example, a MYSQL table, a HIVE table, or the like, and the type of the original table is not specifically limited here. Regarding the preset fields, fields that need to be added to the data analysis model for the user. The field is a data block which divides original table data into fixed and definite meanings, such as a header in an Excel table, and each item in the header specifies the meaning of the data in the column. And two identical fields are not allowed to exist in the same table, so that ambiguity and confusion in the data analysis process are avoided.
The data analysis model may be a data analysis tool, and is used to analyze data and generate a data result table. Specifically, the data analysis model may be described by an SQL statement, and when the original table is multiple, the order in which the original table is added to the result table is determined by the order in which SQL is executed.
The storage address can be a local storage address or a website.
Specifically, the user can add an original form to be added to the data analysis model and a corresponding added field, i.e., a preset field, in the data processing interface according to the requirement. After determining the original form and the corresponding add field, an add request is generated by triggering a preset button (e.g., clicking a determination button).
Step S12: and acquiring the preset field according to the storage address.
Specifically, the method includes the steps of firstly obtaining the information from a local place or the internet according to the storage address, and then obtaining a preset field in an original form.
Step S13: determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results.
Wherein, the result table comprises result field lines and table lines. The cells corresponding to the result field rows are used for storing the result fields after data analysis, and the cells corresponding to the table rows are used for storing the tables to which the result fields after data analysis belong. Or, the result table comprises a result field column and a table column to which the result field column belongs. The cells corresponding to the result field columns are used for storing the result fields after data analysis, and the cells corresponding to the table columns are used for storing the tables to which the result fields after data analysis belong. And the cell position corresponding to the result field column corresponds to the cell position corresponding to the table column to which the result field column belongs.
Wherein the results table may be an empty table, i.e., no raw table has been added to the data analysis model before. Or, the result table comprises at least one data corresponding to the original table, namely the result field and the table to which the data belongs. When the result table is an empty table, it is determined that the preset field is an unrepeated field in the result table, and step S16 is executed. When the result table includes at least one result field corresponding to the original table and the table to which the original table belongs, further determination is required, when the determination result is a repeated field, step S14 and step S15 are executed, and when the determination result is a non-repeated field, step S16 is executed.
Step S14: and renaming the preset field.
Specifically, if the preset field is a repeated field, renaming is performed on the preset field. The renaming rule is that the renamed field is not repeated with the field in the result table, i.e. the renamed field is a unique identifier in the result table.
Step S15: and adding the renamed field into a first cell with a header in the result table corresponding to the result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
Specifically, the header of the result table is listed as a result field and a table to which the result field belongs, wherein the result field is a renamed field. And correspondingly adding the finally determined result field and the table name of the table to which the finally determined result field belongs to the corresponding position of the result table respectively.
In this embodiment, by determining whether a preset field in an original table is a repeated field in a result table, and when the preset field is the repeated field, renaming the preset field, adding the renamed field to a first cell corresponding to a result field in the result table with a header as a result field, and adding a table name of the original table to a second cell associated with the first cell, where the header of the second cell is a table to which the second cell belongs, a field repetition problem existing in a data analysis result table in the prior art is solved.
In an optional embodiment, the method further comprises:
step S16: and adding the preset field into a first cell corresponding to a result field with a header in the result table, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
And when the preset field is not contained in the field set, renaming processing is not required to be carried out on the field set, and the field set is directly added into a result table.
In an optional embodiment, step S13 specifically includes:
step S131: inquiring the preset field in a field set; wherein the set of fields consists of all result fields in the result table.
Step S132: and when the field set comprises the preset field, determining that the preset field is a repeated field.
Step S133: and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
In an optional embodiment, the method further comprises:
adding a result field currently added to the result table to the set of fields.
Specifically, after adding a new result field to the result table, the new result field is also added to the field set. Therefore, the method can prevent the inaccurate result caused by omission when comparing whether the preset field is repeated or not in the follow-up process.
In an optional embodiment, step S14 specifically includes:
and when the preset field is a repeated field, taking the preset field and the table name of the original table as a result field.
For example, the raw table may be in the form:
TABLE 1 TABLE 2 TABLE 3
id id id
name vv name
desc date type
ctime ctime ctime
The fields of each original form are not repeated, but the fields with the same name exist among different original forms, such as: id, name, type, ctime.
When the original table that the user wants to add is id, name, ctime in table 1 and id, vv in table 2, the upper fields are sequentially added to the result table according to a preset rule, and according to the renaming rule of this embodiment, the following result table can be obtained:
TABLE 4
Result field id id (Table 2) name vv ctime
Affiliated form TABLE 1 TABLE 2 TABLE 1 TABLE 2 TABLE 1
For another example, if the ctime of table 2 is added on the basis of the above result table, the field naming policy is adopted, and the format of the result table obtained at this time is as follows:
TABLE 5
Result field id (Table 2) name vv ctime ctime (Table 2)
Affiliated form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 2
For another example, the id field of table 1 deleted in the following step S18 is added back, and the result is as follows:
TABLE 6
Result field id (Table 2) name vv ctime id id (Table 1)
Affiliated form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 3 TABLE 1
Although the fields in the result table are not repeated, in this way, after the id field in table 1 is modified for multiple times, the corresponding fields change (for example, the id fields in table 4 and table 6 corresponding to table 1 are different), and once the data in the result table is materialized, the process may cause the existing data to be lost, which is unacceptable, so that in the following embodiment, a concept of a virtual result table is introduced, that is, the virtual result table and the result table coexist, the virtual result table is all the fields of all the original tables currently added to the data analysis model, and the comparison is performed through the virtual result table when the duplication judgment is performed on the fields, which is specifically referred to the following embodiment two, and is not described herein again.
In an optional embodiment, the method further comprises:
step S17: receiving a deletion request of the preset field; and the deletion request comprises the mapping relation between the preset field and the corresponding result field.
Specifically, the preset fields of the original table and the result fields in the formed result table may establish one-to-one mapping in the form of hidden keys, i.e., fields + table names, so that when adding or deleting the fields added to the original table, the corresponding fields in the result table may be directly operated, thereby maintaining other fields in the result table unaffected.
Step S18: and deleting the first cell and the second cell according to the mapping relation.
For example, the id field of Table 1 is deleted on the basis of the above results Table 4, and the results table at this time is as follows:
TABLE 7
Result field id (Table 2) name vv ctime
Affiliated form TABLE 2 TABLE 1 TABLE 2 TABLE 1
Example two
In order to solve the technical problem of data analysis field renaming in the prior art, the embodiment of the disclosure provides a data processing method. In addition to the above embodiments, the present embodiment further defines step S13. As shown in fig. 2, the data processing method mainly includes the following steps S21 to S25.
Step S21: receiving an adding request for adding a preset field of an original form into a data analysis model; wherein, the adding request includes the storage address of the original table.
Step S22: and acquiring the preset field according to the storage address.
Step S23: inquiring the preset field in a field set; the field set consists of all result fields in a virtual result table, and the virtual result table is a result table generated by the data analysis model according to all initial fields in all original tables added currently.
The virtual result table includes all result fields corresponding to all initial fields in all the original tables that have been added currently, and the scheme in the first embodiment is specifically adopted when determining the result fields in the virtual result table, which is not described herein again.
Step S24: and when the field set comprises the preset field, determining that the preset field is a repeated field.
Step S25: and when the preset field is a repeated field, renaming the preset field.
Step S26: and adding the renamed field into a first cell with a header in the result table corresponding to the result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
In this embodiment, by determining whether a preset field in an original table is a repeated field in a result table, and when the preset field is the repeated field, renaming the preset field, adding the renamed field to a first cell corresponding to a result field in the result table with a header as a result field, and adding a table name of the original table to a second cell associated with the first cell, where the header of the second cell is a table to which the second cell belongs, a field repetition problem existing in a data analysis result table in the prior art is solved.
In an optional embodiment, the method further comprises:
step S27: when the field set does not contain the preset field, determining that the preset field is a non-repetitive field, adding the preset field to a first cell corresponding to a result field with a header in the result table, and adding the table name of the original table to a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
And when the preset field is not contained in the field set, renaming processing is not required to be carried out on the field set, and the field set is directly added into a result table.
In an optional embodiment, the method further comprises:
adding a result field currently added to the result table to the set of fields.
Specifically, after adding a new result field to the result table, the new result field is also added to the field set. Therefore, the method can prevent the inaccurate result caused by omission when comparing whether the preset field is repeated or not in the follow-up process.
In an optional embodiment, step S25 specifically includes:
and when the preset field is a repeated field, taking the preset field and the table name of the original table as a result field.
When the original table that the user wants to add is id, name, ctime in table 1 and id, vv in table 2, all the fields in table 1 and table 2 are added to the virtual result table, and the virtual result table is determined according to the renaming rule of the embodiment and the methods of the above steps S21-S27 as follows:
TABLE 8
Figure BDA0002310280290000111
Meanwhile, the result table shown in table 4 may be obtained according to the renaming rule of this embodiment by comparing the preset field that the user wants to add with the field set formed by the result fields in the virtual result table, and adding the corresponding result fields into the result table according to the comparison result.
For another example, if the id of table 3 is added to the data analysis model, all the fields of table 3 are added to the virtual result table, and the virtual result table is determined as follows according to the renaming rule of the present embodiment and the methods of the above steps S21-S27:
TABLE 9
Figure BDA0002310280290000112
Correspondingly, comparing the preset field id which the user wants to add to table 3 with the field set composed of the result fields in the virtual result table, and adding the corresponding result fields into the result table according to the comparison result, according to the renaming rule of this embodiment, the result table can be obtained as follows:
watch 10
Result field id (Table 2) name vv ctime id (Table 3)
Affiliated form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 3
For another example, the id field of table 1 deleted in step S29 is added back, and from table 9 above, the final result table can be determined as follows:
TABLE 11
Result field id (Table 2) name vv ctime id (Table 3) id (Table 1)
Affiliated form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 3 TABLE 1
Therefore, the problem of data loss caused by materialization of the table data once the result table data is materialized can be solved, wherein in the first embodiment, after the id field of table 1 is modified for a plurality of times, the corresponding field is changed (for example, the id fields of table 1 in table 4 and table 6 are different).
In an optional embodiment, the method further comprises:
step S28: receiving a deletion request of the preset field; and the deletion request comprises the mapping relation between the preset field and the corresponding result field.
Specifically, the preset fields of the original table and the result fields in the formed result table may establish one-to-one mapping in the form of hidden keys, i.e., fields + table names, so that when adding or deleting the fields added to the original table, the corresponding fields in the result table may be directly operated, thereby maintaining other fields in the result table unaffected.
Step S29: and deleting the first cell and the second cell according to the mapping relation.
For example, the id field of Table 1 is deleted on the basis of the above results Table 4, the results table at this time is as shown in the above Table 5, and the virtual results table remains unchanged.
It will be appreciated by those skilled in the art that obvious modifications (for example, a superposition of the modes listed) or equivalent substitutions may be made on the basis of the various embodiments described above.
In the above, although the steps in the data processing method embodiment are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiment of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, those skilled in the art may also add other steps, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
For convenience of description, only the relevant parts of the embodiments of the present disclosure are shown, and details of the specific techniques are not disclosed, please refer to the embodiments of the method of the present disclosure.
EXAMPLE III
In order to solve the technical problem of data analysis field renaming in the prior art, the embodiment of the present disclosure provides a data processing apparatus. The apparatus may perform the steps in the data processing method embodiment described in the first embodiment. As shown in fig. 3, the apparatus mainly includes: a request receiving module 31, a field obtaining module 32, a repeated determining module 33, a renaming module 34 and a result table module 35; wherein the content of the first and second substances,
the request receiving module 31 is configured to receive an adding request for adding a preset field of an original form to the data analysis model; wherein, the adding request includes the storage address of the original table;
the field obtaining module 32 is configured to obtain the preset field according to the storage address;
the repeated determining module 33 is configured to determine whether the preset field is a repeated field in the result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
the renaming module 34 is configured to rename the preset field when the preset field is a repeated field;
the result table module 35 is configured to add the renamed field to a first cell in the result table whose header is the result field, and add the table name of the original table to a second cell associated with the first cell, where the header of the second cell is the table to which the table belongs.
Further, the repetition determination module 33 is specifically configured to: inquiring the preset field in a field set; wherein the set of fields consists of all result fields in the result table; when the field set comprises the preset field, determining that the preset field is a repeated field; and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
Further, the repetition determination module 33 is specifically configured to: inquiring the preset field in a field set; the field set consists of all result fields in a virtual result table, and the virtual result table is a result table generated by the data analysis model according to all initial fields in all the original tables added currently; when the field set comprises the preset field, determining that the preset field is a repeated field; and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
Further, the renaming module 34 is specifically configured to: and when the preset field is a repeated field, taking the preset field and the table name of the original table as a result field.
Further, the result table module 35 is further configured to: and when the field set does not contain the preset field, adding the preset field into a first cell of the result table with a header as a result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
Further, the apparatus further comprises: a field addition module 36;
the field adding module 36 is configured to add the result field currently added to the result table to the field set.
Further, the request receiving module 31 is further configured to: receiving a deletion request of the preset field; the deleting request comprises a mapping relation between the preset field and the corresponding result field; and deleting the first cell and the second cell according to the mapping relation.
For detailed descriptions of the working principle, the technical effect of implementation, and the like of the embodiment of the data processing apparatus, reference may be made to the description related to the embodiment of the data processing method, and further description is omitted here.
Example four
Referring now to FIG. 4, a block diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any superposition of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable superposition of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable superposition of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable superposition of the above.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (hypertext transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving an adding request for adding a preset field of an original form into a data analysis model; wherein, the adding request includes the storage address of the original table; acquiring the preset field according to the storage address; determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results; when the preset field is a repeated field, renaming the preset field; and adding the renamed field into a first cell with a header in the result table corresponding to the result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable superposition of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a data processing method including:
receiving an adding request for adding a preset field of an original form into a data analysis model; wherein, the adding request includes the storage address of the original table;
acquiring the preset field according to the storage address;
determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
when the preset field is a repeated field, renaming the preset field;
and adding the renamed field into a first cell with a header in the result table corresponding to the result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
Further, the determining whether the preset field is a duplicate field in the result table includes:
inquiring the preset field in a field set; wherein the set of fields consists of all result fields in the result table;
when the field set comprises the preset field, determining that the preset field is a repeated field;
and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
Further, the determining whether the preset field is a duplicate field in the result table includes:
inquiring the preset field in a field set; the field set consists of all result fields in a virtual result table, and the virtual result table is a result table generated by the data analysis model according to all initial fields in all the original tables added currently;
when the field set comprises the preset field, determining that the preset field is a repeated field;
and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
Further, when the preset field is a repeated field, renaming the preset field includes:
and when the preset field is a repeated field, taking the preset field and the table name of the original table as a result field.
Further, the method further comprises:
and when the field set does not contain the preset field, adding the preset field into a first cell of the result table with a header as a result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
Further, the method further comprises:
adding a result field currently added to the result table to the set of fields.
Further, the method further comprises:
receiving a deletion request of the preset field; the deleting request comprises a mapping relation between the preset field and the corresponding result field;
and deleting the first cell and the second cell according to the mapping relation.
According to one or more embodiments of the present disclosure, there is provided a data processing apparatus including:
the request receiving module is used for receiving an adding request for adding a preset field of an original form into the data analysis model; wherein, the adding request includes the storage address of the original table;
the field acquisition module is used for acquiring the preset field according to the storage address;
the repeated determining module is used for determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
the renaming module is used for renaming the preset field when the preset field is a repeated field;
and the result table module is used for adding the renamed fields into a first cell with a table head as a result field in the result table and adding the table name of the original table into a second cell associated with the first cell, wherein the table head of the second cell is the table to which the second cell belongs.
Further, the repetition determination module is specifically configured to: inquiring the preset field in a field set; wherein the set of fields consists of all result fields in the result table; when the field set comprises the preset field, determining that the preset field is a repeated field; and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
Further, the repetition determination module is specifically configured to: inquiring the preset field in a field set; the field set consists of all result fields in a virtual result table, and the virtual result table is a result table generated by the data analysis model according to all initial fields in all the original tables added currently; when the field set comprises the preset field, determining that the preset field is a repeated field; and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
Further, the renaming module is specifically configured to: and when the preset field is a repeated field, taking the preset field and the table name of the original table as a result field.
Further, the result table module is further configured to: and when the field set does not contain the preset field, adding the preset field into a first cell of the result table with a header as a result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
Further, the apparatus further comprises:
a field adding module, configured to add a result field currently added to the result table to the field set.
Further, the request receiving module is further configured to: receiving a deletion request of the preset field; the deleting request comprises a mapping relation between the preset field and the corresponding result field; and deleting the first cell and the second cell according to the mapping relation.
According to one or more embodiments of the present disclosure, there is provided an electronic device including:
a memory for storing non-transitory computer readable instructions; and
and the processor is used for executing the computer readable instructions, so that the processor realizes the data processing method when executing.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium storing non-transitory computer-readable instructions which, when executed by a computer, cause the computer to perform the above-described data processing method.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular arrangement of features above described which are stacked together, and that other arrangements in which features of the above described type or their equivalents are stacked together as desired without departing from the spirit of the disclosure are also encompassed. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A data processing method, comprising:
receiving an adding request for adding a preset field of an original form into a data analysis model; wherein, the adding request includes the storage address of the original table;
acquiring the preset field according to the storage address;
determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
when the preset field is a repeated field, renaming the preset field;
and adding the renamed field into a first cell with a header in the result table corresponding to the result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
2. The method of claim 1, wherein determining whether the predetermined field is a duplicate field in a result table comprises:
inquiring the preset field in a field set; wherein the set of fields consists of all result fields in the result table;
when the field set comprises the preset field, determining that the preset field is a repeated field;
and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
3. The method of claim 1, wherein determining whether the predetermined field is a duplicate field in a result table comprises:
inquiring the preset field in a field set; the field set consists of all result fields in a virtual result table, and the virtual result table is a result table generated by the data analysis model according to all initial fields in all the original tables added currently;
when the field set comprises the preset field, determining that the preset field is a repeated field;
and when the field set does not contain the preset field, determining that the preset field is a non-repeated field.
4. The method of claim 1, wherein renaming the preset field when the preset field is a repeated field comprises:
and when the preset field is a repeated field, taking the preset field and the table name of the original table as a result field.
5. The method of claim 1, further comprising:
and when the field set does not contain the preset field, adding the preset field into a first cell of the result table with a header as a result field, and adding the table name of the original table into a second cell associated with the first cell, wherein the header of the second cell is the table to which the original table belongs.
6. A method according to claim 2 or 3, characterized in that the method further comprises:
adding a result field currently added to the result table to the set of fields.
7. The method of claim 1, further comprising:
receiving a deletion request of the preset field; the deleting request comprises a mapping relation between the preset field and the corresponding result field;
and deleting the first cell and the second cell according to the mapping relation.
8. A data processing apparatus, comprising:
the request receiving module is used for receiving an adding request for adding a preset field of an original form into the data analysis model; wherein, the adding request includes the storage address of the original table;
the field acquisition module is used for acquiring the preset field according to the storage address;
the repeated determining module is used for determining whether the preset field is a repeated field in a result table; the result table is a table generated by the data analysis model and used for storing data analysis results;
the renaming module is used for renaming the preset field when the preset field is a repeated field;
and the result table module is used for adding the renamed fields into a first cell with a table head as a result field in the result table and adding the table name of the original table into a second cell associated with the first cell, wherein the table head of the second cell is the table to which the second cell belongs.
9. An electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
a processor for executing the computer readable instructions such that the processor when executing performs the data processing method of any of claims 1-7.
10. A computer-readable storage medium storing non-transitory computer-readable instructions which, when executed by a computer, cause the computer to perform the data processing method of any one of claims 1-7.
CN201911256032.7A 2019-12-10 2019-12-10 Data processing method and device Active CN111143355B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911256032.7A CN111143355B (en) 2019-12-10 2019-12-10 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911256032.7A CN111143355B (en) 2019-12-10 2019-12-10 Data processing method and device

Publications (2)

Publication Number Publication Date
CN111143355A true CN111143355A (en) 2020-05-12
CN111143355B CN111143355B (en) 2023-04-25

Family

ID=70517903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911256032.7A Active CN111143355B (en) 2019-12-10 2019-12-10 Data processing method and device

Country Status (1)

Country Link
CN (1) CN111143355B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094401A (en) * 2021-05-07 2021-07-09 北京京东振世信息技术有限公司 Target source data generation method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7127672B1 (en) * 2003-08-22 2006-10-24 Microsoft Corporation Creating and managing structured data in an electronic spreadsheet
CN104021213A (en) * 2014-06-20 2014-09-03 中国银行股份有限公司 Method and device for merging relational records
CN108153719A (en) * 2016-12-02 2018-06-12 北京国双科技有限公司 Merge the method and apparatus of electrical form
CN109254969A (en) * 2018-08-31 2019-01-22 平安科技(深圳)有限公司 Tables of data processing method, device, equipment and storage medium
CN109584975A (en) * 2018-11-21 2019-04-05 金色熊猫有限公司 Medical data standardization processing method and device
CN109614600A (en) * 2018-10-25 2019-04-12 平安科技(深圳)有限公司 Report methods of exhibiting, device and computer storage medium
CN109977104A (en) * 2019-04-01 2019-07-05 重庆紫光华山智安科技有限公司 Data managing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7127672B1 (en) * 2003-08-22 2006-10-24 Microsoft Corporation Creating and managing structured data in an electronic spreadsheet
CN104021213A (en) * 2014-06-20 2014-09-03 中国银行股份有限公司 Method and device for merging relational records
CN108153719A (en) * 2016-12-02 2018-06-12 北京国双科技有限公司 Merge the method and apparatus of electrical form
CN109254969A (en) * 2018-08-31 2019-01-22 平安科技(深圳)有限公司 Tables of data processing method, device, equipment and storage medium
CN109614600A (en) * 2018-10-25 2019-04-12 平安科技(深圳)有限公司 Report methods of exhibiting, device and computer storage medium
CN109584975A (en) * 2018-11-21 2019-04-05 金色熊猫有限公司 Medical data standardization processing method and device
CN109977104A (en) * 2019-04-01 2019-07-05 重庆紫光华山智安科技有限公司 Data managing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094401A (en) * 2021-05-07 2021-07-09 北京京东振世信息技术有限公司 Target source data generation method, device, equipment and storage medium
CN113094401B (en) * 2021-05-07 2023-08-08 北京京东振世信息技术有限公司 Target source data generation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111143355B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN110634047B (en) Method and device for recommending house resources, electronic equipment and storage medium
CN109656923B (en) Data processing method and device, electronic equipment and storage medium
CN110516159B (en) Information recommendation method and device, electronic equipment and storage medium
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN115757400A (en) Data table processing method and device, electronic equipment and computer readable medium
CN112099982A (en) Collapse information positioning method, device, medium and electronic equipment
CN111857720A (en) Method and device for generating user interface state information, electronic equipment and medium
CN113918659A (en) Data operation method and device, storage medium and electronic equipment
CN111241137B (en) Data processing method, device, electronic equipment and storage medium
CN111143355B (en) Data processing method and device
CN111708680A (en) Error reporting information analysis method and device, electronic equipment and storage medium
CN110765238A (en) Data encryption query method and device
CN115344688A (en) Business data display method and device, electronic equipment and computer readable medium
CN113157695B (en) Data processing method and device, readable medium and electronic equipment
CN112905090A (en) Spreadsheet processing method, device, terminal and storage medium
CN112100159A (en) Data processing method and device, electronic equipment and computer readable medium
CN112417276A (en) Paging data acquisition method and device, electronic equipment and computer readable storage medium
CN110941683A (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN111737040A (en) Program code repairing method and device
CN111641690A (en) Session message processing method and device and electronic equipment
CN112311840A (en) Multi-terminal data synchronization method, device, equipment and medium
CN114040014A (en) Content pushing method and device, electronic equipment and computer readable storage medium
CN116483808B (en) Data migration method, device, electronic equipment and computer readable medium
CN110716885B (en) Data management method and device, electronic equipment and storage medium
CN111026983B (en) Method, device, medium and electronic equipment for realizing hyperlink

Legal Events

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