CN111090666A - Data processing method, device and system and computer readable storage medium - Google Patents

Data processing method, device and system and computer readable storage medium Download PDF

Info

Publication number
CN111090666A
CN111090666A CN201911199752.4A CN201911199752A CN111090666A CN 111090666 A CN111090666 A CN 111090666A CN 201911199752 A CN201911199752 A CN 201911199752A CN 111090666 A CN111090666 A CN 111090666A
Authority
CN
China
Prior art keywords
target
sub
database
information
table information
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
CN201911199752.4A
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.)
Jiangsu Suning Logistics Co ltd
Original Assignee
Jiangsu Suning Logistics 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 Jiangsu Suning Logistics Co ltd filed Critical Jiangsu Suning Logistics Co ltd
Priority to CN201911199752.4A priority Critical patent/CN111090666A/en
Publication of CN111090666A publication Critical patent/CN111090666A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

The embodiment of the application discloses a data processing method, a device and a system and a computer readable storage medium, belonging to the technical field of computers, wherein the method comprises the steps of obtaining target parameter information according to a query request sent by a user; acquiring target sub-database sub-table information in a preset mapping relation between parameters and sub-database sub-table information according to the target parameter information; and generating a corresponding link according to the target sub-library and sub-table information and acquiring target data according to the link. The invention pre-associates the parameter information of the target data with the sub-database sub-tables of the target data, thereby acquiring the sub-database sub-table information according to the pre-associated information when the target data is requested, generating the query statement according to the sub-database sub-table information and acquiring all the target data from the database at one time according to the query statement without multiple requests, thereby improving the efficiency and saving the cost.

Description

Data processing method, device and system and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, apparatus, system, and computer-readable storage medium.
Background
At present, in the aspect of function test of an operating system, the complexity of an operation flow leads to more query data, and the operation data of a certain operation flow can be obtained only by carrying out multiple query operations. For example, for a certain e-commerce platform, when querying business data of a certain link of the e-commerce platform, technicians need to install a database connection tool, configure database connection information, and write complex SQL statements, which requires much time and cost.
Disclosure of Invention
In order to solve the problems of the prior art, the invention provides a data processing method, a data processing device, a data processing system and a computer-readable storage medium. The method ensures that technicians can acquire all the service data without compiling complex query sentences, repeatedly configuring the database connection information and inquiring for many times.
The embodiment of the invention provides the following specific technical scheme:
in a first aspect, the present invention provides a data processing method, including:
acquiring target parameter information according to a query request sent by a user;
acquiring target sub-database sub-table information in a preset mapping relation between parameters and sub-database sub-table information according to the target parameter information;
and generating a corresponding link according to the target sub-library and sub-table information and acquiring target data according to the link.
Preferably, the target parameter information includes a target ID, and target key information associated with the target ID.
Preferably, the generating a corresponding request link according to the target sub-library and sub-table information and acquiring target data according to the request link specifically include:
generating a corresponding SQL query statement according to the target sub-library and sub-table information;
sending the SQL query statement to a corresponding target database server;
and receiving target data returned by the target database server after the target database server obtains and processes the target data in the target database.
Preferably, the method further comprises:
acquiring target database connection information in pre-stored configuration information according to the target database sub-table information;
and sending a connection request to a corresponding target database server according to the target database connection information so as to realize connection with the target database.
In a second aspect, the present invention provides a data processing apparatus, the apparatus comprising:
the analysis module is used for acquiring target parameter information according to a query request sent by a user; acquiring target sub-database and sub-table information in a preset mapping relation between parameters and sub-database and sub-table information according to the target parameter information;
and the processing module is used for generating corresponding links according to the target sub-library and sub-table information and acquiring target data according to the links.
Preferably, the target parameter information includes a target ID, and target key information associated with the target ID.
Preferably, the processing module specifically includes:
the generating module is used for generating a corresponding SQL query statement according to the target sub-library and sub-table information;
the sending module is used for sending the SQL query statement to a corresponding target database server;
and the receiving module is used for receiving the target data returned by the target database server after the target data is acquired and processed in the target database.
Preferably, the apparatus further comprises:
the acquisition module is used for acquiring target database connection information in pre-stored configuration information according to the target database sub-table information;
and the sending module is also used for sending a connection request to a corresponding target database server according to the target database connection information so as to realize the connection with the target database.
In a third aspect, the present invention provides a computer system comprising:
one or more processors; and
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the above first aspects.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the first aspects described above.
The embodiment of the invention has the following beneficial effects:
the invention pre-associates the parameter information of the target data with the sub-database sub-tables of the target data, thereby acquiring the sub-database sub-table information according to the pre-associated information when the target data is requested, generating the query statement according to the sub-database sub-table information and acquiring all the target data from the database at one time according to the query statement without multiple requests, thereby improving the efficiency and saving the cost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an application environment diagram of a data processing method provided in an embodiment of the present application;
FIG. 2 is a display diagram of a target page and a target content item provided by an embodiment of the present application;
FIG. 3 is a diagram illustrating target data according to an embodiment of the present application;
fig. 4 is a flowchart of a data processing method according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of a data processing apparatus according to a third embodiment of the present application;
FIG. 6 is a diagram of a computer system architecture according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application provides a data processing method which can be applied to the application environment shown in FIG. 1. The first server 12 is configured to communicate with the second server 13 and the terminal 11 through a network, process a received request sent by the terminal 11 to generate a link and send the link to the second server 13 through an interface, the second server 13 communicates with the database 14 through the network, the second server 13 sends data acquired from the database 14 to the terminal 11 through the first server 12, and the terminal 11 renders and displays the received data. The first server 12 and the second server 13 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the second server 13 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Example one
The application provides a data processing method, which is applied to an e-commerce platform scene and specifically comprises the following steps:
s21, when the fact that the user logs in successfully is monitored, target page data are obtained and sent to the client side, and the client side carries out rendering display;
wherein the target page includes the target content item thereon.
And S22, acquiring the service data inquiry request generated according to the target content item filled by the user.
For example, as shown in fig. 2, after the target content item displayed on the target page is filled in, and the user clicks and submits, a corresponding query request is generated.
And S23, acquiring target parameter information according to the service data query request sent by the user.
The target parameter information is correspondingly associated with a target content item filled by a user, and the target parameter information comprises a target ID and target key information associated with the target ID.
The target ID may be an order number or a package number, and the target key information associated with the target ID includes warehouse information, system test environment, and the like.
And S24, acquiring target sub-database and sub-table information in the preset mapping relation between the parameters and the sub-database and sub-table information according to the target parameter information.
Illustratively, when the system test environment is set, the order number is SAPFM16041294000004, and the warehouse number is 891U, the corresponding target sub-library and sub-table information is 8 library 3 tables.
And S25, generating a corresponding SQL query statement according to the target database sub-table information, and acquiring target data in the target database according to the SQL query statement.
Specifically, the step may include:
s251, acquiring target database connection information in pre-stored configuration information according to the target sub-database sub-table information;
the target database connection information comprises url, user name and password.
S252, according to the connection information of the target database, sending a connection request to a corresponding target database server to realize connection with the target database;
s253, generating a corresponding SQL query statement according to the target sub-library and sub-table information;
illustratively, according to the acquired information of the 8-library 3 table, generating a corresponding SQL query statement; and the number of the generated SQL query sentences corresponds to the number of the sub-libraries.
S254, sending the SQL query statement to a corresponding target database server;
and S255, receiving the target data returned by the target database server after the target database server obtains and processes the target data in the target database.
Fig. 3 shows the configuration of the target data returned to the client page, and for the order with the system test environment of sit, the order number of SAPFM16041294000004 and the warehouse number of 891U, the target data such as the commodity type, the owner information, the quantity, the stock, the status, etc. can be obtained according to the above steps S21 to S25.
Besides the e-commerce platform, in other platforms, such as a social platform, for technicians, there are also problems in testing the system, that is, there are situations in which it takes many inquiry operations to obtain complete personal information, as mentioned above.
Example two
Based on the above, as shown in fig. 4, there is provided a data processing method including:
and S41, acquiring target parameter information according to the query request sent by the user.
Wherein the target parameter information is a target ID, target key information associated with the target ID.
For e.g. e-commerce platforms, the target ID may be an order number or a package number, and the target key information associated with the target ID includes warehouse information, system test environment, etc.
And S42, acquiring target sub-database and sub-table information in the preset mapping relation between the parameters and the sub-database and sub-table information according to the target parameter information.
And S43, generating corresponding links according to the target sub-library and sub-table information and acquiring target data according to the links.
And the number of the generated SQL query sentences corresponds to the number of the sub-libraries.
Specifically, the step may include:
s431, acquiring target database connection information in pre-stored configuration information according to the target database sub-table information;
the target database connection information comprises url, user name and password.
S432, according to the target database connection information, sending a connection request to a corresponding target database server to realize connection with a target database;
s433, generating a corresponding SQL query statement according to the target sub-library and sub-table information;
s434, sending the SQL query statement to a corresponding target database server;
and S435, receiving the target data returned by the target database server after the target data is acquired and processed in the target database.
The target database may be a local database or an external system database. As long as the target database connection information is pre-stored to the configuration information, the target database connection and target data acquisition can be realized regardless of the local database or the external system database.
According to the scheme, the parameter information of the target data and the sub-database sub-tables of the target data are pre-associated, so that when the target data is requested, the sub-database sub-table information can be obtained according to the pre-associated information, the query statement is generated according to the sub-database sub-table information, and all the target data can be obtained from the database at one time according to the query statement without multiple requests, so that the efficiency is improved, and the cost is saved.
EXAMPLE III
As shown in fig. 5, a data processing apparatus includes:
the analysis module 51 is configured to obtain target parameter information according to a query request sent by a user; acquiring target sub-database sub-table information in a preset mapping relation between parameters and sub-database sub-table information according to the target parameter information;
and the processing module 52 is configured to generate a corresponding link according to the target sub-library and sub-table information and acquire target data according to the link.
Preferably, the target parameter information includes a target ID, and target key information associated with the target ID.
Preferably, the processing module 52 specifically includes:
the generating module 521 is configured to generate a corresponding SQL query statement according to the target sub-library and sub-table information;
a sending module 522, configured to send the SQL query statement to a corresponding target database server;
the receiving module 523 is configured to receive the target data returned by the target database server after the target data is obtained and processed in the target database.
Preferably, the apparatus further comprises:
an obtaining module 53, configured to obtain target database connection information in pre-stored configuration information according to the target sub-database sub-table information;
the sending module 522 is further configured to send a connection request to a corresponding target database server according to the target database connection information, so as to implement connection with the target database.
Example four
As shown in fig. 6, a computer system includes:
one or more processors; and
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method as in embodiment two above.
FIG. 6 illustrates an architecture of a computer system that may include, in particular, a processor 62, a video display adapter 64, a disk drive 66, an input/output interface 68, a network interface 610, and a memory 612. The processor 62, video display adapter 64, disk drive 66, input/output interface 68, network interface 610, and memory 612 may be communicatively coupled via a communication bus 614.
The processor 62 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solution provided in the present Application.
The Memory 612 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 612 may store an operating system 616 for controlling the operation of the computer system 60, a Basic Input Output System (BIOS)618 for controlling low-level operations of the computer system. In addition, a web browser 620, a data storage management system 622, and the like may also be stored. In summary, when the technical solution provided by the present application is implemented by software or firmware, the relevant program codes are stored in the memory 612 and called for execution by the processor 62.
The input/output interface 68 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The network interface 610 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
The communication bus 614 includes a path that transfers information between the various components of the device, such as the processor 62, the video display adapter 64, the disk drive 66, the input/output interface 68, the network interface 610, and the memory 612.
In addition, the computer system can also obtain the information of specific receiving conditions from the virtual resource object receiving condition information database for condition judgment and the like.
It should be noted that although the above-described device only shows the processor 62, the video display adapter 64, the disk drive 66, the input/output interface 68, the network interface 610, the memory 612, the communication bus 614, etc., in a specific implementation, the device may also include other components necessary for proper operation.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to the second embodiment.
As will be appreciated by one of skill in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention. In addition, the computer-readable storage medium, the computer system, the data processing apparatus and the data processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method of data processing, the method comprising:
acquiring target parameter information according to a query request sent by a user;
acquiring target sub-database sub-table information in a preset mapping relation between parameters and sub-database sub-table information according to the target parameter information;
and generating a corresponding link according to the target sub-library and sub-table information and acquiring target data according to the link.
2. The method of claim 1, wherein the target parameter information comprises a target ID, and target key information associated with the target ID.
3. The method according to claim 1 or 2, wherein generating a corresponding request link according to the target sub-library and sub-table information and acquiring target data according to the request link specifically comprises:
generating a corresponding SQL query statement according to the target sub-library and sub-table information;
sending the SQL query statement to a corresponding target database server;
and receiving target data returned by the target database server after the target database server obtains and processes the target data in the target database.
4. The method of claim 3, further comprising:
acquiring target database connection information in pre-stored configuration information according to the target database sub-table information;
and sending a connection request to a corresponding target database server according to the target database connection information so as to realize connection with the target database.
5. A data processing apparatus, characterized in that the apparatus comprises:
the analysis module is used for acquiring target parameter information according to a query request sent by a user; acquiring target sub-database and sub-table information in a preset mapping relation between parameters and sub-database and sub-table information according to the target parameter information;
and the processing module is used for generating corresponding links according to the target sub-library and sub-table information and acquiring target data according to the links.
6. The apparatus of claim 5, wherein the target parameter information comprises a target ID, and target key information associated with the target ID.
7. The apparatus according to claim 5 or 6, wherein the processing module specifically comprises:
the generating module is used for generating a corresponding SQL query statement according to the target sub-library and sub-table information;
the sending module is used for sending the SQL query statement to a corresponding target database server;
and the receiving module is used for receiving the target data returned by the target database server after the target data is acquired and processed in the target database.
8. The apparatus of claim 7, further comprising:
the acquisition module is used for acquiring target database connection information in pre-stored configuration information according to the target database sub-table information;
and the sending module is also used for sending a connection request to a corresponding target database server according to the target database connection information so as to realize the connection with the target database.
9. A computer system, comprising:
one or more processors; and
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method as claimed in any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN201911199752.4A 2019-11-29 2019-11-29 Data processing method, device and system and computer readable storage medium Pending CN111090666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911199752.4A CN111090666A (en) 2019-11-29 2019-11-29 Data processing method, device and system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911199752.4A CN111090666A (en) 2019-11-29 2019-11-29 Data processing method, device and system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111090666A true CN111090666A (en) 2020-05-01

Family

ID=70393327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911199752.4A Pending CN111090666A (en) 2019-11-29 2019-11-29 Data processing method, device and system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111090666A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111047A (en) * 2021-03-18 2021-07-13 上海宜员网络技术有限公司 Data processing method and device and electronic equipment
CN113448980A (en) * 2021-06-18 2021-09-28 青岛海尔科技有限公司 Method and device for generating SQL (structured query language) statement and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368493A (en) * 2016-05-12 2017-11-21 百度在线网络技术(北京)有限公司 Data base query method and device
CN108628986A (en) * 2018-04-27 2018-10-09 深圳市牛鼎丰科技有限公司 Data query method, apparatus, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368493A (en) * 2016-05-12 2017-11-21 百度在线网络技术(北京)有限公司 Data base query method and device
CN108628986A (en) * 2018-04-27 2018-10-09 深圳市牛鼎丰科技有限公司 Data query method, apparatus, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111047A (en) * 2021-03-18 2021-07-13 上海宜员网络技术有限公司 Data processing method and device and electronic equipment
CN113448980A (en) * 2021-06-18 2021-09-28 青岛海尔科技有限公司 Method and device for generating SQL (structured query language) statement and electronic equipment

Similar Documents

Publication Publication Date Title
CN106874174B (en) Method and device for realizing interface test and function test
CN111090666A (en) Data processing method, device and system and computer readable storage medium
CN109145238B (en) Card display method and device and mobile device
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN110874365A (en) Information query method and related equipment thereof
US11244153B2 (en) Method and apparatus for processing information
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN110928594A (en) Service development method and platform
CN112214497A (en) Label processing method and device and computer system
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN112732499A (en) Test method and device based on micro-service architecture and computer system
CN111324310A (en) Data reading method and device and computer system
CN111339560A (en) Data isolation method, device and system
CN108733720B (en) On-line checking method and checking system for SQL (structured query language) query of multiple database types
CN112947919A (en) Method and device for constructing service model and processing service request
CN109561146A (en) Document down loading method, device, terminal device
CN110941614A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN113535721A (en) Data writing method and device
CN111078539B (en) Test method, device, system and computer readable storage medium
CN108089899B (en) Method and device for realizing query report
CN113111047A (en) Data processing method and device and electronic equipment
CN114840276A (en) Object calling method, device, equipment, storage medium and program product
CN114490308A (en) Interface test method, device and computer storage medium
CN111125057A (en) Service request processing method and device and computer system
CN114741285A (en) Method, device, electronic equipment and computer program product for processing data

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