CN115858905A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115858905A
CN115858905A CN202211546335.4A CN202211546335A CN115858905A CN 115858905 A CN115858905 A CN 115858905A CN 202211546335 A CN202211546335 A CN 202211546335A CN 115858905 A CN115858905 A CN 115858905A
Authority
CN
China
Prior art keywords
data
parameters
original
target
server
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
CN202211546335.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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211546335.4A priority Critical patent/CN115858905A/en
Publication of CN115858905A publication Critical patent/CN115858905A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a data processing method, a data processing device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises: intercepting a data request sent through a display page, and analyzing attribute parameters of target data in the data request to inquire the target data from a cache; responding to the condition that the cache does not contain the target data, acquiring a preset mapping relation, and determining original data parameters required by the target data based on the attribute parameters; calling an interface of a data server to acquire original data from the data server based on the original data parameters; and querying the processing model associated with the attribute parameters to calculate data corresponding to the data request based on the original data, returning the calculated data and displaying the data. The embodiment can solve the problems that the connection between the front end of the data display and the intermediate server occupies the intermediate server resources for a long time, so that the performance of the intermediate server is reduced and the data processing efficiency is reduced.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of the mobile internet, in many scenes where data presentation needs to be provided for users, multi-dimensional computing processing is generally performed on the basis of raw data to provide better services for the users. For example, in the case of providing a consumption record for a user, various forms of calculation data such as year, month, day, etc. can be provided for the user based on the user's needs and personalized display can be performed. Therefore, for the data system, on the basis of data storage, it is necessary to satisfy various data processing services such as data calculation and query, which makes it difficult for the data system to satisfy the requirements.
In the prior art, in order to satisfy a service of data processing, an intermediate layer server is usually added between a front end of data display and a data system, and is used for processing original data in the data system to satisfy a service requirement of a user. However, each data request between the middle layer server and the front end needs to maintain normal connection between the processing result obtained and the front end returned to facilitate data transmission, and the number of connections that each middle server can maintain is limited, and for a data processing scenario with large data volume, complex calculation and time consumption, the connection occupies middle server resources for a long time, thereby causing performance reduction of the middle server and reduction of data processing efficiency.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data processing method and apparatus, an electronic device, and a storage medium, which can solve the problem that a connection between a front end of data display and an intermediate server occupies resources of the intermediate server for a long time, thereby reducing performance of the intermediate server and reducing data processing efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of data processing.
The data processing method of the embodiment of the invention comprises the following steps: intercepting a data request sent through a display page, and analyzing attribute parameters of target data in the data request to inquire the target data from a cache; responding to the condition that the target data is not included in the cache, acquiring a preset mapping relation, and determining to obtain an original data parameter required by the target data based on the attribute parameter; calling an interface of a data server to acquire original data from the data server based on the original data parameters; and querying the processing model associated with the attribute parameters, calculating data corresponding to the data request based on the original data, returning the calculated data and displaying the data.
In one embodiment, the mapping relationship comprises a mapping matrix;
the determining of the original data parameters required by the target data based on the attribute parameters comprises:
and extracting a mapping vector corresponding to the data parameter in the mapping matrix, and identifying a preset value in the mapping vector so as to determine an original data parameter required by the target data based on the data parameter associated with the preset value.
In yet another embodiment, the data parameter includes a field identification;
determining original data parameters required for obtaining the target data based on the data parameters associated with the preset values, wherein the original data parameters comprise:
and acquiring a field identifier associated with the preset value, and inquiring a data table corresponding to the field identifier to determine the data table and the field identifier as original data parameters.
In yet another embodiment, the attribute parameters include a time parameter;
based on the original data parameters, acquiring original data from the data server, including:
generating a raw data request based on the raw data parameter and the time parameter;
and sending the original data request to the data server so that the data server returns the original data.
In yet another embodiment, determining the raw data parameters needed to derive the target data based on the attribute parameters comprises:
acquiring attribute parameters corresponding to the intermediate data based on the attribute parameters and the first mapping relation so as to inquire the intermediate data from a cache;
and in response to the cache not including the intermediate data, determining original data parameters required for obtaining the target data based on the attribute parameters of the target data and a second mapping relation.
In another embodiment, parsing attribute parameters of target data in the data request includes:
and analyzing the data server identification in the data request, and calling a processor corresponding to the data server identification to analyze the attribute parameters of the target data in the data request.
In yet another embodiment, the method further comprises:
extracting the identifier of each database table and the corresponding version identifier from the database, and inquiring the highest version identifier corresponding to each database table;
and executing a version upgrading program on the database table in response to the version identification of the database table being smaller than the corresponding highest version identification.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for data processing.
The data processing device of the embodiment of the invention comprises: the analysis unit is used for intercepting a data request sent through a display page, analyzing attribute parameters of target data in the data request and inquiring the target data from a cache;
the determining unit is used for responding to the condition that the target data is not included in the cache, acquiring a preset mapping relation, and determining to obtain an original data parameter required by the target data based on the attribute parameter;
the acquisition unit is used for calling an interface of a data server to acquire original data from the data server based on the original data parameters;
and the calculating unit is used for inquiring the processing model associated with the attribute parameters, calculating data corresponding to the data request based on the original data, returning the calculated data and displaying the data.
In one embodiment, the mapping relationship comprises a mapping matrix;
the determining unit is specifically configured to:
extracting mapping vectors corresponding to the data parameters in the mapping matrix, identifying preset values in the mapping vectors, and determining original data parameters required by the target data based on the data parameters associated with the preset values.
In yet another embodiment, the data parameter includes a field identification;
the determining unit is specifically configured to:
and acquiring a field identifier associated with the preset value, and querying a data table corresponding to the field identifier to determine the data table and the field identifier as original data parameters.
In yet another embodiment, the attribute parameters include a time parameter;
the obtaining unit is specifically configured to:
generating a raw data request based on the raw data parameter and the time parameter;
and sending the original data request to the data server so that the data server returns the original data.
In another embodiment, the determining unit is specifically configured to:
acquiring corresponding intermediate data based on the attribute parameters to inquire the intermediate data from a cache;
in response to not including the intermediate data in the cache, determining, based on the attribute parameters, original data parameters needed to derive the target data.
In another embodiment, the parsing unit is specifically configured to:
and analyzing the data server identification in the data request, and calling a processor corresponding to the data server identification to analyze the attribute parameters of the target data in the data request.
In yet another embodiment, the apparatus further comprises:
the query unit is used for extracting the identifier of each database table and the corresponding version identifier from the database and querying the highest version identifier corresponding to each database table;
and the upgrading unit is used for responding to the version identification of the database table smaller than the corresponding highest version identification and executing a version upgrading program on the database table.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the data processing method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements the method of data processing provided by an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
A computer program product according to an embodiment of the present invention includes a computer program, and when the computer program is executed by a processor, the computer program implements the method for processing data according to an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, a data request sent through a display page can be intercepted, and the attribute parameters of target data in the data request are analyzed so as to inquire the target data from a cache; when the target data is not stored in the cache, the original data identifier required by the data can be determined based on the attribute parameters, then the original data is obtained from the data server through the interface of the data server, and the data requested by the data is calculated through the associated processing model. Therefore, in the embodiment of the invention, under the condition that the front-end page needs to acquire data, only the original data needs to be acquired from the data server, and then the data is processed through the preset processing model, so that the data acquisition process is simple, an intermediate server does not need to be arranged with the data server, the connection does not need to be established for a long time, and the reduction of the data processing efficiency caused by the reduction of the performance of the intermediate server is avoided.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a system architecture of a data processing system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of one principal flow of a method of data processing according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of yet another principal flow of a method of data processing according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of yet another major flow of a method of data processing according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main elements of an apparatus for data processing according to an embodiment of the present invention;
FIG. 6 is a diagram of yet another exemplary system architecture to which embodiments of the present invention may be applied;
FIG. 7 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. According to the technical scheme, the data acquisition, storage, use, processing and the like meet the relevant regulations of national laws and regulations.
The embodiment of the invention provides a data processing system which can be used for displaying a scene of data acquisition in a page.
The data processing system in the embodiment of the invention can be provided with the browser, the front end of the browser can display pages, the display pages of the browser can display data required to be checked by a user, and the data displayed by the display pages needs to be calculated from original data stored in the data server. Since the browser front end is usually disposed in the terminal device, the terminal device can be used as a data processing system. Because the data displayed in the browser is not the original data stored by the data server, in order to facilitate data processing, the embodiment of the present invention may be used in a data layer of data processing at the front end of the browser, so as to meet processing requirements such as data calculation and storage.
In the embodiment of the present invention, a data processing system is taken as an example of a system for setting a front end of a browser, and fig. 1 is a schematic diagram of a system architecture of the data processing system in the embodiment of the present invention. As shown in fig. 1, a system for data processing may include a presentation layer, a computation layer, and a data layer. The display layer can be a display page of a browser, a user and the like can input a data request based on the display page, and then the display layer transmits the data request to the computing layer; the computing layer can comprise a request intercepting module, a processor configuration module and a plurality of processors for processing user data, wherein the request intercepting module can be used for intercepting data requests sent by the display layer and further transmitting the data requests to the corresponding processors for processing; the data layer can provide support for data processing of the computing layer and can comprise a data interface packaging module, a database version management module, a database and a program module, the data interface packaging module can provide a packaged interface for data transmission, and the database can store data acquired from a data server or data results processed by the computing layer. When data interaction with a data server is required in the data processing system, connection can be established with the data server. Therefore, in the embodiment of the invention, the data processing is realized through the front end of the browser so as to meet the display requirement of the real page, so that an intermediate server is not required to be arranged with the data server, the connection is not required to be established for a long time, and the reduction of the data processing efficiency caused by the performance reduction of the intermediate server is avoided.
An embodiment of the present invention provides a data processing method, which may be executed by the data processing system shown in fig. 1, and as shown in fig. 2, the method includes:
s201: intercepting a data request sent through a display page, and analyzing attribute parameters of target data in the data request so as to inquire the target data from a cache.
The user can input a data request through a display page of the front end of the browser, the display layer of the front end of the browser can transmit the data request, and the computing layer can intercept the data request transmitted by the display layer. Specifically, the data request may include an http request, and the computation layer may intercept the http request based on a Proxy syntax of the ES 6.
In the embodiment of the invention, in order to avoid the number of times of interaction with the data server, the processed data result can be stored, so that after the data request is intercepted, the data can be inquired from the stored data. After intercepting the data request, the data request may be parsed to determine attribute parameters of target data to be obtained by the data request, so that the target data may be queried from the cache. If the target data corresponding to the data request is inquired, namely the target data is stored, the inquired data can be directly returned to the display page to be displayed; and if the target data corresponding to the data request is not inquired, acquiring the required data from the data server after analyzing the data request.
In the embodiment of the present invention, when the data server includes a plurality of data servers, the processor may be configured based on the data server in the embodiment of the present invention, a mapping relationship (such as a map object) between each data server and the processor is established, and then for an intercepted data request, the corresponding data server may be determined based on a target address therein, and then the corresponding processor may be determined based on the mapping relationship.
It should be noted that, in the embodiment of the present invention, the attribute parameter may include a parameter required for querying the target data, such as an identifier of the target data, an identifier of a corresponding field, and the like.
S202: and responding to the condition that the cache does not contain the target data, acquiring a preset mapping relation, and determining original data parameters required by the target data based on the attribute parameters.
The cache does not include the target data, which means that the target data cannot be directly obtained, and the target data needs to be obtained through processing of the original data, so that the original data parameters required for obtaining the target data can be determined in the step.
In the embodiment of the invention, in order to obtain data from the data server, a mapping relation between the attribute parameters of the data to be obtained and the original data parameters required for obtaining the data, namely the mapping relation between the attribute parameters of the target data and the original data parameters required for obtaining the target data, can be established in advance, so that the original data parameters required for obtaining the target data can be determined after the mapping relation is obtained. Specifically, the original data parameter may be an original data identifier or a field identifier of the original data, and the like.
For example, in the embodiment of the present invention, the mapping relationship may specifically include a mapping matrix. Parameters needing to establish mapping relation can be represented by rows and columns in the mapping matrix, and the element value of each element in the mapping matrix is used for judging whether the parameters represented by the corresponding rows and columns have mapping relation. For example, each row in the mapping matrix may represent an attribute parameter of target data, each column in the mapping matrix represents an original data parameter, an element value of 1 represents that there is a mapping relationship between the parameters represented by the row and the column corresponding to the element, and an element value of 0 represents that there is no mapping relationship between the parameters represented by the row and the column corresponding to the element.
Thus, this step can be specifically executed as: and extracting mapping vectors corresponding to the data parameters in the mapping matrix, identifying preset values in the mapping vectors, and determining original data parameters required by obtaining target data based on the data parameters associated with the preset values.
Each row in the mapping matrix represents an attribute parameter of target data, so that the extracted mapping vector is a row vector, the element values of the elements in the row vector are 0 and/or 1, and the preset value is 1, so that data parameters represented by the column corresponding to the element with the element value of 1 in the row vector can be determined, that is, data parameters associated with the element value of 1 in the row vector are original data parameters required for obtaining the target data.
Specifically, the data parameter may include a field identifier, that is, a field identifier associated with a preset value may be determined by a mapping matrix, and in order to facilitate obtaining original data from the data server, a data table storing data corresponding to the field identifier in the data server may be queried first, that is, the data table corresponding to the field identifier, so that both the field identifier and the data table may be determined as original data parameters for obtaining data from the data server.
It should be noted that, in some scenarios, some target data need to be obtained through multiple calculations from the raw data, so some intermediate data may be obtained in the calculation process. If the target data can be the sales increase amount of the current month and the previous month, and in the data processing, the original data is the sales detail of each month, so the sales increase amount of the current month and the previous month needs to be calculated based on the original data, and then the sales increase amount of the current month and the previous month needs to be calculated, and at this time, the sales of the current month and the previous month can be determined as the intermediate data corresponding to the target data.
Therefore, in the embodiment of the present invention, for target data that can be calculated from intermediate data, a first mapping relationship between the attribute parameter of the target data and the attribute parameter of the intermediate data, and a second mapping relationship between the attribute parameter of the target data and the original data parameter may be respectively established. In this step, the attribute parameters of the intermediate data corresponding to the target data may be obtained based on the first mapping relationship, so as to query the intermediate data from the cache; if the intermediate data is included in the cache, calculating target data based on the intermediate data and returning the calculated target data; if the cache does not include the intermediate data, the second mapping relation may be queried based on the attribute parameter of the target data, and the original data parameter required to obtain the target data may be determined.
S203: and calling an interface of the data server to acquire the original data from the data server based on the original data parameters.
The interface of the data server may be pre-packaged, and may be executed by the data interface packaging module shown in fig. 1, so that the data interface packaging module is used for performing data interaction with the data server, and therefore, in this step, the original data may be obtained by calling the interface of the data server. After the original data parameter is determined in step S204, a data request sent to the data server may be generated based on the original data parameter, and then sent to the data server, so that the data server returns the corresponding original data.
In some embodiments, since the target data may be data in a time period, the attribute parameters in step S201 may further include a time parameter to define the time period corresponding to the target data, for example, the target data may increase sales of the current month and the previous month, and the time parameter may be from the previous month to the current month. At this time, the original parameters required for calculating the target data only need to be the sales detail data of the current month and the previous month, so that in the step, after the attribute parameters are determined to include the time parameters, the original data request can be generated based on the original data parameters and the time parameters, and then the original data request is sent to the data server, so that the data server returns the original data, and the data volume of the returned original data is reduced.
It should be noted that, in the embodiment of the present invention, when there are multiple data servers, the destination address may be obtained from the data request to query the data server corresponding to the data request, and then the interface of the data server may be queried in this step.
S204: and querying the processing model associated with the attribute parameters to calculate data corresponding to the data request based on the original data, returning the calculated data and displaying the data.
The processing model is configured in advance, and different target data need to be calculated through different algorithms, so in the embodiment of the invention, a corresponding processing model can be configured for each target data, and an association relation is established through the attribute parameters of the target data and the processing models, so that after the original data meeting is obtained in the step, the target data can be calculated based on the processing models associated with the attribute parameters, and the target data can be returned to the display page for display.
It should be noted that, in the embodiment of the present invention, since the processing result and the obtained raw data need to be stored in a memorable manner, a database, such as IndexedDB, may be configured to provide local persistent storage of the data. Meanwhile, the version of the data table in the database can be managed, namely the management of the database version is carried out. Specifically, the version management of the database may be performed as: extracting the identifier of each database table and the corresponding version identifier from the database, and inquiring the highest version identifier corresponding to each database table; and executing a version upgrading program on the database table in response to the version identification of the database table being smaller than the corresponding highest version identification. The database version management module can store the highest version identification of each data table, and when the version upgrading is determined to be needed, the data tables can be sequentially updated according to the sequence of the version from low to high.
In the embodiment of the invention, under the condition that the front-end page needs to acquire data, only the original data needs to be acquired from the data server, and then the data is processed through the preset processing model, so that the data acquisition process is simple, an intermediate server does not need to be arranged with the data server, the connection does not need to be established for a long time, and the reduction of the data processing efficiency caused by the reduction of the performance of the intermediate server is avoided.
The following describes, in conjunction with the system architecture shown in fig. 1 and the embodiment shown in fig. 2, a method for processing data in the embodiment of the present invention in detail, and as shown in fig. 3, the method includes:
s301: intercepting a data request sent through a display page, and analyzing attribute parameters of target data in the data request so as to inquire the target data from a cache.
S302: and responding to the condition that the cache does not contain the target data, acquiring a preset mapping matrix, and extracting a mapping vector corresponding to the data parameter in the mapping matrix.
S303: and identifying preset values in the mapping vector to determine original data parameters required by obtaining target data based on data parameters associated with the preset values.
S304: and calling an interface of the data server to acquire the original data from the data server based on the original data parameters.
S305: and querying the processing model associated with the attribute parameters to calculate data corresponding to the data request based on the original data, returning the calculated data and displaying the data.
S306: and responding to the target data included in the cache, acquiring the target data and returning to display the target data.
It should be noted that the data processing principle in the embodiment of the present invention is the same as the data processing principle corresponding to the real-time exchange rate shown in fig. 2, and is not described herein again.
The following describes, in conjunction with the system architecture shown in fig. 1 and the embodiment shown in fig. 2, a method for processing data in the embodiment of the present invention in detail, and as shown in fig. 4, the method includes:
s401: and intercepting a data request sent through the display page, and analyzing attribute parameters of target data in the data request so as to inquire the target data from the cache.
S402: and responding to the condition that the cache does not comprise the target data, acquiring a preset first mapping relation, and acquiring an attribute parameter corresponding to the intermediate data based on the attribute parameter and the first mapping relation so as to inquire the intermediate data from the cache.
S403: and determining original data parameters required for obtaining the target data based on the attribute parameters of the target data and the second mapping relation in response to the fact that the cache does not contain the intermediate data.
S404: and calling an interface of the data server to acquire the original data from the data server based on the original data parameters.
S405: and querying the processing model associated with the attribute parameters to calculate data corresponding to the data request based on the original data, returning the calculated data and displaying the data.
S406: responding to the buffer memory containing the intermediate data, calculating the data corresponding to the data request based on the intermediate data, returning the calculated data and displaying.
S406: and responding to the target data included in the cache, acquiring the target data and returning to display the target data.
It should be noted that the data processing principle in the embodiment of the present invention is the same as the data processing principle corresponding to the real-time exchange rate shown in fig. 2, and is not described herein again.
In order to solve the problems in the prior art, an embodiment of the present invention provides an apparatus 500 for data processing, as shown in fig. 5, the apparatus 500 includes:
an analyzing unit 501, configured to intercept a data request sent through a display page, and analyze attribute parameters of target data in the data request to query the target data from a cache;
a determining unit 502, configured to, in response to that the target data is not included in the cache, obtain a preset mapping relationship, so as to determine, based on the attribute parameter, an original data parameter required for obtaining the target data;
an obtaining unit 503, configured to invoke an interface of a data server to obtain original data from the data server based on the original data parameter;
the calculating unit 504 is configured to query the processing model associated with the attribute parameter, calculate data corresponding to the data request based on the original data, return the calculated data, and display the data.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 2, and the description thereof is omitted.
In one embodiment, the mapping relationship comprises a mapping matrix;
the determining unit is specifically configured to:
extracting mapping vectors corresponding to the data parameters in the mapping matrix, identifying preset values in the mapping vectors, and determining original data parameters required by the target data based on the data parameters associated with the preset values.
In yet another embodiment, the data parameter includes a field identification;
the determining unit is specifically configured to:
and acquiring a field identifier associated with the preset value, and inquiring a data table corresponding to the field identifier to determine the data table and the field identifier as original data parameters.
In yet another embodiment, the attribute parameters include a time parameter;
the obtaining unit is specifically configured to:
generating a raw data request based on the raw data parameter and the time parameter;
and sending the original data request to the data server so that the data server returns the original data.
In another embodiment, the determining unit is specifically configured to:
acquiring corresponding intermediate data based on the attribute parameters to inquire the intermediate data from a cache;
in response to not including the intermediate data in the cache, determining, based on the attribute parameters, original data parameters needed to derive the target data.
In another embodiment, the parsing unit is specifically configured to:
and analyzing the data server identification in the data request, and calling a processor corresponding to the data server identification to analyze the attribute parameters of the target data in the data request.
In yet another embodiment, the apparatus further comprises:
the query unit is used for extracting the identifier of each database table and the corresponding version identifier from the database and querying the highest version identifier corresponding to each database table;
and the upgrading unit is used for responding to the version identification of the database table smaller than the corresponding highest version identification and executing a version upgrading program on the database table.
It should be understood that the embodiment of the present invention is implemented in the same manner as the embodiment shown in fig. 2, 3 and 4, and is not repeated herein.
In the embodiment of the invention, under the condition that the front-end page needs to acquire data, only the original data needs to be acquired from the data server, and then the data is processed through the preset processing model, so that the data acquisition process is simple, an intermediate server does not need to be arranged with the data server, the connection does not need to be established for a long time, and the reduction of the data processing efficiency caused by the reduction of the performance of the intermediate server is avoided.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic device of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the method for data processing provided by the embodiment of the invention.
Fig. 6 shows an exemplary system architecture 600 of a data processing apparatus or a method of data processing to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various client applications may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, and the server may analyze and perform other processes on data such as a received product information query request, and feed back a processing result (for example, product information — just an example) to the terminal device.
It should be noted that the data processing method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the data processing apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, a block diagram of a computer system 700 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 7 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes a parsing unit, a determining unit, an obtaining unit, and a calculating unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, a parsing unit may also be described as a "unit of a data parsing function".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the data processing methods provided by the present invention.
As another aspect, the present invention also provides a computer program product including a computer program, which when executed by a processor implements the method for data processing provided by the embodiments of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method of data processing, comprising:
intercepting a data request sent through a display page, and analyzing attribute parameters of target data in the data request to inquire the target data from a cache;
responding to the condition that the target data is not included in the cache, acquiring a preset mapping relation, and determining to obtain an original data parameter required by the target data based on the attribute parameter;
calling an interface of a data server to acquire original data from the data server based on the original data parameters;
and querying the processing model associated with the attribute parameters to calculate data corresponding to the data request based on the original data, returning the calculated data and displaying.
2. The method of claim 1, wherein the mapping relationship comprises a mapping matrix;
the determining of the original data parameters required by the target data based on the attribute parameters comprises:
extracting mapping vectors corresponding to the data parameters in the mapping matrix, identifying preset values in the mapping vectors, and determining original data parameters required by the target data based on the data parameters associated with the preset values.
3. The method of claim 2, wherein the data parameter comprises a field identification;
determining original data parameters required for obtaining the target data based on the data parameters associated with the preset values, wherein the original data parameters comprise:
and acquiring a field identifier associated with the preset value, and inquiring a data table corresponding to the field identifier to determine the data table and the field identifier as original data parameters.
4. The method of claim 1, wherein the attribute parameters include a time parameter;
based on the original data parameters, acquiring original data from the data server, including:
generating a raw data request based on the raw data parameter and the time parameter;
and sending the original data request to the data server so that the data server returns the original data.
5. The method of claim 1, wherein determining the raw data parameters needed to derive the target data based on the attribute parameters comprises:
acquiring attribute parameters corresponding to the intermediate data based on the attribute parameters and the first mapping relation so as to inquire the intermediate data from a cache;
and in response to the intermediate data not being included in the cache, determining original data parameters required for obtaining the target data based on the attribute parameters of the target data and a second mapping relation.
6. The method of claim 1, wherein parsing attribute parameters of target data in the data request comprises:
and analyzing the data server identification in the data request, and calling a processor corresponding to the data server identification to analyze the attribute parameters of the target data in the data request.
7. The method of claim 1, further comprising:
extracting the identifier of each database table and the corresponding version identifier from the database, and inquiring the highest version identifier corresponding to each database table;
and executing a version upgrading program on the database table in response to the version identification of the database table being smaller than the corresponding highest version identification.
8. An apparatus for data processing, comprising:
the analysis unit is used for intercepting a data request sent through a display page, analyzing attribute parameters of target data in the data request and inquiring the target data from a cache;
the determining unit is used for responding to the condition that the target data is not included in the cache, acquiring a preset mapping relation, and determining to obtain an original data parameter required by the target data based on the attribute parameter;
the acquisition unit is used for calling an interface of a data server to acquire original data from the data server based on the original data parameters;
and the computing unit is used for querying the processing model associated with the attribute parameters, computing data corresponding to the data request based on the original data, returning the computed data and displaying the data.
9. The apparatus of claim 8, wherein the mapping relationship comprises a mapping matrix;
the determining unit is specifically configured to:
extracting mapping vectors corresponding to the data parameters in the mapping matrix, identifying preset values in the mapping vectors, and determining original data parameters required by the target data based on the data parameters associated with the preset values.
10. The apparatus of claim 9, wherein the data parameter comprises a field identification;
the determining unit is specifically configured to:
and acquiring a field identifier associated with the preset value, and inquiring a data table corresponding to the field identifier to determine the data table and the field identifier as original data parameters.
11. The apparatus of claim 8, wherein the attribute parameters comprise a time parameter;
the obtaining unit is specifically configured to:
generating a raw data request based on the raw data parameter and the time parameter;
and sending the original data request to the data server so that the data server returns the original data.
12. The apparatus according to claim 8, wherein the determining unit is specifically configured to:
acquiring corresponding intermediate data based on the attribute parameters to inquire the intermediate data from a cache;
in response to not including the intermediate data in the cache, determining, based on the attribute parameters, original data parameters needed to derive the target data.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
14. A computer-readable 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-7.
15. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-7.
CN202211546335.4A 2022-12-05 2022-12-05 Data processing method and device, electronic equipment and storage medium Pending CN115858905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211546335.4A CN115858905A (en) 2022-12-05 2022-12-05 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211546335.4A CN115858905A (en) 2022-12-05 2022-12-05 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115858905A true CN115858905A (en) 2023-03-28

Family

ID=85669781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211546335.4A Pending CN115858905A (en) 2022-12-05 2022-12-05 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115858905A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116186816A (en) * 2023-04-26 2023-05-30 陕西空天信息技术有限公司 Rotary machine parameter display method, storage medium and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116186816A (en) * 2023-04-26 2023-05-30 陕西空天信息技术有限公司 Rotary machine parameter display method, storage medium and electronic device
CN116186816B (en) * 2023-04-26 2023-09-08 陕西空天信息技术有限公司 Rotary machine parameter display method, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN107451109B (en) Report generation method and system
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
CN108846753B (en) Method and apparatus for processing data
CN108733720B (en) On-line checking method and checking system for SQL (structured query language) query of multiple database types
CN109992406B (en) Picture request method, picture request response method and client
US11809429B2 (en) Method for processing model parameters, and apparatus
CN110427304A (en) O&M method, apparatus, electronic equipment and medium for banking system
CN110706093A (en) Accounting processing method and device
CN109062560B (en) Method and apparatus for generating information
CN111666293A (en) Database access method and device
CN114675820A (en) Service arrangement data processing method and device, electronic equipment and storage medium
CN111881329A (en) Account balance management method and system
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN111427899A (en) Method, device, equipment and computer readable medium for storing file
CN114489916A (en) Method and device for loading visual large-screen page component
CN113282589A (en) Data acquisition method and device
CN113312553A (en) Method and device for determining user label
CN112947919A (en) Method and device for constructing service model and processing service request
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN112688982B (en) User request processing method and device
CN113779018A (en) Data processing method and device
CN111552715A (en) User query method and device
CN113434754A (en) Method and device for determining recommended API (application program interface) service, electronic equipment and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN112784195A (en) Page data publishing method and system

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