Movatterモバイル変換


[0]ホーム

URL:


CN116450723A - Data extraction method, device, computer equipment and storage medium - Google Patents

Data extraction method, device, computer equipment and storage medium
Download PDF

Info

Publication number
CN116450723A
CN116450723ACN202310410282.1ACN202310410282ACN116450723ACN 116450723 ACN116450723 ACN 116450723ACN 202310410282 ACN202310410282 ACN 202310410282ACN 116450723 ACN116450723 ACN 116450723A
Authority
CN
China
Prior art keywords
target
access
data
interface
sql statement
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
CN202310410282.1A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China LtdfiledCriticalPing An Property and Casualty Insurance Company of China Ltd
Priority to CN202310410282.1ApriorityCriticalpatent/CN116450723A/en
Publication of CN116450723ApublicationCriticalpatent/CN116450723A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The embodiment of the application belongs to the field of big data, and relates to a data extraction method, which comprises the following steps: judging whether a data extraction request input by a user through a client is received or not; the data extraction request carries target space coding and access parameters; if yes, analyzing target space coding and fetching parameters from the data extraction request; acquiring a target interface corresponding to the target space code, and acquiring an access SQL statement corresponding to the target interface; recombining the access SQL sentences based on the access parameters to obtain corresponding target access SQL sentences; operating a target fetch SQL sentence to obtain corresponding target data; and returning the target data to the client through the target interface. The application also provides a data extraction device, computer equipment and a storage medium. In addition, the present application relates to blockchain technology in which target data may be stored. According to the method and the device, the development cost of data extraction based on the interface can be reduced, and the efficiency of data extraction is improved.

Description

Data extraction method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of big data technologies, and in particular, to a data extraction method, a device, a computer device, and a storage medium.
Background
The data service interface is increasingly widely applied in the field of big data, and various data such as basic data, marketing data, user portrait data and the like are processed and deposited by the data platform, so that data extraction services of various data are required to be provided for an external system through the interface.
With the advent of the big data age, financial technology has gradually achieved informationized business. Each entity often needs its own business development, and typically has business requirements for interface-based data extraction. However, in the data extraction business flow based on the interface, the interface created by the developer can only realize one access logic, if different personnel have different access requirements, a new access logic needs to be written to create a new interface to meet the access requirements, such a processing manner easily causes higher development cost of data extraction, and the repeated writing of the access logic needs consume a great deal of manpower time resources, so that the efficiency of data extraction is low.
Disclosure of Invention
An objective of the embodiments of the present application is to provide a data extraction method, apparatus, computer device, and storage medium, so as to solve the technical problems that in the existing interface-based data extraction business process, if different personnel have different access requirements, a new access logic needs to be written to create a new interface to meet the access requirements, such a processing manner easily causes higher development cost of data extraction, and the repeated writing of the access logic needs consume a large amount of manpower time resources, thereby resulting in low efficiency of data extraction.
In order to solve the above technical problems, the embodiments of the present application provide a data extraction method, which adopts the following technical schemes:
judging whether a data extraction request input by a user through a client is received or not; wherein, the data extraction request carries a target space coding and a fetch parameter;
if yes, analyzing the target space code and the fetch parameter from the data extraction request;
acquiring a target interface corresponding to the target space code, and acquiring an access SQL statement corresponding to the target interface;
carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement;
operating the target fetch SQL sentence to obtain corresponding target data;
and returning the target data to the client through the target interface.
Further, the step of recombining the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement specifically includes:
analyzing the access SQL statement to obtain all first access conditions contained in the access SQL statement; wherein the number of first fetch conditions includes a plurality;
Screening second access conditions matched with the access parameters from all the first access conditions, and marking the access conditions except the second access conditions in all the first access conditions as third access conditions;
performing condition elimination processing on the first access condition in the first access SQL statement based on the third access condition to obtain a processed first access SQL statement;
performing condition assignment processing on the second access condition in the first access SQL statement based on the access parameter to obtain a processed second access SQL statement;
and taking the second access SQL statement as the target access SQL statement.
Further, the step of running the target fetch SQL statement to obtain corresponding target data specifically includes:
operating the target access SQL statement, and analyzing a fourth access condition and an access data source contained in the target access SQL;
inquiring the access data source based on the fourth access condition, and inquiring the inquiry data corresponding to the fourth access condition from the access data source;
and taking the query data as the target data.
Further, before the step of obtaining the target interface corresponding to the target space code and obtaining the fetch SQL statement corresponding to the target interface, the method further includes:
receiving an interface construction request corresponding to the target interface, which is input by a target user;
displaying a preset interface configuration page;
receiving interface parameters input by the target user on the interface configuration page, the target space code and an access logic rule corresponding to the access SQL statement;
and constructing the target interface based on the interface parameters, the target space coding and the fetch logic rule.
Further, after the step of executing the target fetch SQL statement to obtain the corresponding target data, the method further includes:
judging whether a data query request corresponding to the target data is received by the user input;
if yes, acquiring index identifiers of all index data contained in the target data, and displaying a check page containing the index identifiers;
receiving a designated hooking identifier selected by the user in the hooking page;
screening specified data corresponding to the check mark from the target data;
The specified data is shown.
Further, after the step of returning the target data to the client through the target interface, the method further includes:
acquiring a preset interface class table;
acquiring a target grade corresponding to the target interface from the interface grade table based on the target space number;
determining a target storage mode corresponding to the target grade;
and storing the target data based on the target storage mode.
Further, the data extraction method further includes:
judging whether a data adjustment request for the target interface triggered by the user is received or not;
if yes, displaying a preset adjustment page;
receiving adjustment information input by the user on the adjustment page;
and carrying out corresponding adjustment processing on the target interface based on the adjustment information.
In order to solve the above technical problems, the embodiments of the present application further provide a data extraction device, which adopts the following technical scheme:
the first judging module is used for judging whether a data extraction request input by a user through a client is received or not; wherein, the data extraction request carries a target space coding and a fetch parameter;
The analysis module is used for analyzing the target space code and the access parameter from the data extraction request if yes;
the first acquisition module is used for acquiring a target interface corresponding to the target space code and acquiring an access SQL statement corresponding to the target interface;
the first processing module is used for carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement;
the operation module is used for operating the target number SQL statement to obtain corresponding target data;
and the second processing module is used for returning the target data to the client through the target interface.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
judging whether a data extraction request input by a user through a client is received or not; wherein, the data extraction request carries a target space coding and a fetch parameter;
if yes, analyzing the target space code and the fetch parameter from the data extraction request;
acquiring a target interface corresponding to the target space code, and acquiring an access SQL statement corresponding to the target interface;
Carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement;
operating the target fetch SQL sentence to obtain corresponding target data;
and returning the target data to the client through the target interface.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
judging whether a data extraction request input by a user through a client is received or not; wherein, the data extraction request carries a target space coding and a fetch parameter;
if yes, analyzing the target space code and the fetch parameter from the data extraction request;
acquiring a target interface corresponding to the target space code, and acquiring an access SQL statement corresponding to the target interface;
carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement;
operating the target fetch SQL sentence to obtain corresponding target data;
and returning the target data to the client through the target interface.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
Firstly, judging whether a data extraction request input by a user through a client is received or not; if yes, analyzing the target space code and the fetch parameter from the data extraction request; then, a target interface corresponding to the target space code is obtained, and an access SQL statement corresponding to the target interface is obtained; then, carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement; subsequently, the target number SQL statement is operated to obtain corresponding target data; and finally, returning the target data to the client through the target interface. According to the method and the device for processing the target access SQL statement, the corresponding target interface can be determined according to the target space code input by the user, the access SQL statement of the target interface can be intelligently recombined according to the access parameter input by the user, so that the target access SQL statement corresponding to the personal requirement of the user can be rapidly and accurately obtained, and multiple access logics can be realized in the same interface. Only the dynamic access parameters are input by the user, the access SQL sentences of the target interface can be intelligently reassembled according to the access parameters, and then target data required to be extracted by the user can be obtained by operating the reassembled access SQL sentences, so that the user does not need to write a corresponding interface for each set of access conditions, the repeated workload of the user is greatly reduced, the development cost of data extraction based on the interfaces is reduced, the efficiency of data extraction is improved, and the use experience of the user is improved.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a data extraction method according to the present application;
FIG. 3 is a schematic diagram of the structure of one embodiment of a data extraction device according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the data extraction method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the data extraction device is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of a data extraction method according to the present application is shown. The data extraction method comprises the following steps:
Step S201, judging whether a data extraction request input by a user through a client is received or not; the data extraction request carries target space coding and fetching parameters.
In this embodiment, the electronic device (for example, the server/terminal device shown in fig. 1) on which the data extraction method operates may acquire the image to be checked through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connection, wiFi connection, bluetooth connection, wiMAX connection, zigbee connection, UWB (ultra wideband) connection, and other now known or later developed wireless connection. The data extraction request is a data extraction request which is triggered by a user and corresponds to the target interface. Wherein the target space is encoded as unique identification information of the target interface. All interfaces belong to each space, the generated interfaces are required to be provided with space codes when in request, the space codes mainly have the functions of isolating service resources according to the space, if the request of a certain space is blocked, the request of other spaces is not influenced, the concurrency number of the request according to space limitation can be supported, and the request concurrency of the space can be dynamically regulated in the background according to the call quantity of each space. The access parameter may include at least access condition data, and may include a parameter corresponding to the access condition data.
Step S202, if yes, analyzing the target space code and the access parameter from the data extraction request.
In this embodiment, the target spatial code and the access parameter may be parsed from the data extraction request by parsing the data extraction request.
Step S203, obtaining a target interface corresponding to the target space code, and obtaining an access SQL statement corresponding to the target interface.
In this embodiment, a correspondence between the target interface and the target space code and the number-taking SQL statement is created in advance, and relevant information of the target interface is stored correspondingly based on the correspondence.
And step S204, carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement.
In this embodiment, the above-mentioned method performs the reorganization processing on the access SQL statement based on the access parameter to obtain a specific implementation process of the corresponding target access SQL statement, which will be described in further detail in the following specific embodiments, which will not be described herein. After the interface is created, SQL corresponding to the access logic of the interface needs to be written, the interface supports custom parameters, the main function is to be used for dynamic condition screening data, for example, a plurality of access conditions are written in the interface, certain fields are equal to certain values, a developer can define the screening values into parameters at the moment, the parameters are transmitted through the interface, the parameters are not transmitted, background services can analyze the SQL, extract parameters defined by users in the SQL, and automatically adapt according to the interface transmission parameters to assign values to the conditions. Of course, the user can configure a plurality of parameters, when the user does not transmit parameters, the background can adapt to SQL, and according to the parameters configured by the user, the corresponding SQL conditions are removed, so that dynamic combination of condition screening is achieved, and therefore an interface is not required to be written for a group of conditions, and the workload is caused to be repeated.
Step S205, the target fetch SQL statement is operated to obtain corresponding target data.
In this embodiment, the above-mentioned specific implementation process of executing the target access SQL statement to obtain the corresponding target data will be described in further detail in the following specific embodiments, which are not described herein.
And step S206, returning the target data to the client through the target interface.
In this embodiment, the target data is returned to the client through the target interface, so that the user can process subsequent services based on the extracted target data.
Firstly, judging whether a data extraction request input by a user through a client is received or not; if yes, analyzing the target space code and the fetch parameter from the data extraction request; then, a target interface corresponding to the target space code is obtained, and an access SQL statement corresponding to the target interface is obtained; then, carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement; subsequently, the target number SQL statement is operated to obtain corresponding target data; and finally, returning the target data to the client through the target interface. According to the method and the device, the corresponding target interface can be determined according to the target space code input by the user, and the access SQL statement of the target interface can be intelligently recombined according to the access parameter input by the user, so that the target access SQL statement corresponding to the personal requirement of the user can be rapidly and accurately obtained, and multiple access logics can be realized in the same interface. Only the dynamic access parameters are input by the user, the access SQL sentences of the target interface can be intelligently reassembled according to the access parameters, and then target data required to be extracted by the user can be obtained by operating the reassembled access SQL sentences, so that the user does not need to write a corresponding interface for each set of access conditions, the repeated workload of the user is greatly reduced, the development cost of data extraction based on the interfaces is reduced, the efficiency of data extraction is improved, and the use experience of the user is improved.
In some alternative implementations, step S204 includes the steps of:
and analyzing the access SQL statement to acquire all first access conditions contained in the access SQL statement. Wherein the number of first fetch conditions includes a plurality.
In this embodiment, the fetch SQL statement includes at least a first fetch condition and a fetch data source. Wherein the fetch SQL statement may further include a return result field, and if no return result field, all fields corresponding to the first fetch condition are returned by default.
And screening second access conditions matched with the access parameters from all the first access conditions, and marking the access conditions except the second access conditions in all the first access conditions as third access conditions.
In this embodiment, the access parameter at least includes access condition data, and may further include a parameter corresponding to the access condition data. For example, the above fetch SQL statement may be:
SELECT
FROM emp f
WHERE sal>8800
AND deptno=30
AND job=‘MANAGER’;
wherein emp f is the fetch data source in the fetch SQL statement, sal >8800, deptno=30, and job= 'MANAGER' is the first fetch condition in the fetch SQL statement. For example, if the access parameters include sal >8000 and deptno=60, the access parameters include access condition data 1: sal >8000, and the access condition data 1 corresponds to 8000 parameters, and the access parameters further include access condition data 2: deptno=60, and the parameter corresponding to the fetch condition data 2 is 60. Thus, the second access condition for screening out the matches with the access parameters in the first access condition includes sal >8800 and deptno=30.
And carrying out condition elimination processing on the first access condition in the first access SQL statement based on the third access condition to obtain a processed first access SQL statement.
In this embodiment, all the third fetch conditions may be extracted from the first fetch conditions in the first fetch SQL statement to obtain the first fetch SQL statement.
And carrying out condition assignment processing on the second access condition in the first access SQL statement based on the access parameter to obtain a processed second access SQL statement.
In this embodiment, the parameters corresponding to the access condition data included in the access parameters may be used to perform a condition assignment process on the second access condition in the first access SQL statement, that is, a condition parameter replacement process, so as to obtain the second access SQL statement. Referring to the above example, the second processed fetch SQL statement is:
SELECT
FROM emp f
WHERE sal>8800
AND deptno=60;
and taking the second access SQL statement as the target access SQL statement.
The method comprises the steps of analyzing the access SQL statement to obtain all first access conditions contained in the access SQL statement; then screening out second access conditions matched with the access parameters from all the first access conditions, and marking the access conditions except the second access conditions in all the first access conditions as third access conditions; then, based on the third fetch condition, performing condition elimination processing on the first fetch condition in the first fetch SQL sentence to obtain a processed first fetch SQL sentence; and carrying out condition assignment processing on the second access condition in the first access SQL statement based on the access parameter to obtain a processed second access SQL statement, and taking the second access SQL statement as the target access SQL statement. The method can intelligently reorganize the access SQL statement according to the access parameters input by the user, the target access SQL statement corresponding to the personal requirement of the user can be obtained rapidly and accurately, so that multiple access logics can be realized in the same interface. Only the dynamic access parameters are input by the user, the access SQL sentences of the interface can be intelligently reassembled according to the access parameters, and then the data required to be extracted by the user can be obtained by operating the reassembled access SQL sentences, so that the user does not need to write a corresponding interface for each set of access conditions, the repeated workload of the user is greatly reduced, the development cost of data extraction based on the interfaces is reduced, the efficiency of data extraction is improved, and the use experience of the user is improved.
In some alternative implementations of the present embodiment, step S205 includes the steps of:
and operating the target access SQL statement, and analyzing a fourth access condition and an access data source contained in the target access SQL.
In this embodiment, the target fetch SQL statement includes at least a fourth fetch condition and a fetch data source, and may further include a return result field, and if no return result field is returned, all fields corresponding to the fourth fetch condition are returned by default. For example, the target fetch SQL language
Wherein f.name, f.sal and f.deptno are returned result fields, f.name represents the name of the employee extracted from employee table f, f.sal represents the wage of the employee extracted from employee table f, f.deptno extracts the department number of the employee from employee table f; emp f is a data source of the fetch number, and emp f is an employee table f; sal >8000 is a fourth fetch condition representing employees whose query wages are greater than 8000.
And carrying out query processing on the access data source based on the fourth access condition, and querying query data corresponding to the fourth access condition from the access data source.
And taking the query data as the target data.
According to the method, the fourth access condition and the access data source contained in the target access SQL are analyzed by running the target access SQL statement; and then, query processing is carried out on the access data source based on the fourth access condition, query data corresponding to the fourth access condition is queried from the access data source, and the query data is used as the target data. According to the method and the device for obtaining the target data, the target data corresponding to the fourth access condition can be automatically and rapidly queried from the access data source by performing the target access SQL statement, and the obtaining efficiency and the obtaining intelligence of the target data are improved.
In some alternative implementations, before step S203, the electronic device may further perform the following steps:
and receiving an interface construction request corresponding to the target interface, which is input by a target user.
In this embodiment, the above-described interface construction request is a request for constructing the above-described target interface.
And displaying a preset interface configuration page.
In this embodiment, the interface configuration page is an editable visual page.
And receiving interface parameters input by the target user on the interface configuration page, the target space code and an access logic rule corresponding to the access SQL statement.
In this embodiment, the interface parameters may include at least a timeout (how many seconds the request is disconnected to ensure that the cluster is not congested), the number of data pieces, a request path (the generated API has a fixed path before and a space code after+user defined), and a buffer time (the buffer time of the data). The target space codes have a one-to-one correspondence with the target interfaces, and the target space codes can be regarded as unique identification information of the target interfaces. The above-mentioned fetch logic rule can be a program code customized by user according to actual service requirement, and the program code can be in the form of SQL sentence, i.e. the SQL sentence inputted by user can be used as required fetch logic rule.
And constructing the target interface based on the interface parameters, the target space coding and the fetch logic rule.
In this embodiment, the interface parameters, the target space code, and the fetch logic rule are issued to a preset API gateway, so as to register the target interface in the API gateway, thereby generating a target interface for external calling.
When receiving an interface construction request corresponding to a target interface, which is input by a target user, displaying a preset interface configuration page; then receiving interface parameters, the target space codes and the fetch logic rules corresponding to the fetch SQL sentences which are input by the target user on the interface configuration page; and further constructing the target interface based on the interface parameters, the target space encoding, and the fetch logic rules. According to the method and the device for generating the target interface, the target interface which meets the use requirement of the user can be automatically and rapidly generated according to the interface configuration information input by the user, flexible and intelligent generation of the target interface is achieved, and the use experience of the user is improved.
In another embodiment, the created interface also supports dynamic aggregation, and is realized according to custom parameters, when the user needs to implement aggregation groupBY in SQL, the user can fixedly perform aggregation extraction according to certain fields, and can also implement dynamic dimension aggregation by defining parameters and transmitting parameters through the interface, and the background service can perform reassembly of the access number SQL according to aggregation field transmission parameters. In addition, the created interface also supports various custom function algorithm accumulation, the same-ratio, the ring-ratio, the duty ratio, the grouping duty ratio and the like, functions similar to an SQL engine are realized, a developer needs to realize accumulation of a certain column, only an accumulation function is needed, a background service post-analysis function is needed to automatically accumulate the column, the developer does not need to write complex SQL to realize the accumulation, the same-ratio function is also needed to be used in the SQL, the background can split the SQL if the same-ratio function is used in the SQL, the SQL is split into a plurality of SQL according to the offset of a date field, and after the result is obtained by execution, the data same ratio under the same dimension is calculated. Thus, personnel developing interfaces do not need to worry about grammar differences of the database engine. In addition, the created interface also supports caching data, a background service can monitor the data update condition of the table, if the table data is updated, the background can automatically clear the cache of the API, and the data is always up to date.
In some alternative implementations, after step S205, the electronic device may further perform the following steps:
and judging whether a data query request corresponding to the target data is received by the user input.
In this embodiment, when a plurality of, for example, hundreds of index data are calculated in one interface, if a user only needs to extract some index data, if all index data are queried at this time, performance and memory are wasted, and a large amount of human resources are consumed because a data acquirer needs to manually extract the required index data from the plurality of index data.
If yes, acquiring index identifiers of all index data contained in the target data, and displaying a check page containing the index identifiers.
In this embodiment, the index identifier may refer to an index name of the index data.
And receiving a designated hooking identifier selected by the user in the hooking page.
In this embodiment, the user may perform corresponding checking processing on all the checking marks in the checking interface according to the actual requirement of the user.
And screening the specified data corresponding to the check mark from the target data.
The specified data is shown.
In this embodiment, the display manner of the specified data is not particularly limited, and for example, a manner of displaying the specified data on the current interface of the client may be adopted.
When receiving a data query request corresponding to the target data input by the user, acquiring index identifiers of all index data contained in the target data, and displaying a check page containing the index identifiers; then receiving a designated checking mark selected by the user in the checking page; then, the appointed data corresponding to the choosing mark is screened out from the target data; the specified data is subsequently presented. According to the method and the device for displaying the appointed data, the appointed data corresponding to the appointed identification can be intelligently screened out from the target data and displayed according to the appointed identification selected by the user, the acquisition efficiency and the acquisition intelligence of the appointed data are effectively improved, and the use experience of the user is improved.
In some optional implementations of this embodiment, after step S206, the electronic device may further perform the following steps:
and acquiring a preset interface class table.
In this embodiment, the interface class table may be a space number that is pre-configured according to an actual service requirement and stores a plurality of interfaces, and stores an interface class corresponding to the space number of each interface. The interface level includes an importance level, a middle level and a common level.
And acquiring a target grade corresponding to the target interface from the interface grade table based on the target space number.
In this embodiment, the interface class table is queried by using the target space number to query the target class corresponding to the target interface from the interface class table.
And determining a target storage mode corresponding to the target grade.
In this embodiment, for different interface levels, data storage modes corresponding to the interface levels may be preset according to actual service requirements. For example, if the interface level is a normal level, the corresponding data storage mode adopts a local storage mode; if the interface level is a middle level, the corresponding data storage mode adopts a cloud storage mode; if the interface level is an important level, the corresponding data storage mode adopts a block chain storage mode.
And storing the target data based on the target storage mode.
The method comprises the steps of obtaining a preset interface class table; then, based on the target space number, acquiring a target grade corresponding to the target interface from the interface grade table; then determining a target storage mode corresponding to the target grade; and storing the target data based on the target storage mode. According to the method and the device, the target grade corresponding to the target interface is obtained through the use of the interface grade table, and then the target data is stored in the target storage mode corresponding to the target grade, so that the storage intelligence and the storage standardization of the target data are effectively improved. In addition, by storing the target data, when the subsequent related user has the extraction requirement on the target data, the related data storage and calculation operation can be not required to be rerun, and the pre-stored target data can be directly obtained, so that the running speed of the system is improved.
In some optional implementations of this embodiment, the electronic device may further perform the following steps:
and judging whether a data adjustment request for the target interface triggered by the user is received or not.
If yes, displaying a preset adjustment page.
In this embodiment, the adjustment page is an editable page including information such as an interface parameter corresponding to the target interface, a target space code, and an access SQL statement.
And receiving the adjustment information input by the user on the adjustment page.
In this embodiment, the adjustment information may include processing information such as addition, deletion, and substitution of information such as interface parameters corresponding to the target interface, target space encoding, and the number of SQL statements input by the user.
And carrying out corresponding adjustment processing on the target interface based on the adjustment information.
When receiving a data adjustment request for the target interface triggered by the user, the method and the device display a preset adjustment page; then receiving adjustment information input by the user on the adjustment page; and then carrying out corresponding adjustment processing on the target interface based on the adjustment information. According to the method and the device for online modification of the target interface, online modification of the target interface can be provided, so that a user can perform corresponding expansion processing on the target interface according to personal requirements of the user, and the use experience of the user is improved. In addition, the adjustment information input by the user can immediately take effect, so that the logic of the target interface is changed without being solved by publishing, and the processing timeliness of interface adjustment is improved.
It is emphasized that the target data may also be stored in a blockchain node in order to further ensure the privacy and security of the target data.
The blockchain referred to in the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a data extraction apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the data extraction device 300 according to the present embodiment includes: the device comprises a first judging module 301, a resolving module 302, a first obtaining module 303, a first processing module 304, a running module 305 and a second processing module 306. Wherein:
a first determining module 301, configured to determine whether a data extraction request input by a user through a client is received; wherein, the data extraction request carries a target space coding and a fetch parameter;
the parsing module 302 is configured to parse the target spatial code and the access parameter from the data extraction request if yes;
a first obtaining module 303, configured to obtain a target interface corresponding to the target space code, and obtain an access SQL statement corresponding to the target interface;
the first processing module 304 is configured to perform a reorganization process on the access SQL statement based on the access parameter, so as to obtain a corresponding target access SQL statement;
The operation module 305 is configured to operate the target fetch SQL statement to obtain corresponding target data;
and the second processing module 306 is configured to return the target data to the client through the target interface.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In some alternative implementations of the present embodiment, the first processing module 304 includes:
the first analysis submodule is used for analyzing the access SQL statement and acquiring all first access conditions contained in the access SQL statement; wherein the number of first fetch conditions includes a plurality;
the screening sub-module is used for screening second access conditions matched with the access parameters from all the first access conditions, and marking the access conditions except the second access conditions in all the first access conditions as third access conditions;
the first processing sub-module is used for carrying out condition elimination processing on the first access condition in the first access SQL sentence based on the third access condition to obtain a processed first access SQL sentence;
The second processing sub-module is used for carrying out condition assignment processing on the second access condition in the first access SQL statement based on the access parameter to obtain a processed second access SQL statement;
and the first determination submodule is used for taking the second access SQL statement as the target access SQL statement.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In some alternative implementations of the present embodiment, the run module 305 includes:
the second analysis submodule is used for operating the target access SQL statement and analyzing a fourth access condition and an access data source contained in the target access SQL;
the query sub-module is used for carrying out query processing on the access data source based on the fourth access condition, and querying query data corresponding to the fourth access condition from the access data source;
and the second determining submodule is used for taking the query data as the target data.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the data extraction device further includes:
the first receiving module is used for receiving an interface construction request corresponding to the target interface, which is input by a target user;
the first display module is used for displaying a preset interface configuration page;
the second receiving module is used for receiving interface parameters, the target space codes and the fetch logic rules corresponding to the fetch SQL sentences which are input by the target user on the interface configuration page;
and the construction module is used for constructing the target interface based on the interface parameters, the target space coding and the fetch logic rule.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the data extraction device further includes:
the second judging module is used for judging whether a data query request corresponding to the target data is received from the user input or not;
the second acquisition module is used for acquiring index identifiers of all index data contained in the target data and displaying a check page containing the index identifiers if yes;
The third receiving module is used for receiving a designated checking identification selected by the user in the checking page;
the screening module is used for screening specified data corresponding to the check mark from the target data;
and the second display module is used for displaying the specified data.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the data extraction device further includes:
the third acquisition module is used for acquiring a preset interface class table;
a fourth obtaining module, configured to obtain, from the interface class table, a target class corresponding to the target interface based on the target space number;
the determining module is used for determining a target storage mode corresponding to the target grade;
and the storage module is used for storing the target data based on the target storage mode.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the data extraction device further includes:
The third judging module is used for judging whether a data adjustment request for the target interface triggered by the user is received or not;
the third display module is used for displaying a preset adjustment page if yes;
the fourth receiving module is used for receiving the adjustment information input by the user on the adjustment page;
and the adjusting module is used for carrying out corresponding adjusting processing on the target interface based on the adjusting information.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the data extraction method in the foregoing embodiment one by one, and are not described herein again.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of a data extraction method. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the data extraction method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in the embodiment of the application, whether a data extraction request input by a user through a client is received is firstly judged; if yes, analyzing the target space code and the fetch parameter from the data extraction request; then, a target interface corresponding to the target space code is obtained, and an access SQL statement corresponding to the target interface is obtained; then, carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement; subsequently, the target number SQL statement is operated to obtain corresponding target data; and finally, returning the target data to the client through the target interface. According to the method and the device for processing the target access SQL statement, the corresponding target interface can be determined according to the target space code input by the user, the access SQL statement of the target interface can be intelligently recombined according to the access parameter input by the user, so that the target access SQL statement corresponding to the personal requirement of the user can be rapidly and accurately obtained, and multiple access logics can be realized in the same interface. Only the dynamic access parameters are input by the user, the access SQL sentences of the target interface can be intelligently reassembled according to the access parameters, and then target data required to be extracted by the user can be obtained by operating the reassembled access SQL sentences, so that the user does not need to write a corresponding interface for each set of access conditions, the repeated workload of the user is greatly reduced, the development cost of data extraction based on the interfaces is reduced, the efficiency of data extraction is improved, and the use experience of the user is improved.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the data extraction method as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in the embodiment of the application, whether a data extraction request input by a user through a client is received is firstly judged; if yes, analyzing the target space code and the fetch parameter from the data extraction request; then, a target interface corresponding to the target space code is obtained, and an access SQL statement corresponding to the target interface is obtained; then, carrying out recombination processing on the access SQL statement based on the access parameter to obtain a corresponding target access SQL statement; subsequently, the target number SQL statement is operated to obtain corresponding target data; and finally, returning the target data to the client through the target interface. According to the method and the device for processing the target access SQL statement, the corresponding target interface can be determined according to the target space code input by the user, the access SQL statement of the target interface can be intelligently recombined according to the access parameter input by the user, so that the target access SQL statement corresponding to the personal requirement of the user can be rapidly and accurately obtained, and multiple access logics can be realized in the same interface. Only the dynamic access parameters are input by the user, the access SQL sentences of the target interface can be intelligently reassembled according to the access parameters, and then target data required to be extracted by the user can be obtained by operating the reassembled access SQL sentences, so that the user does not need to write a corresponding interface for each set of access conditions, the repeated workload of the user is greatly reduced, the development cost of data extraction based on the interfaces is reduced, the efficiency of data extraction is improved, and the use experience of the user is improved.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (10)

CN202310410282.1A2023-04-142023-04-14Data extraction method, device, computer equipment and storage mediumPendingCN116450723A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310410282.1ACN116450723A (en)2023-04-142023-04-14Data extraction method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310410282.1ACN116450723A (en)2023-04-142023-04-14Data extraction method, device, computer equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN116450723Atrue CN116450723A (en)2023-07-18

Family

ID=87128347

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310410282.1APendingCN116450723A (en)2023-04-142023-04-14Data extraction method, device, computer equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN116450723A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117235236A (en)*2023-11-102023-12-15腾讯科技(深圳)有限公司Dialogue method, dialogue device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117235236A (en)*2023-11-102023-12-15腾讯科技(深圳)有限公司Dialogue method, dialogue device, computer equipment and storage medium
CN117235236B (en)*2023-11-102024-03-29腾讯科技(深圳)有限公司Dialogue method, dialogue device, computer equipment and storage medium

Similar Documents

PublicationPublication DateTitle
EP3916584A1 (en)Information processing method and apparatus, electronic device and storage medium
CN113377372A (en)Business rule analysis method and device, computer equipment and storage medium
CN113010542B (en)Service data processing method, device, computer equipment and storage medium
CN117033249A (en)Test case generation method and device, computer equipment and storage medium
CN115936895A (en)Risk assessment method, device and equipment based on artificial intelligence and storage medium
CN114844792A (en)Dynamic monitoring method, device, equipment and storage medium based on LUA language
CN116860856A (en)Financial data processing method and device, computer equipment and storage medium
CN115757889A (en)Data item processing method and device, computer equipment and storage medium
CN116450723A (en)Data extraction method, device, computer equipment and storage medium
CN117217684A (en)Index data processing method and device, computer equipment and storage medium
CN115328920B (en) Batch data exception processing method, device, computer equipment and storage medium
CN117492752A (en)Page dynamic configuration method and device, computer equipment and storage medium
CN116661763A (en)Front-end and back-end development management method and device, computer equipment and storage medium
CN115829768A (en)Data calculation method, device and equipment based on rule engine and storage medium
CN116383787A (en)Page creation method, page creation device, computer equipment and storage medium
CN119202014B (en) Data comparison method, device, computer equipment and storage medium
CN117009179B (en)Method and device for realizing monitoring micro-service, storage medium and electronic equipment
CN117785181B (en) A code execution method, device, equipment and storage medium thereof
CN116611936A (en)Data analysis method, device, computer equipment and storage medium
CN116401061A (en)Method and device for processing resource data, computer equipment and storage medium
CN120631404A (en) A service update method, device, equipment and storage medium thereof
CN116932486A (en)File generation method, device, computer equipment and storage medium
CN117933699A (en)Task analysis method, device, computer equipment and storage medium
CN117032789A (en)Business rule configuration and execution method, system, computer equipment and storage medium
CN119205349A (en) Method, device, equipment and medium for issuing rights based on integration of compliance capabilities

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp