CN111143355B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN111143355B
CN111143355B CN201911256032.7A CN201911256032A CN111143355B CN 111143355 B CN111143355 B CN 111143355B CN 201911256032 A CN201911256032 A CN 201911256032A CN 111143355 B CN111143355 B CN 111143355B
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.)
Active
Application number
CN201911256032.7A
Other languages
Chinese (zh)
Other versions
CN111143355A (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

Abstract

The present disclosure discloses a data processing method, apparatus, electronic device, and computer-readable storage medium. The method comprises the following steps: receiving an adding request for adding preset fields 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; the renamed fields are added to the results table. According to the embodiment of the disclosure, whether the preset field in the original table is the repeated field in the result table is determined, when the field is the repeated field, renaming is carried out on the preset field, and the renamed field is added into the result table, so that the field repeated problem in the data analysis result table in the prior art is solved.

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, apparatus, and computer readable storage medium.
Background
The data analysis means that a large amount of collected data is analyzed by a proper statistical analysis method, and the collected data are summarized, understood and digested to maximally develop the function of the data and play a role of the data.
In the prior art, processing analysis is generally performed on data of a plurality of data tables, the same fields inevitably appear in the plurality of data tables, correspondingly, the situation that field renames inevitably appear in the data analysis result table is also avoided, and how to handle field naming conflicts 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 the duplicate name of the data analysis field in the prior art. Further, a data processing apparatus, a data processing hardware apparatus, a computer-readable storage medium, and a data processing terminal are provided.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
a data processing method, comprising:
receiving an adding request for adding preset fields of an original form into a data analysis model; wherein, the adding request contains 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 which is generated by the data analysis model and is used for storing data analysis results;
renaming the preset field when the preset field is a repeated field;
and adding the renamed field into a first cell corresponding to the table head of the result table as a result field, 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 affiliated table.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
a data processing apparatus comprising:
the request receiving module is used for receiving an adding request for adding a preset field of the original form into the data analysis model; wherein, the adding request contains the storage address of the original table;
the field acquisition module is used for acquiring the preset field according to the storage address;
the repetition determination module is used for determining whether the preset field is a repetition field in the result table; the result table is a table which is generated by the data analysis model and is 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 field into a first cell corresponding to the result field with the head of the result table, and adding the name of the original table into a second cell associated with the first cell, wherein the head of the second cell is the affiliated table.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
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 performs any of the above data processing methods.
In order to achieve the above object, according to one aspect of the present disclosure, there is provided the following technical solutions:
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 of the preceding claims.
In order to achieve the above object, according to still another aspect of the present disclosure, there is further provided the following technical solutions:
A data processing terminal comprises any one of the data processing devices.
According to the embodiment of the disclosure, whether the preset field in the original table is a repeated field in the result table is determined, when the preset field is the repeated field, the preset field is renamed, the renamed field is added to a first cell corresponding to the table head of the result table as the result field, and the table name of the original table is added to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table, and the problem of field repetition in the data analysis result table in the prior art is solved.
The foregoing description is only an overview of the disclosed technology, and may be implemented in accordance with the disclosure of the present disclosure, so that the above-mentioned and other objects, features and advantages of the present disclosure can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow diagram of a data processing method according to one embodiment of the present disclosure;
FIG. 2 is a flow diagram of a data processing method according to one embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a data processing apparatus according to one embodiment of the present disclosure;
fig. 4 is a schematic structural view 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 have been shown in the accompanying 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 are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present 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 "including" and variations thereof as used herein are intended to be 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. Related definitions of other terms will be given in the description below.
Example 1
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 preset fields of an original form into a data analysis model; wherein, the adding request contains the storage address of the original table.
The original table and the preset fields of the original table can be set by 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, an HIVE table, or the like, and the kind of the original table is not specifically limited herein. Regarding the preset fields, the fields that the user needs to add to the data analysis model are given. Wherein a field is a fixed and well-defined data block that splits the original form data into, for example, headers in an Excel form, each entry in the header specifying the meaning of the column of data. And two identical fields are not allowed to exist in the same table, so that ambiguity is avoided and confusion in the data analysis process is avoided.
The data analysis model may specifically be a data analysis tool, which is configured 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 plural, 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 may be a local storage address or a website.
Specifically, the user can add the original form to be added to the data analysis model and the corresponding added field, namely the 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 ok button).
Step S12: and acquiring the preset field according to the storage address.
Specifically, firstly, the storage address is obtained from the local or internet, and then the preset field in the original table is obtained.
Step S13: determining whether the preset field is a repeated field in a result table; the result table is a table which is generated by the data analysis model and is used for storing data analysis results.
The result table comprises a result field row and a table row to which the result field row belongs. The cell corresponding to the result field line is used for storing the result field after data analysis, and the cell corresponding to the table line is used for storing the table to which the result field after data analysis belongs. Alternatively, the result table includes a result field column and a belonging table column. The cell corresponding to the result field column is used for storing the result field after data analysis, and the cell corresponding to the table column is used for storing the table to which the result field after data analysis belongs. And the cell position corresponding to the result field column corresponds to the cell position corresponding to the belonging table column.
The result table may be an empty table, i.e. no original table was added to the data analysis model before this time. Or the result table contains at least one data corresponding to the original table, namely a result field and a belonging table. When the result table is the 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 contains at least one data corresponding to the original table, that is, the result field and the belonging table, further judgment is needed, when the judgment result is the repeated field, step S14 and step S15 are executed, and when the judgment result is the unrepeated field, step S16 is executed.
Step S14: renaming the preset field.
Specifically, if the preset field is a repeated field, renaming the preset field. The renamed rule is that the renamed field is not repeated with the fields 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 corresponding to the table head of the result table as a result field, 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 affiliated table.
Specifically, the header of the result table is parallel to 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 the corresponding position of the result table.
In the embodiment, whether the preset field in the original table is a repeated field in the result table is determined, when the preset field is the repeated field, renaming is performed on the preset field, the renamed field is added to a first cell corresponding to the table head of the result table being the result field, and the table name of the original table is added to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table, so that the problem of field repetition in the data analysis result table in the prior art is solved.
In an alternative embodiment, the method further comprises:
step S16: and adding the preset field into a first cell corresponding to the table head of the result table as the result field, 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 affiliated table.
When the field set does not contain the preset field, renaming treatment is not needed, and the field set is directly added into a result table.
In an alternative embodiment, step S13 specifically includes:
step S131: inquiring the preset field in a field set; wherein the field set consists of all result fields in the result table.
Step S132: and when the field set contains the preset field, determining the preset field as a repeated field.
Step S133: and when the preset field is not contained in the field set, determining that the preset field is a non-repeated field.
In an alternative embodiment, the method further comprises:
a result field currently added to the result table is added to the set of fields.
Specifically, after the new result field is added to the result table, the new result field is also added to the field set. Therefore, the follow-up omission in comparing whether the preset field is repeated or not can be prevented, and inaccurate results can be caused.
In an alternative 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 result fields.
For example, the original table may be in the form of:
TABLE 1 TABLE 2 TABLE 3 Table 3
id id id
name vv name
desc date type
ctime ctime ctime
The fields of each original table are not repeated, but there are fields of the same name between different original tables, for example: id, name, type, ctime.
When the original table to be added by the user is id, name, ctime in table 1 and id and v in table 2, then the upper fields are sequentially added to the result table according to the preset rule, and according to the renaming rule of the embodiment, the following result table can be obtained:
TABLE 4 Table 4
Results field id id (Table 2) name vv ctime
Belonging to a form TABLE 1 TABLE 2 TABLE 1 TABLE 2 TABLE 1
For another example, if ctime in table 2 is newly added to the above result table, the above field naming policy is adopted, and the table format of the result obtained at this time is as follows:
TABLE 5
Results field id (Table 2) name vv ctime ctime (Table 2)
Belonging to a form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 2
For another example, the id field of table 1 deleted in step S18 is added back again, and the result is as follows:
TABLE 6
Results field id (Table 2) name vv ctime id id (Table 1)
Belonging to a form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 3 Table 3 TABLE 1
Although the fields in the result table are not repeated, this will cause the id field of table 1 to change after multiple modifications (for example, the id fields of table 1 corresponding to tables 4 and 6 are different), and once the result table data is materialized, this process will result in the loss of the existing data, which is not acceptable, so the concept of a virtual result table is introduced in the following embodiment, that is, the virtual result table is concurrent with the result table, and the virtual result table is all the fields of all the original tables in the data analysis model that have been currently added, and the fields are compared by the virtual result table when the renaming judgment is performed, see in detail the following embodiment two, which will not be repeated here.
In an alternative embodiment, the method further comprises:
step S17: receiving a deletion request of the preset field; wherein, the deletion request includes a mapping relationship between the preset field and the corresponding result field.
Specifically, the preset field of the original table and the result field in the formed result table can establish one-to-one mapping through a hidden key, namely, a field+table name form, so that when the fields added into the original table are added and deleted, the corresponding field in the result table can be directly operated, and other fields in the result table can be kept 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 result table 4, and the result table at this time is as follows:
TABLE 7
Results field id (Table 2) name vv ctime
Belonging to a 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. The present embodiment further defines step S13 on the basis of the above embodiment. 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 preset fields of an original form into a data analysis model; wherein, the adding request contains 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; wherein the set of fields 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 from all initial fields in all original tables that have been currently added.
The virtual result table includes all result fields corresponding to all initial fields in all original tables that have been added, and specifically, when determining the result fields in the virtual result table, the scheme in the first embodiment is adopted, which is not described herein again.
Step S24: and when the field set contains the preset field, determining the preset field as a repeated field.
Step S25: and renaming the preset field when the preset field is a repeated field.
Step S26: and adding the renamed field into a first cell corresponding to the table head of the result table as a result field, 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 affiliated table.
In the embodiment, whether the preset field in the original table is a repeated field in the result table is determined, when the preset field is the repeated field, renaming is performed on the preset field, the renamed field is added to a first cell corresponding to the table head of the result table being the result field, and the table name of the original table is added to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table, so that the problem of field repetition in the data analysis result table in the prior art is solved.
In an alternative 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-repeated field, adding the preset field to a first cell corresponding to the table head of the result table as the result field, and adding the table name of the original table to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table.
When the field set does not contain the preset field, renaming treatment is not needed, and the field set is directly added into a result table.
In an alternative embodiment, the method further comprises:
a result field currently added to the result table is added to the set of fields.
Specifically, after the new result field is added to the result table, the new result field is also added to the field set. Therefore, the follow-up omission in comparing whether the preset field is repeated or not can be prevented, and inaccurate results can be caused.
In an alternative 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 result fields.
When the original tables to be added by the user are id, name, ctime in table 1 and id and v in table 2, all the fields in the above tables 1 and 2 are added to the virtual result table, and the virtual result table is determined according to the renaming rule of the present embodiment and the method of the above steps S21 to S27 as follows:
TABLE 8
Figure BDA0002310280290000111
Meanwhile, according to the comparison result, the corresponding result field is added into the result table according to the comparison result, and the result table shown in the above table 4 can be obtained according to the renaming rule of the present embodiment.
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 renaming rule according to the present embodiment and the method of steps S21 to S27 described above determine the virtual result table as follows:
TABLE 9
Figure BDA0002310280290000112
Correspondingly, comparing the preset field id which the user wants to add to the table 3 with the field set formed by the result fields in the virtual result table, adding the corresponding result field to the result table according to the comparison result, and obtaining the result table according to the renaming rule of the embodiment, wherein the result table is as follows:
table 10
Results field id (Table 2) name vv ctime id (Table 3)
Belonging to a form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 3 Table 3
For another example, the id field of table 1 deleted in step S29 is added back, and according to the above table 9, it can be determined that the final result table is as follows:
TABLE 11
Results field id (Table 2) name vv ctime id (Table 3) id (Table 1)
Belonging to a form TABLE 2 TABLE 1 TABLE 2 TABLE 1 TABLE 3 Table 3 TABLE 1
It can be seen that in the first embodiment, the problem of data loss caused by the fact that the id field of table 1 changes after multiple modifications (e.g., the id fields of table 1 in tables 4 and 6 are different) once the result table data is materialized can be solved.
In an alternative embodiment, the method further comprises:
Step S28: receiving a deletion request of the preset field; wherein, the deletion request includes a mapping relationship between the preset field and the corresponding result field.
Specifically, the preset field of the original table and the result field in the formed result table can establish one-to-one mapping through a hidden key, namely, a field+table name form, so that when the fields added into the original table are added and deleted, the corresponding field in the result table can be directly operated, and other fields in the result table can be kept 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 result table 4, and the result table at this time is as shown in the above table 5, while the virtual result table remains unchanged.
It will be appreciated by those skilled in the art that obvious modifications (e.g., overlapping of enumerated modes) or equivalent substitutions may be made on the basis of the various embodiments described above.
In the foregoing, although the steps in the embodiments of the data processing method are described in the above order, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily performed in the above order, but may be performed in reverse order, parallel, cross, etc., and other steps may be further added to those skilled in the art on the basis of the above steps, and these obvious modifications or equivalent manners are also included in the protection scope of the present disclosure and are not repeated herein.
The following is an embodiment of the disclosed apparatus, which may be used to perform steps implemented by an embodiment of the disclosed method, and for convenience of explanation, only those portions relevant to the embodiment of the disclosed method are shown, and specific technical details are not disclosed, referring to the embodiment of the disclosed method.
Example III
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 device. The apparatus may perform the steps of 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 acquiring module 32, a repetition determining module 33, a renaming module 34 and a result table module 35; wherein, the liquid crystal display device comprises a liquid crystal display device,
the request receiving module 31 is configured to receive an addition request for adding a preset field of the original table to the data analysis model; wherein, the adding request contains 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 repetition determination module 33 is configured to determine whether the preset field is a repetition field in the result table; the result table is a table which is generated by the data analysis model and is 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 corresponding to the result field as a header in the result table, 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 belonging table.
Further, the repetition determination module 33 is specifically configured to: inquiring the preset field in a field set; wherein the field set is composed of all result fields in the result table; when the field set contains the preset field, determining the preset field as a repeated field; and when the preset field is not contained in the field set, 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 original tables which are added currently; when the field set contains the preset field, determining the preset field as a repeated field; and when the preset field is not contained in the field set, 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 result fields.
Further, the result table module 35 is further configured to: when the field set does not contain the preset field, adding the preset field to a first cell corresponding to the table head of the result table as the result field, and adding the table name of the original table to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table.
Further, the device further comprises: a field addition module 36;
the field adding module 36 is configured to add a 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; wherein, the deletion request contains the 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 principles, the technical effects of the embodiments of the data processing apparatus, and the like, reference may be made to the related descriptions in the foregoing embodiments of the data processing method, which are not repeated herein.
Example IV
Referring now to fig. 4, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, 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, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can 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 combination of the foregoing. In the context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), etc., or any suitable superposition of the above.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText TransferProtocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication 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 networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated 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 preset fields of an original form into a data analysis model; wherein, the adding request contains 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 which is generated by the data analysis model and is used for storing data analysis results; renaming the preset field when the preset field is a repeated field; and adding the renamed field into a first cell corresponding to the table head of the result table as a result field, 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 affiliated table.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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 superposition of the above. 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 overlay 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 preset fields of an original form into a data analysis model; wherein, the adding request contains 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 which is generated by the data analysis model and is used for storing data analysis results;
renaming the preset field when the preset field is a repeated field;
and adding the renamed field into a first cell corresponding to the table head of the result table as a result field, 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 affiliated table.
Further, the determining whether the preset field is a repeated field in the result table includes:
inquiring the preset field in a field set; wherein the field set is composed of all result fields in the result table;
when the field set contains the preset field, determining the preset field as a repeated field;
And when the preset field is not contained in the field set, determining that the preset field is a non-repeated field.
Further, the determining whether the preset field is a repeated 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 original tables which are added currently;
when the field set contains the preset field, determining the preset field as a repeated field;
and when the preset field is not contained in the field set, 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 result fields.
Further, the method further comprises:
when the field set does not contain the preset field, adding the preset field to a first cell corresponding to the table head of the result table as the result field, and adding the table name of the original table to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table.
Further, the method further comprises:
a result field currently added to the result table is added to the set of fields.
Further, the method further comprises:
receiving a deletion request of the preset field; wherein, the deletion request contains the 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 the original form into the data analysis model; wherein, the adding request contains the storage address of the original table;
the field acquisition module is used for acquiring the preset field according to the storage address;
the repetition determination module is used for determining whether the preset field is a repetition field in the result table; the result table is a table which is generated by the data analysis model and is 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 field into a first cell corresponding to the result field with the head of the result table, and adding the name of the original table into a second cell associated with the first cell, wherein the head of the second cell is the affiliated table.
Further, the repetition determination module is specifically configured to: inquiring the preset field in a field set; wherein the field set is composed of all result fields in the result table; when the field set contains the preset field, determining the preset field as a repeated field; and when the preset field is not contained in the field set, 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 original tables which are added currently; when the field set contains the preset field, determining the preset field as a repeated field; and when the preset field is not contained in the field set, 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 result fields.
Further, the result table module is further configured to: when the field set does not contain the preset field, adding the preset field to a first cell corresponding to the table head of the result table as the result field, and adding the table name of the original table to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table.
Further, the device further comprises:
and the field adding module is used for adding the 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; wherein, the deletion request contains the 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 a processor configured to execute the computer readable instructions, such that the processor performs the data processing method described above.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium storing non-transitory computer-readable instructions that, when executed by a computer, cause the computer to perform the data processing method described above.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific arrangements of the technical features described above, but also encompasses other arrangements of the technical features described above, or their equivalents, in any manner without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although 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. In 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 limiting the scope of the present 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 subcompositions.
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 example forms of implementing the claims.

Claims (10)

1. A method of data processing, comprising:
receiving an adding request for adding preset fields of an original form into a data analysis model; wherein, the adding request contains 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 which is generated by the data analysis model and is used for storing data analysis results;
renaming the preset field when the preset field is a repeated field;
and adding the renamed field into a first cell corresponding to the table head of the result table as a result field, 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 affiliated table.
2. The method of claim 1, wherein the determining whether the preset field is a repetition field in a result table comprises:
inquiring the preset field in a field set; wherein the field set is composed of all result fields in the result table;
when the field set contains the preset field, determining the preset field as a repeated field;
and when the preset field is not contained in the field set, determining that the preset field is a non-repeated field.
3. The method of claim 1, wherein the determining whether the preset field is a repetition 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 original tables which are added currently;
when the field set contains the preset field, determining the preset field as a repeated field;
and when the preset field is not contained in the field set, 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 repetition field comprises:
and when the preset field is a repeated field, taking the preset field and the table name of the original table as result fields.
5. A method according to claim 3, characterized in that the method further comprises:
when the field set does not contain the preset field, adding the preset field to a first cell corresponding to the table head of the result table as the result field, and adding the table name of the original table to a second cell associated with the first cell, wherein the table head of the second cell is the affiliated table.
6. A method according to claim 2 or 3, characterized in that the method further comprises:
a result field currently added to the result table is added to the set of fields.
7. The method according to claim 1, wherein the method further comprises:
receiving a deletion request of the preset field; wherein, the deletion request contains the 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 the original form into the data analysis model; wherein, the adding request contains the storage address of the original table;
the field acquisition module is used for acquiring the preset field according to the storage address;
the repetition determination module is used for determining whether the preset field is a repetition field in the result table; the result table is a table which is generated by the data analysis model and is 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 field into a first cell corresponding to the result field with the head of the result table, and adding the name of the original table into a second cell associated with the first cell, wherein the head of the second cell is the affiliated table.
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 executed, implements the data processing method according to 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 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 CN111143355A (en) 2020-05-12
CN111143355B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094401B (en) * 2021-05-07 2023-08-08 北京京东振世信息技术有限公司 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

Also Published As

Publication number Publication date
CN111143355A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111625473B (en) Interface test case generation method and device, storage medium and electronic equipment
CN111581563B (en) Page response method and device, storage medium and electronic equipment
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
CN112650790B (en) Target point cloud plane determining method and device, electronic equipment and storage medium
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111950857A (en) Index system management method and device based on service indexes and electronic equipment
CN112099982A (en) Collapse information positioning method, device, medium and electronic equipment
US20240104298A1 (en) Method and apparatus for tabular data processing, terminal, and storage medium
CN111241137B (en) Data processing method, device, electronic equipment and storage medium
CN111143355B (en) Data processing method and device
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN111708680A (en) Error reporting information analysis method and device, electronic equipment and storage medium
CN110765238A (en) Data encryption query method and device
CN114328700B (en) Data checking method and device in medical data ETL task
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN112084086B (en) Information collection method, device, medium and electronic equipment
CN111782895B (en) Retrieval processing method and device, readable medium and electronic equipment
CN110941683B (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN114611483A (en) Method and device for automatically upgrading nuclear power DCS control logic diagram and function diagram association
CN112905090A (en) Spreadsheet processing method, device, terminal and storage medium
CN111581930A (en) Online form data processing method and device, electronic equipment and readable medium
CN114040014B (en) Content pushing method, device, electronic equipment and computer readable storage medium

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