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

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

Info

Publication number
CN114116244A
CN114116244A CN202010898719.7A CN202010898719A CN114116244A CN 114116244 A CN114116244 A CN 114116244A CN 202010898719 A CN202010898719 A CN 202010898719A CN 114116244 A CN114116244 A CN 114116244A
Authority
CN
China
Prior art keywords
data
simulation
platform
acquisition request
data structure
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
CN202010898719.7A
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.)
Soyoung Technology Beijing Co Ltd
Original Assignee
Soyoung Technology Beijing 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 Soyoung Technology Beijing Co Ltd filed Critical Soyoung Technology Beijing Co Ltd
Priority to CN202010898719.7A priority Critical patent/CN114116244A/en
Publication of CN114116244A publication Critical patent/CN114116244A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The application provides a data processing method, a data processing device, a data processing system, an electronic device and a storage medium. The data obtained by the front-end data platform simulation can reduce the problems of incomplete data or discontinuous data and the like caused by human subjective factors. And the process is displayed according to the simulation data provided by the front-end data platform, but not displayed according to the data provided by the data interface at the rear end, so that if the page display effect of the front-end application is not good, new simulation data can be directly provided for the front-end application through the front-end data platform, and the problems of low front-end development efficiency and high time cost caused by multiple data interaction between the front-end application and the data interface can be avoided.

Description

Data processing method, device and system, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic information, and in particular, to a method, an apparatus, and a system for data processing, an electronic device, and a storage medium.
Background
In the process of software development, data required by the front-end application is generally required to be acquired from a data interface of the back end, but in many cases, the data required by the front-end application does not exist in the data interface, so that the data required by the front-end application needs to be simulated in order to not influence the development progress of the front-end application.
In the prior art, usually, a back-end developer manually compiles simulation data and then returns the simulation data to a front-end application through a back-end data interface, but due to artificial subjective factors, the problem that the manually compiled simulation data is incomplete or discontinuous in data and the like often exists, so that the page presentation effect of the front-end application is poor. Moreover, because the data required by the front-end application is provided through the data interface at the rear end, the front-end application adopts the data provided by the data interface at the rear end to perform page display, but under the condition of poor display effect, the front-end application needs to perform multiple data interactions with the data interface at the rear end, so that the efficiency of front-end development is reduced, and the time cost is increased.
Disclosure of Invention
The application provides a data processing method and a data processing system, and aims to solve the problems that how to automatically generate simulation data and a front-end developer needs to modify the data and a back-end developer needs to coordinate online at the same time.
In order to achieve the above object, the present application provides the following technical solutions:
a method of data processing, the method being applied to a front-end data platform, the method comprising:
receiving a data acquisition request sent by a process;
acquiring first data returned by a data interface corresponding to the data acquisition request;
generating simulation data with a first data structure, wherein the first data structure is the data structure of the first data;
and sending the simulation data to the process, so that the process carries out page display according to the simulation data.
Optionally, before receiving the data acquisition request sent by the process, the method further includes:
obtaining a configuration operation for configuring a domain name as a domain name accessible to a data requestor;
configuring a domain name based on the configuration operation.
Optionally, the obtaining of the first data returned by the data interface corresponding to the data obtaining request includes:
and sending the data acquisition request to a back-end data platform server, so that the back-end data platform server returns the first data after acquiring the first data from the data interface.
Optionally, the method further includes, after the acquiring the first data returned by the data interface corresponding to the data acquisition request, before the generating the simulation data having the first data structure, that:
positioning and identifying target field content included in the first data, wherein the target field content is field content corresponding to a preset specified field;
judging whether the content of the target field is a preset first numerical value or a preset second numerical value;
if the first numerical value is the first numerical value, determining that the first data are page data required by the process;
if the first data structure is the second value, acquiring the first data structure from the first data;
judging whether the first data structure conforms to a preset data structure of the page data;
and if the error prompt information does not meet the requirement, generating error prompt information, returning the error prompt information to the process, and displaying the error prompt information by the process.
The above method, optionally, further includes: and under the condition that the first data is determined to be the page data required by the process, sending the first data to the process, so that the process performs page display according to the first data.
The method described above, optionally, the generating the simulation data having the first data structure includes:
calling a preset open source tool to perform data filling on the first data structure to obtain the simulation data; the first data structure specifies at least characteristics of a sequence of data elements included in the simulation data, the characteristics of the sequence of data elements including: the total number of data elements included in the data element sequence, the numerical value of the initial data element, and the incremental relationship among the data elements in the data element sequence; the incremental relationship between any two adjacent ones of the data elements is the same.
In the method, optionally, the analog data is a numerical array having the first data structure.
A data processing apparatus comprising:
the receiving unit is used for receiving a data acquisition request sent by a process;
the acquisition unit is used for acquiring first data returned by the data interface corresponding to the data acquisition request;
a generating unit for generating simulation data having a first data structure; the first data structure is a data structure of the first data;
and the sending unit is used for sending the simulation data to the process so that the process can display a page according to the simulation data.
An electronic device, comprising: a processor and a memory for storing a program; the processor is used for running the program and the data processing method.
A storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the above-described method of data processing.
A system for data processing, comprising: a front-end data platform and a back-end data platform server;
the front-end data platform is used for receiving a data acquisition request sent by a process and then sending the data acquisition request to a back-end data platform server;
the back-end data platform server is used for acquiring first data from a data interface corresponding to the data acquisition request and sending the first data to the front-end data platform;
the front-end data platform is further used for generating simulation data with the first data structure, sending the simulation data to the process and enabling the process to display a page according to the simulation data; the first data structure is a data structure of the first data.
According to the method, after the front-end data platform receives the data acquisition request sent by the process, the first data returned by the data interface corresponding to the data acquisition request is acquired, and the simulation data with the first data structure is generated. Compared with the manually written simulation data, the data obtained by the simulation of the front-end data platform has no influence of artificial subjective factors, so that the problems of incomplete data or discontinuous data and the like caused by the artificial subjective factors are solved.
Furthermore, after acquiring the first data returned by the data interface, the front-end data platform generates simulation data with a first data structure, and sends the simulation data to the process, so that the process performs page display according to the simulation data. That is to say, the process is to perform the page display according to the simulation data provided by the front-end data platform, but not to perform the page display according to the data provided by the data interface at the back end, so under such a condition, if the page display effect of the front-end application is not good, new simulation data can be directly provided for the front-end application through the front-end data platform, thereby avoiding the problems of low front-end development efficiency and high time cost caused by multiple data interactions performed between the front-end application and the data interface.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of another method for data processing according to an embodiment of the present application;
FIG. 3 is a flow chart of another method of data processing provided by embodiments of the present application;
fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 5 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In software development, data required by the front-end application is generally required to be acquired from a data interface, but the data interface sometimes cannot provide the data required by the front-end application, and in this case, data simulation is required to simulate the data required by the front-end application.
In the prior art, after a back-end developer manually compiles simulation data, a data interface at the back end returns to a front-end application, so that the problem of the processing mode is that:
firstly, due to artificial subjective factors, problems of incomplete data or discontinuous data and the like often exist in artificially written simulation data;
second, because the data that the front-end application needs is provided through the data interface of the back end, so under the condition that the page display effect of the front-end application is not good, the front-end application needs to carry out data interaction many times with the data interface of the back end, which not only reduces the efficiency of front-end development, but also increases the time cost.
In order to solve the above problem, in the data processing method provided in the embodiment of the present application, the pre-created front-end data platform generates the simulation data, and sends the simulation data to the front-end application, so that the problems of incomplete data or discontinuous data and the like caused by human subjective factors can be reduced, and the problems of low development efficiency and high time cost caused by performing multiple times of data on the front-end application and the data interface are avoided.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a data processing method provided in an embodiment of the present application, and the method may include the following steps:
s101, a front-end data platform receives a data acquisition request sent by a process.
The process may be a front-end application, such as a browser. The front-end data platform is deployed in the front-end system in advance, and the front-end data platform has a preset domain name. The data acquisition request carries a unique identifier of the target data interface, and the unique identifier at least comprises a name of the target data interface and a domain name of a rear-end server to which the target data interface belongs. The target data interface is a data interface of a server for providing the process with page data required by the process. The process can send a data acquisition request to the front-end data platform in a manner that the accessed domain name is the same as a preset domain name of the front-end data platform.
The configuration process of the front-end data platform domain name may be: the front-end data platform acquires configuration operation for configuring the domain name into a domain name accessible by a data requester, and configures the domain name according to a domain name configuration flow included in the configuration operation.
S102, the front-end data platform acquires first data returned by the data interface corresponding to the data acquisition request.
The data interface corresponding to the data acquisition request is a target data interface, the target data interface belongs to the data interface of the back-end server, and the domain name of the back-end server to which the target data interface belongs may be the same as or different from the domain name of the front-end data.
The data acquisition request carries the unique identifier of the target data interface, and the unique identifier at least comprises the name of the target data interface and the domain name of the rear-end server to which the target data interface belongs. The front-end data platform can determine the domain name of the back-end server to which the target data interface belongs from the data acquisition request.
Under the condition that the domain name of the rear-end server to which the target data interface belongs is the same as that of the front-end data, the front-end data platform can directly send the data acquisition request to the target data interface, so that the data interface returns the first data.
Under the condition that the domain name of the rear-end server to which the target data interface belongs is different from the domain name of the front-end data, the front-end data platform can send the data acquisition request to the rear-end data platform server, and then the rear-end data platform server sends the data acquisition request to the target data interface, so that the target data interface returns the first data. The back end data platform server and the front end data platform belong to the front end and the back end of the same system.
The first data returned by the target data interface may be page data meeting the process requirement, or may be page data not meeting the process requirement.
S103, the front-end data platform generates simulation data with a first data structure.
The first data structure is a data structure of first data. In this embodiment, when the first data is page data that does not meet the process requirement, the front-end data platform may read a data structure of the first data from the first data, and generate simulation data having the first data structure.
The specific implementation manner of the step is as follows: and calling a preset open source tool to perform data filling on the first data structure to obtain simulation data. Wherein the first data structure specifies at least characteristics of a sequence of data elements included in the simulation data, the characteristics of the sequence of data elements including: the total number of data elements included in the data element sequence, the numerical value of the initial data element, and the incremental relationship between data elements in the data element sequence, specifically, the incremental relationship between any two adjacent data elements is the same.
In this embodiment, because the first data structure specifies the numerical value of the initial data element in the data element sequence and the incremental relationship between the data elements, and the incremental relationship between any two adjacent data elements is the same, the generated simulation data is an array having consecutive numerical values of the first data structure.
It should be noted that, for different first data structures, the simulation data having the first data structure may be generated by using an open source tool, so that generation of corresponding simulation data for different data structures may be achieved.
And S104, the front-end data platform sends the simulation data to the process, so that the process carries out page display according to the simulation data.
In this embodiment, it should be noted that, because the simulation data is generated by the front-end data platform calling an open source tool to perform data filling on the first data structure, if the page effect is not good after the process performs page display according to the simulation data, the front-end data platform may generate new simulation data by responding to the user to modify the first data structure, or generate new simulation data by responding to the user to modify the simulation data, and send the new simulation data to the process, so as to achieve the purpose of adjusting the page display effect.
According to the method, after the front-end data platform receives the data acquisition request sent by the process, the first data returned by the data interface corresponding to the data acquisition request is acquired, and the simulation data with the first data structure is generated. Compared with the manually written simulation data, the data obtained by the simulation of the front-end data platform has no influence of artificial subjective factors, so that the problems of incomplete data or discontinuous data and the like caused by the artificial subjective factors are solved.
Furthermore, after acquiring the first data returned by the data interface, the front-end data platform generates simulation data with a first data structure, and sends the simulation data to the process, so that the process performs page display according to the simulation data. That is to say, the process is to perform the page display according to the simulation data provided by the front-end data platform, but not to perform the page display according to the data provided by the data interface at the back end, so under such a condition, if the page display effect of the front-end application is not good, new simulation data can be directly provided for the front-end application through the front-end data platform, thereby avoiding the problems of low front-end development efficiency and high time cost caused by multiple data interactions performed between the front-end application and the data interface.
Furthermore, for different first data structures, the simulation data with the first data structure can be generated by utilizing an open source tool, so that data simulation for different data structures can be realized, and the method has good practicability.
In order to enable a process (e.g., a browser) to implement a cross-domain data request, where a domain name accessed by the process is different from a domain name of a server providing data for the process, another data processing method provided in this embodiment of the present application relates to the same steps, names, or terms and the like as those in the foregoing embodiment, and reference is made to the foregoing embodiment, which is not described herein again. As shown in fig. 2, the present embodiment may include the following steps:
s201, a front-end data platform receives a data acquisition request sent by a process.
The data acquisition request carries a unique identifier of a target data interface, and the target data interface is a data interface of a server for providing page data required by the process for the process.
S202, the front-end data platform sends the data acquisition request to the back-end data platform server, so that the back-end data platform server sends the data acquisition request to a data interface of the server corresponding to the data acquisition request, and sends first data returned by the data interface to the front-end data platform.
In this embodiment, the front-end data platform and the back-end data platform server belong to the front end and the back end of the same system. The data interface of the server corresponding to the data acquisition request is the target data interface.
After receiving a data acquisition request sent by a front-end data platform, a back-end data platform server determines a target data interface according to a unique identifier of the target data interface of the server carried in the data acquisition request, sends the data acquisition request to the target data interface, enables the target data interface to return first data, and sends the first data returned by the data interface to the front-end data platform.
S203, the front-end data platform judges whether the first data is page data required by the process, if not, S204 is executed, and if so, S205 is executed.
The specific implementation manner of the step is that the step comprises the steps A1 to A3:
step a1, locating and identifying the target field content included in the first data.
The target field content is the field content corresponding to the preset designated field. The designated fields are different for different data interfaces, and can be preset according to data available by the data interfaces.
And step A2, judging whether the content of the target field is a preset first value or a preset second value.
The first value is a preset value used for representing that the first data is page data required by the process. For example, the first value may be "true", which is a value preset to represent that the first data is page data required by the process.
The second value is a preset value for indicating that the first data is not page data required for the process. For example, the second value may be "false", which is a value preset to indicate that the first data is not page data required for the process.
Step A3, if the first value is the first value, determining the first data as the page data needed by the process.
Step a4, if the value is the second value, determines that the first data is not the page data required by the process.
S204, the front-end data platform sends the first data to the process, and the process displays the page according to the first data.
After receiving the first data, the process renders the first data to display a page corresponding to the first data.
S205, the front-end data platform acquires a first data structure from the first data.
The first data structure is a data structure of first data. The first data structure may be obtained from the first data by a preconfigured data structure obtaining tool, for example, a data structure obtaining configuration file. A more detailed procedure for obtaining a data structure of data from data can be referred to in the prior art. Wherein, the data structure acquisition tool is integrated in the front-end data platform in advance.
S206, the front-end data platform judges whether the data structure of the first data accords with a preset data structure of the page data, if so, S207 is executed, and if not, 208 is executed.
The specific implementation manner of determining whether the data structure of the first data is the data structure preset by the page data may be: and performing format verification on the data structure of the first data by using a data structure verification tool, such as a data structure verification configuration file, if the verification is passed, determining that the data structure of the first data is in accordance with a preset data structure of the page data, and if the verification is not passed, determining that the data structure of the first data is not in accordance with the preset data structure of the page data. Wherein, the data structure verification tool is integrated in the front-end data platform in advance. The specific process of verifying the data structure by using the preset data structure verification configuration file can refer to the prior art.
S207, the front-end data platform generates simulation data with a first data structure, and sends the simulation data to the process, so that the process performs page display according to the simulation data.
S208, the front-end data platform generates error prompt information, and returns the error prompt information to the process, so that the process displays the error prompt information.
And generating error prompt information for prompting the user that the data cannot be acquired under the condition that the data structure of the first data is not the preset data structure of the page data.
According to the method, after the front-end data platform receives the data acquisition request sent by the process, the first data returned by the data interface corresponding to the data acquisition request is acquired, and the simulation data with the first data structure is generated. Compared with the manually written simulation data, the data obtained by the simulation of the front-end data platform has no influence of artificial subjective factors, so that the problems of incomplete data or discontinuous data and the like caused by the artificial subjective factors are solved.
Furthermore, after acquiring the first data returned by the data interface, the front-end data platform generates simulation data with a first data structure, and sends the simulation data to the process, so that the process performs page display according to the simulation data. That is to say, the process is to perform the page display according to the simulation data provided by the front-end data platform, but not to perform the page display according to the data provided by the data interface at the back end, so under such a condition, if the page display effect of the front-end application is not good, new simulation data can be directly provided for the front-end application through the front-end data platform, thereby avoiding the problems of low front-end development efficiency and high time cost caused by multiple data interactions performed between the front-end application and the data interface.
Furthermore, because the front-end data platform receives the data acquisition request sent by the process, and then sends the data acquisition request to the back-end data platform server, so that the back-end data platform server sends the data acquisition request to the data interface of the server corresponding to the data acquisition request, and returns the data interface to the first data to be sent to the front-end data platform, that is, the data acquired by the front-end data platform server is acquired by the back-end data platform server from the data interface of other servers, based on the rule that data information interaction can be performed between the servers even if the domain names of the servers are different, even if the domain name of the data interface of the server corresponding to the data acquisition request sent by the process is different from the domain name accessed by the process, under the condition that the domain name accessed by the process is the same as the preset domain name of the front-end data platform, the process can also acquire data provided by data interfaces of other servers through a front-end data platform, so that the purpose that the process can carry out data request across domains is achieved.
Furthermore, for different first data structures, the simulation data with the first data structure can be generated by utilizing an open source tool, so that the simulation of different data structures can be realized, and the practicability is good.
The method provided by the application can be applied to data display of the Web page developed based on the java script programming language. Specifically, the front-end data platform is a front-end NodeJS service platform, and NodeJS is an open source code capable of running Java Script programming language on a back-end server. In the application, the front-end NodeJS service platform is a pre-established data service platform, an interface for simulating data is established in the front-end NodeJS service platform and used for generating the simulating data, and the front-end NodeJS service platform is provided with a domain name address which can be accessed by a browser. And the front end NodeJS service platform is provided with a corresponding rear end server which is called as a rear end NodeJS server.
Based on that the front-end data platform is the front-end NodeJS service platform, the present application provides another data processing method, and the present embodiment refers to the same steps, names, or terms, etc. as those in the above embodiments, and thus, the details are not repeated herein. Referring to fig. 3, the present embodiment may include the steps of:
s301, the front-end NodeJS service platform receives a data acquisition request sent by the browser.
S302, the front-end NodeJS service platform sends the data acquisition request to a NodeJS back-end server.
S303, the back-end NodeJS server sends the data acquisition request to a data interface of the server corresponding to the data acquisition request, so that the data interface of the server returns the first data.
S304, the rear end NodeJS server sends the first data to the front end NodeJS service platform.
S305, the front-end NodeJS service platform judges whether the first data is the data required by the browser, if so, S306 is executed, and if not, S307 is executed.
The front-end NodeJS service platform analyzes the first data, and the specific mode is that the front-end NodeJS service platform analyzes a field in the returned first data, and if the specified field in the first data is 'true', the first data returned by the data interface is determined to be the data required by the browser. If the designated field is "false", it proves that the data interface cannot provide the data required by the browser. It should be noted that the value of the designated field may be other predetermined values, and "true" and "false" are merely examples.
S306, after the front-end NodeJS service platform performs data filtering on the first data, the first data after the data filtering is sent to the browser, and the browser renders and displays the first data.
S307, the front-end NodeJS service platform verifies the data structure of the first data, if the verification of the data structure is successful, S308 is executed, and if the verification of the data structure is failed, S309 is executed.
S308, the front-end NodeJS service platform generates simulation data with a data structure of the first data by using the open source tool, and sends the simulation data to the browser, so that the browser renders and displays the simulation data.
The open source tool is integrated in the NodeJS service platform in advance, and the NodeJS service platform sends the simulation data to the browser through a preset simulation data interface.
S309, the front-end NodeJS service platform generates data abnormal information and sends the data abnormal information to the browser, so that the browser displays the data abnormal information.
According to the method, the data obtained by the front-end NodeJS service platform simulation is utilized, and compared with the simulation data compiled manually, the influence of artificial subjective factors does not exist, so that the problems of incomplete data or discontinuous data and the like caused by the artificial subjective factors are reduced.
Further, because the simulation data is generated by the front-end nodjs service platform and then returned to the browser, in such a case, if the page display effect of the browser is not good, new simulation data can be directly provided for the front-end application through the front-end nodjs service platform, so that the problems of low front-end development efficiency and high time cost caused by multiple data interaction between the front-end application and the data interface can be avoided.
Further, because the data acquired by the front-end nodess service platform is acquired by the rear-end nodess server from the data interfaces of other servers, and based on the rule that data information interaction can be performed between the servers even if the domain names of the servers are different, even if the domain name of the data interface of the server corresponding to the data acquisition request sent by the browser is different from the domain name accessed by the browser, under the condition that the domain name accessed by the browser is the same as the preset domain name of the front-end nodess service platform, the browser can also acquire the data provided by the data interfaces of other servers through the front-end nodess service platform, so that the purpose that the browser can perform data request across domains is achieved.
Furthermore, for different data structures, the open source tool can be utilized to generate simulation data corresponding to the data structures, so that simulation of different data structures can be realized, and the method has good practicability.
Fig. 4 is a schematic structural diagram of a data processing apparatus 400 according to an embodiment of the present application, including:
a receiving unit 401, configured to receive a data acquisition request sent by a process;
an obtaining unit 402, configured to obtain first data returned by a data interface corresponding to the data obtaining request;
a generating unit 403 for generating simulation data having a first data structure; the first data structure is a data structure of first data;
the sending unit 404 is configured to send the simulation data to the process, so that the process performs page display according to the simulation data.
Optionally, the apparatus further includes a setting unit 405, configured to set a domain name of the front-end data platform as a domain name accessed by the process.
Optionally, the apparatus further includes a determining unit 406, configured to locate and identify a target field content included in the first data, where the target field content is a field content corresponding to a preset specified field;
judging whether the content of the target field is a preset first numerical value or a preset second numerical value;
if the first numerical value is the first numerical value, determining that the first data are page data required by the process;
if the first data structure is the second value, acquiring the first data structure from the first data;
judging whether the first data structure accords with a preset data structure of page data or not;
and if the error prompt information does not meet the requirement, generating error prompt information, returning the error prompt information to the process, and displaying the error prompt information by the process.
Optionally, the determining unit 406 is further configured to, under the condition that it is determined that the first data is page data required by the process, send the first data to the process, so that the process performs page display according to the first data.
Optionally, the specific implementation manner of the obtaining unit 402 obtaining the first data returned by the data interface corresponding to the data obtaining request is as follows: and sending the data acquisition request to the back-end data platform server, so that the back-end data platform server sends the first data to the acquisition unit after acquiring the first data from the data interface.
Optionally, the specific implementation of the generating unit 403 generating the simulation data with the first data structure is as follows:
calling a preset open source tool to perform data filling on the first data structure to obtain simulation data; the first data structure specifies at least characteristics of a sequence of data elements included in the simulation data, the characteristics of the sequence of data elements including: the total number of the data elements included in the data element sequence, the numerical value of the initial data element and the incremental relationship among the data elements in the data element sequence; the incremental relationship between any two adjacent data elements is the same.
Optionally, the simulation data is a numerical array having the first data structure.
The device provided by this embodiment, after receiving a data acquisition request sent by a process, acquires first data returned by a data interface corresponding to the data acquisition request, and generates simulation data having a first data structure. Compared with the artificially written simulation data, the method has no influence of artificial subjective factors, thereby reducing the problems of incomplete data or discontinuous data and the like caused by the artificial subjective factors.
Furthermore, after first data returned by the data interface is acquired, simulation data with a first data structure is generated and sent to the process, so that the process can display pages according to the simulation data. That is to say, the device provided in this embodiment is not displayed in a page according to data provided by the data interface at the back end, so in such a case, if the page display effect of the front-end application is not good, new analog data can be directly provided for the front-end application through the device provided in this example, thereby avoiding the problems of low front-end development efficiency and high time cost caused by multiple data interactions performed between the front-end application and the data interface.
Fig. 5 is a schematic structural diagram of a data processing system 500 according to an embodiment of the present application, which includes: a front-end data platform 501 and a back-end data platform server 502;
the front-end data platform 501 is configured to send a data acquisition request to the back-end data platform server 502 after receiving the data acquisition request sent by the process;
the back-end data platform service 502 is configured to obtain first data from a data interface corresponding to the data obtaining request, and send the first data to the front-end data platform 501;
the front-end data platform 501 is further configured to generate simulation data with a first data structure, and send the simulation data to a process, so that the process performs page display according to the simulation data; the first data structure is a data structure of the first data.
In the system provided in this embodiment, after receiving a data acquisition request sent by a process, a front-end data platform acquires first data returned by a data interface corresponding to the data acquisition request, and generates simulation data having a first data structure. Compared with the manually written simulation data, the data obtained by the simulation of the front-end data platform has no influence of artificial subjective factors, so that the problems of incomplete data or discontinuous data and the like caused by the artificial subjective factors are solved.
Furthermore, after acquiring the first data returned by the data interface, the front-end data platform generates simulation data with a first data structure, and sends the simulation data to the process, so that the process performs page display according to the simulation data. That is to say, the process is to perform the page display according to the simulation data provided by the front-end data platform, but not to perform the page display according to the data provided by the data interface at the back end, so under such a condition, if the page display effect of the front-end application is not good, new simulation data can be directly provided for the front-end application through the front-end data platform, thereby avoiding the problems of low front-end development efficiency and high time cost caused by multiple data interactions performed between the front-end application and the data interface.
Furthermore, because the front-end data platform receives the data acquisition request sent by the process, and then sends the data acquisition request to the back-end data platform server, so that the back-end data platform server sends the data acquisition request to the data interface of the server corresponding to the data acquisition request, and returns the data interface to the first data to be sent to the front-end data platform, that is, the data acquired by the front-end data platform server is acquired by the back-end data platform server from the data interface of other servers, based on the rule that data information interaction can be performed between the servers even if the domain names of the servers are different, even if the domain name of the data interface of the server corresponding to the data acquisition request sent by the process is different from the domain name accessed by the process, under the condition that the domain name accessed by the process is the same as the preset domain name of the front-end data platform, the process can also acquire data provided by data interfaces of other servers through a front-end data platform, so that the purpose that the process can carry out data request across domains is achieved.
The present application further provides an electronic device 600, a schematic structural diagram of which is shown in fig. 6, including: a processor 601 and a memory 602, the memory 602 stores application programs, and the processor 601 is used for executing the application programs to execute the data processing method of the present application, namely, the following steps are executed:
a front-end data platform receives a data acquisition request sent by a process;
the front-end data platform acquires first data returned by a data interface corresponding to the data acquisition request;
the front-end data platform generates simulation data with a first data structure; the first data structure is a data structure of the first data;
and the front-end data platform sends the simulation data to the process, so that the process carries out page display according to the simulation data.
The present application also provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the method of data processing provided herein, namely to perform the steps of:
a front-end data platform receives a data acquisition request sent by a process;
the front-end data platform acquires first data returned by a data interface corresponding to the data acquisition request;
the front-end data platform generates simulation data with a first data structure; the first data structure is a data structure of the first data;
and the front-end data platform sends the simulation data to the process, so that the process carries out page display according to the simulation data.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for data processing, the method being applied to a front-end data platform, the method comprising:
receiving a data acquisition request sent by a process;
acquiring first data returned by a data interface corresponding to the data acquisition request;
generating simulation data with a first data structure, wherein the first data structure is the data structure of the first data;
and sending the simulation data to the process, so that the process carries out page display according to the simulation data.
2. The method of claim 1, wherein before receiving the data acquisition request sent by the process, further comprising:
obtaining a configuration operation for configuring a domain name as a domain name accessible to a data requestor;
configuring a domain name based on the configuration operation.
3. The method according to claim 1, wherein the obtaining first data returned by the data interface corresponding to the data obtaining request includes:
and sending the data acquisition request to a back-end data platform server, so that the back-end data platform server returns the first data after acquiring the first data from the data interface.
4. The method according to any one of claims 1 to 3, further comprising, after the obtaining the first data returned by the data interface corresponding to the data obtaining request and before the generating the simulation data having the first data structure:
positioning and identifying target field content included in the first data, wherein the target field content is field content corresponding to a preset specified field;
judging whether the content of the target field is a preset first numerical value or a preset second numerical value;
if the first numerical value is the first numerical value, determining that the first data are page data required by the process;
if the first data structure is the second value, acquiring the first data structure from the first data;
judging whether the first data structure conforms to a preset data structure of the page data;
and if the error prompt information does not meet the requirement, generating error prompt information, returning the error prompt information to the process, and displaying the error prompt information by the process.
5. The method of claim 4, further comprising: and under the condition that the first data is determined to be the page data required by the process, sending the first data to the process, so that the process performs page display according to the first data.
6. The method of claim 1, wherein generating the simulated data having the first data structure comprises:
calling a preset open source tool to perform data filling on the first data structure to obtain the simulation data; the first data structure specifies at least characteristics of a sequence of data elements included in the simulation data, the characteristics of the sequence of data elements including: the total number of data elements included in the data element sequence, the numerical value of the initial data element, and the incremental relationship among the data elements in the data element sequence; the incremental relationship between any two adjacent ones of the data elements is the same.
7. The method of claim 1, wherein the analog data is a numerically sequential array having the first data structure.
8. A data processing apparatus, comprising:
the receiving unit is used for receiving a data acquisition request sent by a process;
the acquisition unit is used for acquiring first data returned by the data interface corresponding to the data acquisition request;
a generating unit for generating simulation data having a first data structure; the first data structure is a data structure of the first data;
and the sending unit is used for sending the simulation data to the process so that the process can display a page according to the simulation data.
9. An electronic device, comprising: a processor and a memory for storing a program; the processor is configured to execute the program to implement the method of data processing according to any one of claims 1 to 7.
10. A storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of data processing according to any one of claims 1-7.
11. A system for data processing, comprising: a front-end data platform and a back-end data platform server;
the front-end data platform is used for receiving a data acquisition request sent by a process and then sending the data acquisition request to the back-end data platform server;
the back-end data platform server is used for acquiring first data from a data interface corresponding to the data acquisition request and sending the first data to the front-end data platform;
the front-end data platform is further used for generating simulation data with the first data structure, sending the simulation data to the process and enabling the process to display a page according to the simulation data;
the first data structure is a data structure of the first data.
CN202010898719.7A 2020-08-31 2020-08-31 Data processing method, device and system, electronic equipment and storage medium Pending CN114116244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010898719.7A CN114116244A (en) 2020-08-31 2020-08-31 Data processing method, device and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010898719.7A CN114116244A (en) 2020-08-31 2020-08-31 Data processing method, device and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114116244A true CN114116244A (en) 2022-03-01

Family

ID=80359923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010898719.7A Pending CN114116244A (en) 2020-08-31 2020-08-31 Data processing method, device and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114116244A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114936104A (en) * 2022-07-19 2022-08-23 杭州玖玖盾信息科技有限公司 Analog data processing method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114936104A (en) * 2022-07-19 2022-08-23 杭州玖玖盾信息科技有限公司 Analog data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109325195B (en) Rendering method and system for browser, computer device and computer storage medium
CN111782330B (en) Page data acquisition method, device and equipment based on Web application
CN109062806B (en) Program testing method, system, device and computer readable storage medium
CN108572823B (en) Front-end and back-end development management method and system based on interface engine
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN108459850B (en) Method, device and system for generating test script
US20110161063A1 (en) Method, computer program product and apparatus for providing an interactive network simulator
CN108111364B (en) Service system testing method and device
CN110750446A (en) System testing method and related device
CN114116244A (en) Data processing method, device and system, electronic equipment and storage medium
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN109815083B (en) Application crash monitoring method and device, electronic equipment and medium
CN114003293B (en) Interface management method, device, electronic equipment and readable storage medium
CN110851688A (en) Page request method, device and equipment
CN114841119B (en) Register modeling method, device, equipment and medium in multi-user mode
CN115576711A (en) Method and system for simulating returned data and computing equipment
CN113703753B (en) Method and device for product development and product development system
CN111737090B (en) Log simulation method and device, computer equipment and storage medium
CN114579461A (en) Browser compatibility detection method and related equipment
CN112948053A (en) Hard disk performance test method, device, server and medium
CN110069395B (en) Method and device for simulating asynchronous interface, storage medium and computer equipment
CN113051178A (en) Test data construction method, device, equipment and medium
CN113986641B (en) Method, system, equipment and storage medium for verifying chip hardware function
CN110309038B (en) Performance test method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination