CN110928854A - Data import method and device and electronic equipment - Google Patents

Data import method and device and electronic equipment Download PDF

Info

Publication number
CN110928854A
CN110928854A CN201910990398.0A CN201910990398A CN110928854A CN 110928854 A CN110928854 A CN 110928854A CN 201910990398 A CN201910990398 A CN 201910990398A CN 110928854 A CN110928854 A CN 110928854A
Authority
CN
China
Prior art keywords
data
database
user
field
pieces
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910990398.0A
Other languages
Chinese (zh)
Inventor
辛洋汐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Reach Best Technology Co Ltd
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Reach Best 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 Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to CN201910990398.0A priority Critical patent/CN110928854A/en
Publication of CN110928854A publication Critical patent/CN110928854A/en
Pending legal-status Critical Current

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/21Design, administration or maintenance of databases
    • 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

Landscapes

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

Abstract

The disclosure relates to a data import method and device and electronic equipment. The method comprises the following steps: responding to the operation of a user, and acquiring a table name of a database table which is input by the user and currently needs to insert data; and finding the configuration information corresponding to the table name of the selected database table from a preset configuration file, wherein the configuration information comprises the following steps: database link information and field names that must be filled in a database table; prompting a field name for a user, and acquiring one or more pieces of data which are input by the user and correspond to the field name; and importing the acquired one or more pieces of data into a database table according to the database link information. By adopting the scheme, data import does not need the participation of developers, and users can import data into the database table at any time and any place, so that the convenience of data import is improved.

Description

Data import method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data importing method and apparatus, an electronic device, and a storage medium.
Background
In the related art, a network platform generally involves a plurality of management backgrounds, platform operators often need to import data in batches when using the network platform, and a current processing mode is to import data into a database through a script program by developers. If the test environment data needs to be imported into the online library and the database machine rooms are separated, two databases cannot be operated in the same server, and the data can only be imported in various other modes. For example, a Game Master (GM) interface document platform (a Game console platform) has been previously used only for a self-research Game, and an Internet Data Center (IDC) machine room test library is used as a database. When accessing a unique game (a non-company internal developer), an interface document platform which is open to the outside needs to be provided, a service needs to be expanded to a cloud (for example, flight communication cloud) machine room, a game database is used (the game database is not communicated with an idc machine room), so that data cannot be directly imported, data of the idc machine room needs to be run out and stored as a file, the file is then transmitted to the cloud machine room (through a regular online process), and a script is run on the cloud service to import the data. In addition, a game publishing platform (a game platform) has a channel packaging function, and operators often need to import channel packages in batches and also need to manually import data by developers.
Therefore, in the related art, each time data is imported, a developer is required to perform operation, and the data import is inconvenient.
Disclosure of Invention
The present disclosure provides a data import method, a data import device, and an electronic device, so as to at least solve the problem of inconvenient data import in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a data import method, including: responding to the operation of a user, and acquiring a table name of a database table which is input by the user and currently needs to insert data; finding configuration information corresponding to the table name of the selected database table from a preset configuration file, wherein the configuration information comprises: database link information and field names which must be filled in the database table; prompting the field name to a user, and acquiring one or more pieces of data which are input by the user and correspond to the field name; and importing the acquired one or more pieces of data into the database table according to the database link information.
Optionally, the step of prompting the field name to the user includes: and displaying the field name.
Optionally, the step of acquiring one or more pieces of data corresponding to the field name input by the user includes: acquiring a data table input by a user, wherein the header of the data table comprises the name of each field; and acquiring the one or more pieces of data from the data table.
Optionally, the step of importing the one or more pieces of data obtained into the database table includes: generating a database operation statement inserted into the one or more pieces of data; and executing the database operation statement according to the database link information, and importing the one or more pieces of data into the database table.
Optionally, the configuration information further includes: the method comprises the following steps that a field and a corresponding attribute value thereof are logically deleted, and/or a time creation field and a corresponding attribute value thereof are created; the step of generating a database operation statement for insertion into the one or more pieces of data comprises: and generating a database operation statement inserted into the one or more pieces of data, and filling a logic deletion field and/or a creation time field of each piece of data in the database operation statement according to the attribute values recorded in the configuration information.
Optionally, before the step of executing the database operation statement, the method further comprises: prompting a user for the database operation statement; and receiving a confirmation instruction input by a user.
According to a second aspect of the embodiments of the present disclosure, there is provided a data importing apparatus, including: the first acquisition module is configured to execute operation responding to a user and acquire a table name of a database table which is input by the user and currently needs to insert data; a searching module configured to perform searching configuration information corresponding to the selected table name of the database table from a preset configuration file, wherein the configuration information includes: database link information and field names that must be filled in the database table; the second acquisition module is configured to prompt the field name to a user and acquire one or more pieces of data which are input by the user and correspond to the field name; and the importing module is configured to import the acquired one or more pieces of data into the database table according to the database link information.
Optionally, the second obtaining module prompts the field name to a user by displaying the field name.
Optionally, the second obtaining module obtains the one or more pieces of data from a data table input by a user, where a header of the data table includes each of the field names.
Optionally, the importing module includes: a generating unit configured to perform generating a database operation statement to insert the one or more pieces of data; and the execution unit is configured to execute the database operation statement according to the database link information and import the one or more pieces of data into the database table.
Optionally, the configuration information further includes: the method comprises the following steps that a field and a corresponding attribute value thereof are logically deleted, and/or a time creation field and a corresponding attribute value thereof are created; the generation unit generates the database operation statement by: and generating a database operation statement inserted into the one or more pieces of data, and filling a logic deletion field and/or a creation time field of each piece of data in the database operation statement according to the attribute values recorded in the configuration information.
Optionally, the apparatus further comprises: a prompting module configured to prompt a user for the database operation statement before executing the database operation statement; and the receiving module is configured to execute a confirmation instruction of receiving user input and configure the execution unit.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement any one of the data import methods described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform any one of the above-described data import methods.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform any one of the above-mentioned data importing methods.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the technical scheme provided by the embodiment of the disclosure, when a user needs to import a database into a certain database table, the user can select a table name of the database table into which data needs to be inserted, after the user selects the table name, a preset configuration file is searched, configuration information corresponding to the table name of the database table selected by the user is found, a field name which is recorded in the searched configuration information and is necessary to be filled in the database table is prompted to the user, the user can construct one or more pieces of data which need to be imported according to the field names, the one or more pieces of data are input, and after the one or more pieces of data input by the user are obtained, the one or more pieces of data are imported into the corresponding database table according to database link information in the searched configuration information. Therefore, in the technical scheme provided by the embodiment of the disclosure, data import does not need participation of developers, and a user can import data into the database table anytime and anywhere, so that convenience of data import is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of data import in accordance with an illustrative embodiment;
FIG. 2 is a flow diagram illustrating a method of data import in accordance with an illustrative embodiment;
FIG. 3 is a diagram illustrating an example of a display screen of the front-end interface in the present embodiment;
FIG. 4 is an exemplary diagram of field names that must be filled in to show a database table in the present embodiment;
FIG. 5 is a block diagram illustrating a data import apparatus in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating a method for an electronic device 600 according to an example embodiment;
fig. 7 is a block diagram illustrating an electronic device 700 in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a data import method, which may be used in an electronic device, according to an exemplary embodiment, and includes the following steps, as shown in fig. 1.
In step S11, in response to the user operation, the table name of the database table currently requiring data insertion, which is input by the user, is acquired.
In this embodiment, the electronic device may provide an input interface for the user, through which the user may input a table name of a database table into which data needs to be inserted. For example, a user may enter input through an input device such as a keyboard of the electronic device.
Alternatively, the electronic device may provide the user with the table names of the database tables in the back-end database, and the user may input the table names of the database tables in which data needs to be inserted by a selection means through a mouse, a touch screen, or the like of the electronic device, for example, the table names of the database tables in which data needs to be inserted are displayed by a pull-down menu, and the user selects the table names of the database tables in which data needs to be inserted from the displayed content.
Optionally, in order to improve readability of the table names of the database table, a table name displayed at the front end may be set for the database table according to the content stored in the database table, and the table name corresponds to the table name at the back end of the database table. For example, the table name of the database table at the back end is "gamepam _ gammamy _ uri _ detail", the table name set for presentation at the front end for the database table may be "GM interface document platform file table", and the user may directly determine the content of the data stored by the database table according to the table name.
In step S12, the configuration information corresponding to the table name of the database table selected by the user is found from the preset configuration file, and the configuration information includes: database link information and field names that the database table must fill in.
In this embodiment, a configuration file may be preset, in which a correspondence between a table name of a database table in the database and the database link information and a field name that the database table must fill up may be recorded, and according to the table name of the database selected by the user, the corresponding database link information and the field name that the database table must fill up may be found.
Optionally, if the table name shown in the front end of the database table is not consistent with the table name in the back end, in the corresponding relationship, the corresponding relationship between the two table names of the database table may also be recorded, so that when importing data in a subsequent back end database table, the database table into which the data is imported may be determined.
In practical applications, the database linking information may include, but is not limited to: database host (host) identification, user name, password, database name, port of database host, and the like. The electronic device can import the data to be imported into a corresponding database table in the database indicated by the database link information through the database link information.
In step S13, the user is prompted with the field name that the database table must fill, and one or more pieces of data corresponding to the field name that the user has input are acquired.
Optionally, in step 13, the user may be prompted by displaying the field names that must be filled in the database table, so that the user may intuitively obtain the field names that must be filled in. Of course, the present invention is not limited to this, and in a specific application, other modes, for example, a mode of voice playing, may also be used, and the present invention is not limited to this embodiment.
In step 13, the user may input one or more pieces of data to be imported in various ways, for example, the user may input a txt file in which field attributes corresponding to field names in the pieces of data are recorded. Optionally, to facilitate user input, the user may enter one or more pieces of data to be imported in the form of a data table. In this alternative embodiment, the step of acquiring one or more pieces of data corresponding to the field name input by the user may include: acquiring a data table input by a user, wherein the header of the data table comprises the names of the fields; one or more pieces of data input by the user are acquired from the data table. In this alternative embodiment, the data to be imported is described in the form of a data table, the names of the fields are recorded in the header, and the cells following the header record the attribute information corresponding to each field in one or more pieces of data. In a specific application, the data table may be in any format, for example, the most common excel table may be used. Through the optional implementation mode, the user can conveniently input the data to be imported.
In step 14, according to the database link information obtained in step 12, the obtained one or more pieces of data are imported into the database table.
In this embodiment, the database where the database table is located can be located through the database link information, so that the data to be imported can be imported into the corresponding database table.
Optionally, in step 14, one or more pieces of data may be imported into the corresponding database table through a database operation statement. In this alternative embodiment, the step of importing the obtained one or more pieces of data into the database table may include: generating a database operation statement inserted into one or more pieces of data; and according to the database link information, executing a database operation statement and importing one or more pieces of data into the database table. In this embodiment, since the data is imported into the database table, in this optional implementation, the generated database operation statement is an operation statement for inserting data, for example, an operation statement for inserting data (INSERT) which may be SQL. In a specific application, a corresponding operation statement for inserting data can be generated according to the type of a database table of the specific application. Through the optional implementation mode, the data is imported into the database table through the database operation statement, so that the import of the data can be conveniently realized, and a user does not need to know the specific operation of the imported data.
In practical applications, some database tables may contain a field (deleteKey, which may be called a logical deletion field) indicating whether the database table is logically deleted and/or a field (createTime, which may be called a creation time field) in the database table marking the creation time, where the two fields are also fields that must be filled, so that if the database table into which data needs to be inserted contains the two fields, the configuration information set for the database table in the configuration file also needs to contain the two fields, but since the two fields are related to the database table, the attributes of the two fields of all data in the database table are the same, and therefore, the attribute values of the two fields can be directly given in the configuration information without being given by a user. Thus, in this alternative embodiment, the configuration information may further include: the method comprises the following steps that a field and a corresponding attribute value thereof are logically deleted, and/or a time field and a corresponding attribute value thereof are created; the step of generating a database manipulation statement that inserts one or more pieces of data may comprise: and generating a database operation statement into which one or more pieces of data are inserted, and filling a logical deletion field and/or a creation time field of each piece of data in the database operation statement according to the attribute values recorded in the configuration information. Through the optional implementation mode, the logic deletion field and/or the creation time field can be automatically filled without manual input of a user, and the difficulty of importing data by the user is reduced.
Through the technical scheme provided by the embodiment, the electronic equipment can provide the table name of the database table in the database for a user, the user can select the table name of the database table in which data needs to be inserted, the selection operation of the user is responded, the electronic equipment searches the preset configuration file, finds the configuration information corresponding to the table name of the database table selected by the user, displays the field names which are necessary to be filled in the found configuration information to the user, the user inputs one or more pieces of data comprising the fields according to the field names, the electronic equipment imports one or more pieces of data input by the user into the corresponding database table according to the database link information in the found configuration information, the whole data import process does not need the participation of developers, and the database host in which the database table is located can be located through the database link information, the problem of data import of crossing computer lab is solved.
Fig. 2 is a flowchart illustrating a data importing method according to an exemplary embodiment, where the data importing method may be used in a data importing platform, and the data importing platform may be disposed in a user device or disposed on a server, and as shown in fig. 2, the data importing method includes the following steps.
In step 21, in response to the operation of the user on the front-end interface of the data import platform, a database table selected by the user and into which data is to be inserted is obtained.
In this embodiment, the table names of the respective database tables of the database may be displayed on the front-end interface. Fig. 3 is an exemplary view of a display screen of the front-end interface in this embodiment, as shown in fig. 3, table names of respective database tables are displayed on the front-end interface in a form of a drop-down menu, which is not limited to this, and in a specific application, the front-end interface may also display the table names of the respective database tables in other manners, for example, buttons labeled with the table names of the respective database tables may be displayed, and this embodiment is not limited in this embodiment.
In step 22, the configuration file is looked up, and the field names that must be filled in by the database table are retrieved and displayed.
In this embodiment, a configuration file may be maintained, and the configuration file may include database link information, each database table of the database, a field name that each database table must fill, a field (deleteKey) indicating whether a flag in the database table is logically deleted, and a field (createTime) indicating a creation time in the database table. For example, the configuration file corresponding to the front-end interface shown in fig. 3 may be configured with necessary fields of three database tables whose front-end displays names "GM interface document platform chapter table", "GM interface document platform navigation table", and "intermodal platform channel package table", a field indicating whether a flag in a database table is logically deleted, a field indicating creation time in a database table, and linked database link information.
In practical applications, since a database may include a plurality of database tables, in order to avoid duplication, in an optional implementation manner of this embodiment, when configuring database link information corresponding to a database table, a port of the database host is recorded, and then link information of the database is separately described for each database.
Fig. 4 is a diagram showing an example of field names that must be filled in a database table in the present embodiment, and as shown in fig. 4, three fields that must be filled in by a user-selected GM interface document platform chapter table are "name", "navId", and "content", respectively.
In step 23, the user uploads an excel file to be imported, as shown in table 1, the first row of the excel is a field name, i.e., a table field to be inserted, the second row is followed by each piece of data, as shown in table 1, the fields to be inserted are name, navId, and content.
Table 1.
name navId content
Article name 1 23 Article content 1
Article name 2 24 Article content 2
Article name 3 43 Article content 3
Article name 4 21 Article content 4
In step 24, the excel file is parsed to generate a database operation statement for importing data, and if the database table has a logical deletion field and a creation time field, the logical deletion field and the creation time field of the table in the configuration file are automatically filled according to the configuration information of the database table in the configuration file. In this embodiment, after receiving an excel file uploaded by a user, the data import platform may parse the file to obtain each piece of data to be imported, and generate a database operation statement for importing each piece of data.
In step 25, the generated sql statement is displayed on a page for confirmation by the user, and after the user clicks the confirmation, an insert database statement is executed.
For example, four insertion statements may be generated for four pieces of data to be imported in table 1, each insertion statement being used to insert one of the pieces of data into a corresponding database table.
According to the technical scheme provided by the embodiment of the disclosure, the mandatory fields and database link information of each database table in one or more databases are configured in the configuration file, and the data import platform can import data into each database table of the database according to the configuration file, so that the import operation of multiple databases and multiple tables can be supported, a new interface does not need to be developed for importing each type of data, developers do not need to care about the data information (database table, data field information and data information) needing to be imported each time, the workload of developers is reduced, the operators can import the data needing to be stored in batches at any time, and the data can be automatically associated into the database table through the data import platform, so that one-time service deployment is realized, and the databases of multiple machine rooms can be used.
Fig. 5 is a block diagram illustrating a data import apparatus according to an example embodiment. Referring to fig. 5, the data importing apparatus 500 includes a first obtaining module 51, a searching module 52, a second obtaining module 53, and an importing module 54.
In this embodiment, the first obtaining module 51 is configured to perform an operation in response to a user, and obtain a table name of a database table, into which data is currently to be inserted, input by the user; a searching module 52 configured to perform searching configuration information corresponding to the table name of the selected database table from a preset configuration file, where the configuration information includes: database link information and field names which must be filled in the database table; a second obtaining module 53 configured to perform presentation of the field name to a user, and obtain one or more pieces of data corresponding to the field name input by the user; an importing module 54 configured to perform importing the obtained one or more pieces of data into the database table according to the database link information.
Optionally, the second obtaining module 53 prompts the field name to the user by displaying the field name.
Optionally, the second obtaining module 53 obtains the one or more pieces of data from a data table input by a user, where a header of the data table includes each of the field names.
Alternatively, as shown in fig. 5, the import module 54 may include: a generating unit 541 configured to perform generating a database operation statement into which the one or more pieces of data are inserted; an executing unit 542 configured to execute the database operation statement according to the database link information, and import the one or more pieces of data into the database table.
Optionally, the configuration information further includes: the method comprises the following steps that a field and a corresponding attribute value thereof are logically deleted, and/or a time creation field and a corresponding attribute value thereof are created; the generation unit 541 generates the database operation statement by: and generating a database operation statement inserted into the one or more pieces of data, and filling a logic deletion field and/or a creation time field of each piece of data in the database operation statement according to the attribute values recorded in the configuration information.
Optionally, as shown in fig. 5, the data importing apparatus may further include: a prompt module 55 configured to prompt a user for the database operation statement before executing the database operation statement; the receiving module 56 is configured to execute a confirmation instruction of receiving the user input, and configure the executing unit 542.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a block diagram illustrating an electronic device 600 according to an example embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an interface to input/output (I/O) 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the electronic device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operation at the device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of electronic device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 600 is in an operational mode, such as a shooting mode or a video mode. Each of the front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects to the electronic device 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the electronic device 600, the sensor component 614 may also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, orientation or acceleration/deceleration of the electronic device 600, and a change in the temperature of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the electronic device 600 to perform the above-described method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which comprises readable program code executable by the processor 620 of the electronic device 600 to perform the data import method of any of the embodiments. Alternatively, the program code may be stored in a storage medium of the electronic device 600, which may be a non-transitory computer-readable storage medium, such as a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 7 is a block diagram illustrating an electronic device 700 in accordance with an example embodiment. For example, the electronic device 700 may be provided as a server. Referring to fig. 7, electronic device 700 includes a processing component 722 that further includes one or more processors, and memory resources, represented by memory 732, for storing instructions, such as applications, that are executable by processing component 722. The application programs stored in memory 732 may include one or more modules that each correspond to a set of instructions. Further, the processing component 722 is configured to execute instructions to perform the method … … described above
The electronic device 700 may also include a power component 726 that is configured to perform power management of the electronic device 700, a wired or wireless network interface 750 that is configured to connect the electronic device 700 to a network, and an input output (I/O) interface 758. The electronic device 700 may operate based on an operating system, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like, stored in memory 732.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. A data import method, comprising:
responding to the operation of a user, and acquiring a table name of a database table which is input by the user and currently needs to insert data;
finding configuration information corresponding to the table name of the selected database table from a preset configuration file, wherein the configuration information comprises: database link information and field names that must be filled in the database table;
prompting the field name to a user, and acquiring one or more pieces of data which are input by the user and correspond to the field name;
and importing the acquired one or more pieces of data into the database table according to the database link information.
2. The data import method according to claim 1, wherein the step of prompting the field name to the user comprises:
and displaying the field name.
3. The data import method according to claim 1, wherein the step of acquiring one or more pieces of data corresponding to the field name input by the user comprises:
acquiring a data table input by a user, wherein the header of the data table comprises the name of each field;
and acquiring the one or more pieces of data from the data table.
4. The data import method according to any one of claims 1 to 3, wherein the step of importing the one or more pieces of data obtained into the database table comprises:
generating a database operation statement inserted into the one or more pieces of data;
and executing the database operation statement according to the database link information, and importing the one or more pieces of data into the database table.
5. The data import method according to claim 4,
the configuration information further includes: the method comprises the following steps that a field and a corresponding attribute value thereof are logically deleted, and/or a time creation field and a corresponding attribute value thereof are created;
the step of generating a database operation statement for insertion into the one or more pieces of data comprises: and generating a database operation statement inserted into the one or more pieces of data, and filling a logic deletion field and/or a creation time field of each piece of data in the database operation statement according to the attribute values recorded in the configuration information.
6. The data import method of claim 4, wherein prior to the step of executing the database operation statement, the method further comprises:
prompting a user for the database operation statement;
and receiving a confirmation instruction input by a user.
7. A data importing apparatus, comprising:
the first acquisition module is configured to execute operation responding to a user and acquire a table name of a database table which is input by the user and currently needs to be inserted with data;
a searching module configured to perform searching configuration information corresponding to the table name of the selected database table from a preset configuration file, wherein the configuration information includes: database link information and field names that must be filled in the database table;
the second acquisition module is configured to prompt the field name to a user and acquire one or more pieces of data corresponding to the field name input by the user;
and the importing module is configured to import the acquired one or more pieces of data into the database table according to the database link information.
8. The data import apparatus according to claim 7, wherein the second obtaining module prompts the field name to a user by displaying the field name.
9. The apparatus according to claim 7, wherein the second obtaining module obtains the one or more pieces of data from a data table input by a user, wherein a header of the data table contains each of the field names.
10. The data import apparatus according to any one of claims 8 to 9, wherein the import module comprises:
a generating unit configured to perform generating a database operation statement to insert the one or more pieces of data;
and the execution unit is configured to execute the database operation statement according to the database link information and import the one or more pieces of data into the database table.
11. The data import apparatus of claim 10,
the configuration information further includes: the method comprises the following steps that a field and a corresponding attribute value thereof are logically deleted, and/or a time creation field and a corresponding attribute value thereof are created;
the generation unit generates the database operation statement by: and generating a database operation statement inserted into the one or more pieces of data, and filling a logic deletion field and/or a creation time field of each piece of data in the database operation statement according to the attribute values recorded in the configuration information.
12. The data import apparatus according to claim 10, wherein the apparatus further comprises:
a prompting module configured to prompt a user for the database operation statement before executing the database operation statement;
and the receiving module is configured to execute a confirmation instruction of receiving user input and configure the execution unit.
13. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data import method of any of claims 1 to 7.
14. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the data import method of any of claims 1 to 7.
15. A computer program product, the instructions in which, when executed by a processor of an electronic device, cause the electronic device to perform the data import method of any of claims 1 to 7.
CN201910990398.0A 2019-10-17 2019-10-17 Data import method and device and electronic equipment Pending CN110928854A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910990398.0A CN110928854A (en) 2019-10-17 2019-10-17 Data import method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910990398.0A CN110928854A (en) 2019-10-17 2019-10-17 Data import method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110928854A true CN110928854A (en) 2020-03-27

Family

ID=69849097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910990398.0A Pending CN110928854A (en) 2019-10-17 2019-10-17 Data import method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110928854A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000661A (en) * 2020-07-19 2020-11-27 浪潮电子信息产业股份有限公司 Rapid generation method and system for table structure context
CN112835901A (en) * 2021-02-01 2021-05-25 长沙市到家悠享家政服务有限公司 File storage method and device, computer equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006268661A (en) * 2005-03-25 2006-10-05 Yamatake Corp Data import method and data import device
CN108345682A (en) * 2018-03-02 2018-07-31 弘成科技发展有限公司 Platform and method are imported and exported based on what multi-tenant can configure
CN108399183A (en) * 2017-11-01 2018-08-14 平安科技(深圳)有限公司 Database interlock method, electronic device and storage medium based on Excel system interfaces

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006268661A (en) * 2005-03-25 2006-10-05 Yamatake Corp Data import method and data import device
CN108399183A (en) * 2017-11-01 2018-08-14 平安科技(深圳)有限公司 Database interlock method, electronic device and storage medium based on Excel system interfaces
CN108345682A (en) * 2018-03-02 2018-07-31 弘成科技发展有限公司 Platform and method are imported and exported based on what multi-tenant can configure

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000661A (en) * 2020-07-19 2020-11-27 浪潮电子信息产业股份有限公司 Rapid generation method and system for table structure context
CN112000661B (en) * 2020-07-19 2022-06-21 浪潮电子信息产业股份有限公司 Rapid generation method and system for table structure context
CN112835901A (en) * 2021-02-01 2021-05-25 长沙市到家悠享家政服务有限公司 File storage method and device, computer equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN113365106B (en) Multimedia resource generation method and device, electronic equipment and storage medium
CN107423106B (en) Method and apparatus for supporting multi-frame syntax
CN105068976B (en) Ticket information display method and device
CN105930536B (en) Index establishing method, page jumping method and device
CN106547547B (en) data acquisition method and device
US20150350120A1 (en) Method and device for managing instant message
CN111666015A (en) Suspension short message display method and device
CN115729534A (en) Method for creating and displaying low-code page, device, equipment and medium
CN110928854A (en) Data import method and device and electronic equipment
CN104951522B (en) Method and device for searching
CN111061452A (en) Voice control method and device of user interface
CN110704030A (en) Interface configuration information generation method and device, electronic equipment and storage medium
CN105468606B (en) Webpage saving method and device
CN112000840B (en) Business object display method and device
CN107402756B (en) Method, device and terminal for drawing page
JP2017520877A5 (en)
CN106506808B (en) Method and device for prompting communication message
CN112416751A (en) Processing method and device for interface automation test and storage medium
CN114239531A (en) Template recommendation method and device, electronic equipment and storage medium
CN114567790A (en) Information display method and device, electronic equipment and storage medium
CN111131000B (en) Information transmission method, device, server and terminal
CN110457084B (en) Loading method and device
CN113792178A (en) Song generation method and device, electronic equipment and storage medium
CN112988822A (en) Data query method, device, equipment, readable storage medium and product
CN111736890A (en) Data updating method and device, electronic equipment and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327