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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

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.一种数据处理的方法,其特征在于,所述方法应用于前端数据平台,所述方法包括:1. A method for data processing, wherein the method is applied to a front-end data platform, and the method comprises: 接收进程发送的数据获取请求;Receive the data acquisition request sent by the process; 获取所述数据获取请求对应的数据接口返回的第一数据;obtaining the first data returned by the data interface corresponding to the data obtaining request; 生成具有第一数据结构的模拟数据,所述第一数据结构为所述第一数据的数据结构;generating simulated data having a first data structure, the first data structure being a data structure of the first data; 将所述模拟数据发送至所述进程,使所述进程依据所述模拟数据进行页面展示。Sending the simulated data to the process, so that the process performs page display according to the simulated data. 2.根据权利要求1所述的方法,其特征在于,在所述接收进程发送的数据获取请求之前,还包括:2. The method according to claim 1, wherein before the data acquisition request sent by the receiving process, the method further comprises: 获取用于将域名配置为数据请求方可访问域名的配置操作;Get the configuration operation used to configure the domain name to be accessible by the data requester; 基于所述配置操作,配置域名。Based on the configuration operation, the domain name is configured. 3.根据权利要求1所述的方法,其特征在于,所述获取所述数据获取请求对应的数据接口返回的第一数据,包括:3. The method according to claim 1, wherein the obtaining the first data returned by the data interface corresponding to the data obtaining request comprises: 将所述数据获取请求发送至后端数据平台服务器,使所述后端数据平台服务器从所述数据接口获取所述第一数据之后,返回所述第一数据。The data acquisition request is sent to the 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.根据权利要求1至3任意一项所述的方法,其特征在于,在所述获取所述数据获取请求对应的数据接口返回的第一数据之后,在所述生成具有第一数据结构的模拟数据之前,还包括:4. The method according to any one of claims 1 to 3, wherein after the acquiring the first data returned by the data interface corresponding to the data acquisition request, in the generating the data having the first data structure Before simulating data, also include: 定位并识别所述第一数据中包括的目标字段内容,所述目标字段内容为预设的指定字段对应的字段内容;Locate and identify the target field content included in the first data, where the target field content is the field content corresponding to the preset designated field; 判断所述目标字段内容是否为预设的第一数值或者预设的第二数值;Judging whether the content of the target field is a preset first value or a preset second value; 如果是所述第一数值,则确定所述第一数据为所述进程所需的页面数据;If it is the first value, determining that the first data is page data required by the process; 如果是所述第二数值,则从所述第一数据中获取所述第一数据结构;If it is the second value, obtain the first data structure from the first data; 判断所述第一数据结构是否符合所述页面数据预设的数据结构;judging whether the first data structure conforms to the data structure preset by the page data; 如果不符合,则生成错误提示信息,并将所述错误提示信息返回至所述进程,使所述进程展示所述错误提示信息。If it does not match, an error message is generated, and the error message is returned to the process, so that the process displays the error message. 5.根据权利要求4所述的方法,其特征在于,还包括:在确定所述第一数据为所述进程所需的所述页面数据的情况下,将所述第一数据发送至所述进程,使所述进程依据所述第一数据进行页面展示。5. The method according to claim 4, further comprising: in the case that the first data is determined to be the page data required by the process, sending the first data to the a process, enabling the process to display a page according to the first data. 6.根据权利要求1所述的方法,其特征在于,所述生成具有所述第一数据结构的模拟数据,包括:6. The method according to claim 1, wherein the generating the simulation data with the first data structure comprises: 调用预设的开源工具对所述第一数据结构进行数据填充,得到所述模拟数据;所述第一数据结构至少规定所述模拟数据中包括的数据元素序列的特征,所述数据元素序列的特征包括:所述数据元素序列包括的数据元素的总个数、起始数据元素的数值、以及所述数据元素序列中,所述数据元素之间的递增关系;任意两个相邻的所述数据元素之间的所述递增关系相同。Calling a preset open source tool to fill the first data structure with data to obtain the simulation data; the first data structure at least specifies the characteristics of the data element sequence included in the simulation data, and the data element sequence of the data element sequence. Features include: the total number of data elements included in the data element sequence, the value of the initial data element, and the incremental relationship between the data elements in the data element sequence; any two adjacent The incremental relationship between data elements is the same. 7.根据权利要求1所述的方法,其特征在于,所述模拟数据为具有所述第一数据结构的数值连续的数组。7 . The method according to claim 1 , wherein the simulation data is a numerically continuous array having the first data structure. 8 . 8.一种数据处理装置,其特征在于,包括:8. A data processing device, comprising: 接收单元,用于接收进程发送的数据获取请求;a receiving unit, configured to receive a data acquisition request sent by a process; 获取单元,用于获取所述数据获取请求对应的数据接口返回的第一数据;an acquisition unit, configured to acquire the first data returned by the data interface corresponding to the data acquisition request; 生成单元,用于生成具有第一数据结构的模拟数据;所述第一数据结构为所述第一数据的数据结构;a generating unit for generating simulation data with a first data structure; the first data structure is a data structure of the first data; 发送单元,用于将所述模拟数据发送至所述进程,使所述进程依据所述模拟数据进行页面展示。A sending unit, configured to send the simulation data to the process, so that the process can display a page according to the simulation data. 9.一种电子设备,其特征在于,包括:处理器和存储器,所述存储器用于存储程序;所述处理器用于运行所述程序,以实现权利要求1-7任一项所述的数据处理的方法。9. An electronic device, comprising: a processor and a memory, wherein the memory is used for storing a program; the processor is used for running the program to realize the data according to any one of claims 1-7 method of processing. 10.一种存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行权利要求1-7任一项所述的数据处理的方法。10 . A storage medium, characterized in that, the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to execute the data processing method according to any one of claims 1 to 7 . 11.一种数据处理的系统,其特征在于,包括:前端数据平台和后端数据平台服务器;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 configured to, after receiving the data acquisition request sent by the process, send the data acquisition request to the back-end data platform server; 所述后端数据平台服务器用于,从所述数据获取请求对应的数据接口获取第一数据,并将所述第一数据发送至所述前端数据平台;The back-end data platform server is configured to acquire first data from a data interface corresponding to the data acquisition request, and send the first data to the front-end data platform; 所述前端数据平台还用于,生成具有所述第一数据结构的模拟数据,并将所述模拟数据发送至所述进程,使所述进程依据所述模拟数据进行页面展示;The front-end data platform is further configured to generate simulation data with the first data structure, and send the simulation data to the process, so that the process can 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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345543A (en) * 2018-03-02 2018-07-31 财付通支付科技有限公司 A kind of data processing method, device, equipment and storage medium
CN109688202A (en) * 2018-12-04 2019-04-26 北京腾云天下科技有限公司 A kind of processing method of interface data, calculates equipment and storage medium at device
CN109726108A (en) * 2018-06-04 2019-05-07 平安普惠企业管理有限公司 Front-end code test method, device, system and medium based on analogue data
CN111459484A (en) * 2020-03-30 2020-07-28 星辰天合(北京)数据科技有限公司 Method for simulating back-end data during separate development of front end and back end of webpage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345543A (en) * 2018-03-02 2018-07-31 财付通支付科技有限公司 A kind of data processing method, device, equipment and storage medium
CN109726108A (en) * 2018-06-04 2019-05-07 平安普惠企业管理有限公司 Front-end code test method, device, system and medium based on analogue data
CN109688202A (en) * 2018-12-04 2019-04-26 北京腾云天下科技有限公司 A kind of processing method of interface data, calculates equipment and storage medium at device
CN111459484A (en) * 2020-03-30 2020-07-28 星辰天合(北京)数据科技有限公司 Method for simulating back-end data during separate development of front end and back end of webpage

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
CN106648690B (en) Automatic code generation method and device
CN107402880B (en) Test method and electronic equipment
CN108572823B (en) Front-end and back-end development management method and system based on interface engine
CN109062806B (en) Program testing method, system, device and computer readable storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
US8660833B2 (en) Method, computer program product and apparatus for providing an interactive network simulator
CN102880532A (en) Cloud technology-based test system and method
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN112306881A (en) Simulation data generation method, device, equipment and storage medium
CN108459850B (en) Method, device and system for generating test script
CN110471657A (en) The generation method and device of Website page
CN110750446A (en) System testing method and related device
CN112948053A (en) Hard disk performance test method, device, server and medium
CN111124908B (en) Interface testing method and device and computer readable storage medium
CN114579461B (en) Browser compatibility detection method and related equipment
CN114116244A (en) Data processing method, device and system, electronic equipment and storage medium
CN114338846B (en) Message testing method and device
CN112564996B (en) Pressure test flow scheduling, control method, equipment and computer readable medium
CN112612700B (en) Interface testing method and device and electronic equipment
CN114003293B (en) Interface management method, device, electronic equipment and readable storage medium
CN110851688A (en) Page request method, device and equipment
CN114285779B (en) Processing method, device and system of test request
CN115576711A (en) Method and system for simulating returned data and computing equipment
CN114063990A (en) A method, system and related equipment for configuring and displaying function introduction language
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