Data processing method, device and system, electronic device and storage medium

By generating simulated data with the same data structure on the front-end data platform, the data incomplete or incoherent problems caused by manual writing of simulated data in the prior art are solved, which improves the efficiency of front-end development and reduces time costs.

CN114116244BActive Publication Date: 2025-04-25SO-YOUNG INT INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010898719.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-31
Publication Date
2025-04-25
Estimated Expiration
2040-08-31

AI Technical Summary

Technical Problem

In the prior art, when obtaining data, front-end applications often need to manually write simulated data because the data interface cannot provide the required data, which has the problem of incomplete or incoherent data, thereby reducing the efficiency of front-end development and increasing time cost.

Method used

By receiving data acquisition requests on the front-end data platform, obtaining the data returned by the data interface, and generating simulated data with the same data structure, sending it to the process for page display, avoiding the step of manually writing simulated data.

Benefits of technology

It reduces the incomplete or incoherent data caused by human subjective factors, improves the efficiency of front-end development, reduces time costs, and avoids the frequent interaction between front-end applications and data interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116244B_ABST
    Figure CN114116244B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and system, electronic device and storage medium for data processing. After the front-end data platform receives the data acquisition request sent by the process, it obtains the first data returned by the data interface corresponding to the data acquisition request, and generates simulation data with a first data structure. The data obtained by simulation using the front-end data platform can reduce problems such as incomplete data or data incoherence caused by human subjective factors. And the process is displayed on the page according to the simulation data provided by the front-end data platform, rather than on the page according to the data provided by the back-end data interface. Therefore, if the page display effect of the front-end application is not good, the front-end application can be provided with new simulation data directly through the front-end data platform, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information, and in particular to a data processing method, device and system, electronic equipment and storage medium. Background Art

[0002] During software development, it is usually necessary to obtain the data required by the front-end application from the back-end data interface. However, in many cases, the data required by the front-end application does not exist in the data interface. Therefore, in order not to affect the development progress of the front-end application, it is necessary to simulate the data required by the front-end application.

[0003] In the prior art, simulation data is usually manually written by back-end developers and then returned to the front-end application through the back-end data interface. However, due to human subjective factors, the manually written simulation data often has problems such as incomplete data or data incoherence, resulting in poor page presentation of the front-end application. Furthermore, since the data required by the front-end application is provided through the back-end data interface, the front-end application uses the data provided by the back-end data interface for page display. However, if the display effect is not good, the front-end application needs to perform multiple data interactions with the back-end data interface, which not only reduces the efficiency of front-end development, but also increases the time cost. Summary of the invention

[0004] The present application provides a data processing method and system, the purpose of which is to solve the problem of how to automatically generate simulation data and avoid the problem that when the front-end developer needs to modify the data, the back-end developer needs to coordinate online at the same time.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A data processing method, the method being applied to a front-end data platform, the method comprising:

[0007] Receive data acquisition request sent by the process;

[0008] Acquire first data returned by the data interface corresponding to the data acquisition request;

[0009] generating simulation data having a first data structure, wherein the first data structure is a data structure of the first data;

[0010] The simulation data is sent to the process, so that the process displays the page according to the simulation data.

[0011] The above method may, optionally, further include, before receiving the data acquisition request sent by the process:

[0012] Get a configuration operation for configuring a domain name as a domain name accessible to a data requester;

[0013] Based on the configuration operation, a domain name is configured.

[0014] In the above method, optionally, obtaining the first data returned by the data interface corresponding to the data acquisition request includes:

[0015] The data acquisition request is sent to the backend data platform server, so that the backend data platform server returns the first data after acquiring the first data from the data interface.

[0016] The above method may, optionally, after acquiring the first data returned by the data interface corresponding to the data acquisition request and before generating the simulation data having the first data structure, further include:

[0017] Locating and identifying target field content included in the first data, where the target field content is field content corresponding to a preset designated field;

[0018] Determining whether the target field content is a preset first value or a preset second value;

[0019] If it is the first value, determining that the first data is page data required by the process;

[0020] If it is the second value, obtaining the first data structure from the first data;

[0021] Determining whether the first data structure conforms to a preset data structure of the page data;

[0022] If not, an error prompt message is generated and the error prompt message is returned to the process so that the process displays the error prompt message.

[0023] The above method may optionally further include: when it is determined that the first data is the page data required by the process, sending the first data to the process so that the process displays the page according to the first data.

[0024] In the above method, optionally, the generating of simulation data having the first data structure includes:

[0025] Call 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 characteristics of the data element sequence include: the total number of data elements included in the data element sequence, the value of the starting data element, and the increasing relationship between the data elements in the data element sequence; the increasing relationship between any two adjacent data elements is the same.

[0026] In the above method, optionally, the simulation data is an array with continuous values ​​having the first data structure.

[0027] A data processing device, comprising:

[0028] A receiving unit, used for receiving a data acquisition request sent by a process;

[0029] An acquiring unit, configured to acquire first data returned by the data interface corresponding to the data acquisition request;

[0030] A generating unit, configured to generate simulation data having a first data structure; the first data structure is a data structure of the first data;

[0031] The sending unit is used to send the simulation data to the process, so that the process displays the page according to the simulation data.

[0032] An electronic device comprises: a processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program, using the above-mentioned data processing method.

[0033] A storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are run on a computer, the computer executes the above-mentioned data processing method.

[0034] A data processing system, comprising: a front-end data platform and a back-end data platform server;

[0035] The front-end data platform is used to send the data acquisition request to the back-end data platform server after receiving the data acquisition request sent by the process;

[0036] The backend data platform server is used to obtain the first data from the data interface corresponding to the data acquisition request, and send the first data to the frontend data platform;

[0037] The front-end data platform is also used to generate simulation data having the first data structure, and send the simulation data to the process so that the process displays a page based on the simulation data; the first data structure is the data structure of the first data.

[0038] The method described in the present application is that after the front-end data platform receives the data acquisition request sent by the process, it obtains the first data returned by the data interface corresponding to the data acquisition request, and generates simulation data with a first data structure. Compared with the artificially written simulation data, the data obtained by simulation using the front-end data platform is not affected by human subjective factors, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors.

[0039] Furthermore, after the front-end data platform obtains the first data returned by the data interface, it generates simulation data with a first data structure, and sends the simulation data to the process, so that the process displays the page according to the simulation data. In other words, the process displays the page according to the simulation data provided by the front-end data platform, rather than the data provided by the back-end data interface. Therefore, in this case, if the page display effect of the front-end application is not good, the front-end data platform can be used to directly provide new simulation data to the front-end application, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;

[0042] Figure 2 A flowchart of another data processing method provided in an embodiment of the present application;

[0043] Figure 3 A flowchart of another data processing method provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of the structure of a data processing system provided in an embodiment of the present application;

[0046] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In software development, it is usually necessary to obtain the data required by the front-end application from the data interface, but the data interface sometimes cannot provide the data required by the front-end application. In this case, data simulation is required to simulate the data required by the front-end application.

[0048] The existing technology is that the back-end developers manually write simulated data and then return it to the front-end application through the back-end data interface. The problems of this processing method are:

[0049] First, due to human subjective factors, manually compiled simulation data often has problems such as incomplete data or incoherent data;

[0050] Second, since the data required by the front-end application is provided through the back-end data interface, if the page display effect of the front-end application is not good, the front-end application needs to interact with the back-end data interface multiple times, which not only reduces the efficiency of front-end development, but also increases the time cost.

[0051] In order to solve the above problems, the data processing method provided in the embodiment of the present application generates simulation data through a pre-created front-end data platform, and sends the simulation data to the front-end application, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors, and avoiding the problems of low development efficiency and high time cost caused by multiple data operations between the front-end application and the data interface.

[0052] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0053] Figure 1 A data processing method provided in an embodiment of the present application may include the following steps:

[0054] S101, the front-end data platform receives a data acquisition request sent by a process.

[0055] The process can be a front-end application, such as a browser. The front-end data platform is pre-deployed in the front-end system, and the front-end data platform has a preset domain name. The data acquisition request carries the unique identifier of the target data interface, which includes at least the name of the target data interface and the domain name of the back-end server to which the target data interface belongs. The target data interface is a data interface of a server used to provide the process with the page data required by the process. The process can send a data acquisition request to the front-end data platform by making the domain name accessed the same as the preset domain name of the front-end data platform.

[0056] Among them, the configuration process of the domain name of the front-end data platform can be: the front-end data platform obtains a configuration operation for configuring the domain name as a domain name accessible to the data requester, and configures the domain name according to the domain name configuration process included in the configuration operation.

[0057] S102: The front-end data platform obtains first data returned by the data interface corresponding to the data acquisition request.

[0058] The data interface corresponding to the data acquisition request is the target data interface, which belongs to the data interface of the backend server. The domain name of the backend server to which the target data interface belongs may be the same as or different from the domain name of the frontend data.

[0059] Since the data acquisition request carries the unique identifier of the target data interface, which at least includes the name of the target data interface and the domain name of the backend server to which the target data interface belongs, the front-end data platform can determine the domain name of the backend server to which the target data interface belongs from the data acquisition request.

[0060] When the domain name of the backend server to which the target data interface belongs is the same as the domain name 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.

[0061] When the domain name of the backend server to which the target data interface belongs is different from the domain name of the frontend data, the frontend data platform can send a data acquisition request to the backend data platform server, and then the backend data platform server sends the data acquisition request to the target data interface, so that the target data interface returns the first data. The backend data platform server and the frontend data platform belong to the frontend and backend of the same system.

[0062] The first data returned by the target data interface may be page data that meets the process requirement, or may be page data that does not meet the process requirement.

[0063] S103: The front-end data platform generates simulation data having a first data structure.

[0064] The first data structure is the data structure of the first data. In this embodiment, when the first data is page data that does not meet the process requirements, the front-end data platform can read the data structure of the first data from the first data and generate simulation data with the first data structure.

[0065] The specific implementation method of this step is: calling a preset open source tool to fill the first data structure with data to obtain simulation data. The first data structure at least specifies the characteristics of the data element sequence included in the simulation data, and the characteristics of the data element sequence include: the total number of data elements included in the data element sequence, the value of the starting data element, and the increasing relationship between the data elements in the data element sequence. Specifically, the increasing relationship between any two adjacent data elements is the same.

[0066] In this embodiment, because the first data structure specifies the numerical value of the starting data element in the data element sequence, the increasing relationship between the data elements, and the increasing relationship between any two adjacent data elements is the same, the generated simulation data is an array with continuous numerical values ​​having the first data structure.

[0067] It should be noted that, for different first data structures, open source tools can be used to generate simulation data having the first data structure, thereby achieving generation of corresponding simulation data for different data structures.

[0068] S104. The front-end data platform sends the simulation data to the process, so that the process displays the page according to the simulation data.

[0069] In the present embodiment, it should be noted that, because the simulation data is generated by the front-end data platform calling the open source tool to fill the first data structure with data, if the page effect is not good after the process displays the page based on the simulation data, the front-end data platform can generate new simulation data in response to the user modifying the first data structure, or generate new simulation data in response to the user modifying the simulation data and send the new simulation data to the process, so as to achieve the purpose of adjusting the page display effect.

[0070] The method described in the present application is that after the front-end data platform receives the data acquisition request sent by the process, it obtains the first data returned by the data interface corresponding to the data acquisition request, and generates simulation data with a first data structure. Compared with the artificially written simulation data, the data obtained by simulation using the front-end data platform is not affected by human subjective factors, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors.

[0071] Furthermore, after the front-end data platform obtains the first data returned by the data interface, it generates simulation data with a first data structure, and sends the simulation data to the process, so that the process displays the page according to the simulation data. In other words, the process displays the page according to the simulation data provided by the front-end data platform, rather than the data provided by the back-end data interface. Therefore, in this case, if the page display effect of the front-end application is not good, the front-end data platform can be used to directly provide new simulation data to the front-end application, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost.

[0072] Furthermore, for different first data structures, open source tools can be used to generate simulation data having the first data structure, thereby enabling data simulation for different data structures, which has good practicality.

[0073] In order to enable a process (such as a browser) to perform cross-domain data requests, that is, the domain name accessed by the process is different from the domain name of the server that provides data to the process, another data processing method provided in an embodiment of the present application involves the same steps, names or terms as those in the above embodiment, and the above embodiment is referred to and will not be repeated here. Figure 2 As shown, this embodiment may include the following steps:

[0074] S201, the front-end data platform receives a data acquisition request sent by a process.

[0075] 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 used to provide a process with page data required by the process.

[0076] S202. The front-end data platform sends a 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 sends the first data returned by the data interface to the front-end data platform.

[0077] In this embodiment, the front-end data platform and the back-end data platform server belong to the front-end and back-end of the same system. The data interface of the server corresponding to the data acquisition request is the above-mentioned target data interface.

[0078] After the back-end data platform server receives the data acquisition request sent by the front-end data platform, it determines the target data interface based on the unique identifier of the target data interface of the server carried in the data acquisition request, and 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 then sends the first data returned by the data interface to the front-end data platform.

[0079] S203, the front-end data platform determines whether the first data is page data required by the process, if not, execute S204, if yes, execute S205.

[0080] The specific implementation of this step includes steps A1 to A3:

[0081] Step A1: locate and identify the target field content included in the first data.

[0082] The target field content is the field content corresponding to the preset designated field. For different data interfaces, the designated field is different, and the designated field can be preset according to the data that can be provided by the data interface.

[0083] Step A2: Determine whether the target field content is a preset first value or a preset second value.

[0084] The first value is a preset value used to indicate that the first data is page data required by the process. For example, the first value may be "true", and "true" is preset as a value indicating that the first data is page data required by the process.

[0085] The second value is a preset value used to indicate that the first data is not page data required by the process. For example, the second value may be "false", which is preset as a value indicating that the first data is not page data required by the process.

[0086] Step A3: If it is the first value, determine that the first data is page data required by the process.

[0087] Step A4: If it is the second value, it is determined that the first data is not page data required by the process.

[0088] S204: The front-end data platform sends the first data to the process, so that the process displays the page according to the first data.

[0089] After the process receives the first data, it can display a page corresponding to the first data by rendering the first data.

[0090] S205. The front-end data platform obtains a first data structure from the first data.

[0091] The first data structure is a data structure of the first data. The first data structure can be obtained from the first data by a pre-configured data structure acquisition tool, for example, a data structure acquisition configuration file. A more detailed process of obtaining the data structure of the data from the data can refer to the prior art. The data structure acquisition tool is pre-integrated in the front-end data platform.

[0092] S206, the front-end data platform determines whether the data structure of the first data conforms to the preset data structure of the page data, if yes, execute S207, if no, execute 208.

[0093] The specific implementation method of determining whether the data structure of the first data is the data structure preset for the page data may be: using a data structure verification tool, such as a data structure verification configuration file, to perform format verification on the data structure of the first data; if the verification passes, it is determined that the data structure of the first data conforms to the data structure preset for the page data; if the verification fails, it is determined that the data structure of the first data does not conform to the data structure preset for the page data. The data structure verification tool is pre-integrated in the front-end data platform. The specific process of verifying the data structure using the preset data structure verification configuration file may refer to the prior art.

[0094] S207. The front-end data platform generates simulation data having a first data structure, and sends the simulation data to the process, so that the process displays the page according to the simulation data.

[0095] S208. The front-end data platform generates an error prompt message and returns the error prompt message to the process, so that the process displays the error prompt message.

[0096] When the data structure of the first data is not the preset data structure of the page data, an error prompt message is generated to prompt the user that the data cannot be obtained.

[0097] The method described in the present application is that after the front-end data platform receives the data acquisition request sent by the process, it obtains the first data returned by the data interface corresponding to the data acquisition request, and generates simulation data with a first data structure. Compared with the artificially written simulation data, the data obtained by simulation using the front-end data platform is not affected by human subjective factors, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors.

[0098] Furthermore, after the front-end data platform obtains the first data returned by the data interface, it generates simulation data with a first data structure, and sends the simulation data to the process, so that the process displays the page according to the simulation data. In other words, the process displays the page according to the simulation data provided by the front-end data platform, rather than the data provided by the back-end data interface. Therefore, in this case, if the page display effect of the front-end application is not good, the front-end data platform can be used to directly provide new simulation data to the front-end application, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost.

[0099] Furthermore, after the front-end data platform receives the data acquisition request sent by the process, it 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 first data from the data interface to the front-end data platform. In other words, the data acquired by the front-end data platform is obtained by the back-end data platform server from the data interfaces of other servers. Based on the rule that servers can exchange data information even if the domain names of the servers are different, 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, when 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 obtain the data provided by the data interfaces of other servers through the front-end data platform, thereby achieving the goal of the process being able to make data requests across domains.

[0100] Furthermore, for different first data structures, open source tools can be used to generate simulation data having the first data structure, thereby simulating different data structures, which has good practicality.

[0101] The method provided in this application can be applied to the data display of a Web page developed based on the javascript programming language. Specifically, the front-end data platform is a front-end NodeJS service platform, and NodeJS is an open source code that can run the JavaScript programming language on the back-end server. In this application, the front-end NodeJS service platform is a pre-built data service platform, and an interface for simulated data is created in the front-end NodeJS service platform for generating simulated data. The front-end NodeJS service platform has a domain name address that can be accessed by a browser. Moreover, the front-end NodeJS service platform has a corresponding back-end server, referred to as a back-end NodeJS server.

[0102] Based on the front-end data platform being the front-end NodeJS service platform, the present application provides another data processing method. This embodiment involves the same steps, names or terms as the above embodiment, and the above embodiment is referred to and will not be repeated here. Figure 3 , this embodiment may include the following steps:

[0103] S301, the front-end NodeJS service platform receives the data acquisition request sent by the browser.

[0104] S302, the front-end NodeJS service platform sends the data acquisition request to the NodeJS back-end server.

[0105] S303: The backend NodeJS server sends the data acquisition request to the data interface of the server corresponding to the data acquisition request, so that the data interface of the server returns the first data.

[0106] S304, the backend NodeJS server sends the first data to the frontend NodeJS service platform.

[0107] S305. The front-end NodeJS service platform determines whether the first data is the data required by the browser. If yes, execute S306; if no, execute S307.

[0108] The front-end NodeJS service platform analyzes the first data. Specifically, the front-end NodeJS service platform analyzes the fields in the returned first data. If the specified field included in the first data is "true", it is determined that the first data returned by the data interface is the data required by the browser. If the specified 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 specified field can also be other agreed values, and "true" and "false" are only examples.

[0109] S306: After filtering the first data, the front-end NodeJS service platform sends the filtered first data to the browser, so that the browser renders and displays the first data.

[0110] S307, the front-end NodeJS service platform verifies the data structure of the first data. If the data structure verification succeeds, S308 is executed; if the data structure verification fails, S309 is executed.

[0111] S308. The front-end NodeJS service platform generates simulation data having the data structure of the first data using an open source tool, and sends the simulation data to the browser, so that the browser renders and displays the simulation data.

[0112] The open source tool is pre-integrated into the NodeJS service platform, and the NodeJS service platform sends the simulation data to the browser through a preset simulation data interface.

[0113] S309, the front-end NodeJS service platform generates data abnormality information, and sends the data abnormality information to the browser, so that the browser displays the data abnormality information.

[0114] The method described in the present application uses the data simulated by the front-end NodeJS service platform. Compared with manually written simulation data, the data is not affected by human subjective factors, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors.

[0115] Furthermore, because the simulation data is generated by the front-end NodeJS service platform and then returned to the browser, in this case, if the page display effect in the browser is not good, the front-end NodeJS service platform can directly provide new simulation data to the front-end application, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost.

[0116] Furthermore, because the data obtained by the front-end NodeJS service platform is obtained by the back-end NodeJS server from the data interfaces of other servers, based on the rule that servers can exchange data information even if the domain names of the servers are different, even if the domain name of the server's data interface corresponding to the data acquisition request sent by the browser is different from the domain name accessed by the browser, when the domain name accessed by the browser is the same as the preset domain name of the front-end NodeJS service platform, the browser can also obtain the data provided by the data interfaces of other servers through the front-end NodeJS service platform, thereby achieving the goal of the browser being able to make data requests across domains.

[0117] Furthermore, for different data structures, open source tools can be used to generate simulation data corresponding to the data structure, thereby realizing the simulation of different data structures, which has good practicality.

[0118] Figure 4 A schematic diagram of a data processing device 400 provided in an embodiment of the present application includes:

[0119] Receiving unit 401, used to receive a data acquisition request sent by a process;

[0120] An acquiring unit 402 is used to acquire first data returned by a data interface corresponding to a data acquisition request;

[0121] A generating unit 403 is used to generate simulation data having a first data structure; the first data structure is a data structure of the first data;

[0122] The sending unit 404 is used to send the simulation data to the process so that the process displays the page according to the simulation data.

[0123] Optionally, the above-mentioned device further includes a setting unit 405, which is used to set the domain name of the front-end data platform as the domain name accessed by the process.

[0124] Optionally, the above device further includes a judgment unit 406, which is used to 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;

[0125] Determine whether the target field content is a preset first value or a preset second value;

[0126] If it is the first value, determining that the first data is page data required by the process;

[0127] If it is the second value, obtaining the first data structure from the first data;

[0128] Determining whether the first data structure conforms to a preset data structure of the page data;

[0129] If not, an error prompt message is generated and returned to the process so that the process displays the error prompt message.

[0130] Optionally, the judgment unit 406 is further configured to, when 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 displays the page according to the first data.

[0131] Optionally, the specific implementation method of the acquisition unit 402 for acquiring the first data returned by the data interface corresponding to the data acquisition request is: sending the data acquisition request to the backend data platform server, so that the backend data platform server acquires the first data from the data interface, and then sends the first data to the acquisition unit.

[0132] Optionally, the specific implementation of the generating unit 403 generating the simulation data having the first data structure is:

[0133] Call a preset open source tool to fill the first data structure with data to obtain simulation data; the first data structure at least specifies the characteristics of the data element sequence included in the simulation data, and the characteristics of the data element sequence include: the total number of data elements included in the data element sequence, the value of the starting data element, and the increasing relationship between the data elements in the data element sequence; the increasing relationship between any two adjacent data elements is the same.

[0134] Optionally, the simulation data is an array of continuous values ​​having the first data structure.

[0135] The device provided in this embodiment, after receiving the data acquisition request sent by the process, obtains the first data returned by the data interface corresponding to the data acquisition request, and generates simulation data with a first data structure. Compared with artificially written simulation data, there is no influence of human subjective factors, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors.

[0136] Furthermore, after obtaining the first data returned by the data interface, simulated data with a first data structure is generated, and the simulated data is sent to the process, so that the process displays the page according to the simulated data. In other words, the device provided in this embodiment does not display the page according to the data provided by the back-end data interface. Therefore, in such a case, if the page display effect of the front-end application is not good, the device provided in this example can directly provide new simulated data for the front-end application, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost.

[0137] Figure 5 A structural diagram of a data processing system 500 provided in an embodiment of the present application, characterized in that it includes: a front-end data platform 501 and a back-end data platform server 502;

[0138] The front-end data platform 501 is used to send the data acquisition request sent by the receiving process to the back-end data platform server 502;

[0139] The backend data platform service 502 is used to obtain the first data from the data interface corresponding to the data acquisition request, and send the first data to the frontend data platform 501;

[0140] The front-end data platform 501 is also used to generate simulation data having a first data structure, and send the simulation data to the process so that the process displays a page based on the simulation data; the first data structure is the data structure of the first data.

[0141] In the system provided by this embodiment, after the front-end data platform receives the data acquisition request sent by the process, it obtains the first data returned by the data interface corresponding to the data acquisition request, and generates simulation data with a first data structure. Compared with the artificially written simulation data, the data obtained by simulation using the front-end data platform is not affected by human subjective factors, thereby reducing problems such as incomplete data or data incoherence caused by human subjective factors.

[0142] Furthermore, after the front-end data platform obtains the first data returned by the data interface, it generates simulation data with a first data structure, and sends the simulation data to the process, so that the process displays the page according to the simulation data. In other words, the process displays the page according to the simulation data provided by the front-end data platform, rather than the data provided by the back-end data interface. Therefore, in this case, if the page display effect of the front-end application is not good, the front-end data platform can be used to directly provide new simulation data to the front-end application, thereby avoiding multiple data interactions between the front-end application and the data interface, resulting in low front-end development efficiency and high time cost.

[0143] Furthermore, after the front-end data platform receives the data acquisition request sent by the process, it 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 first data from the data interface to the front-end data platform. In other words, the data acquired by the front-end data platform is obtained by the back-end data platform server from the data interfaces of other servers. Based on the rule that servers can exchange data information even if the domain names of the servers are different, 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, when 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 obtain the data provided by the data interfaces of other servers through the front-end data platform, thereby achieving the goal of the process being able to make data requests across domains.

[0144] The present application also provides an electronic device 600, whose structural diagram is as follows: Figure 6 As shown, it includes: a processor 601 and a memory 602, the memory 602 is used to store the application program, and the processor 601 is used to execute the application program to execute the data processing method of the present application, that is, to perform the following steps:

[0145] The front-end data platform receives the data acquisition request sent by the process;

[0146] The front-end data platform obtains first data returned by the data interface corresponding to the data acquisition request;

[0147] The front-end data platform generates simulation data having a first data structure; the first data structure is the data structure of the first data;

[0148] The front-end data platform sends the simulation data to the process, so that the process displays the page according to the simulation data.

[0149] The present application also provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the data processing method provided by the present application, that is, executes the following steps:

[0150] The front-end data platform receives the data acquisition request sent by the process;

[0151] The front-end data platform obtains first data returned by the data interface corresponding to the data acquisition request;

[0152] The front-end data platform generates simulation data having a first data structure; the first data structure is the data structure of the first data;

[0153] The front-end data platform sends the simulation data to the process, so that the process displays the page according to the simulation data.

[0154] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0155] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0156] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for data processing, characterized in that: The method is applied to a front-end data platform, and the method includes: Receive data acquisition request sent by the process; Acquire first data returned by the data interface corresponding to the data acquisition request; Locating and identifying target field content included in the first data, where the target field content is field content corresponding to a preset designated field; If the target field content is a preset first value, determining that the first data is page data required by the process, and sending the first data to the process so that the process displays the page according to the first data; If the target field content is a preset second value, a first data structure is obtained from the first data; the first data structure is a data structure of the first data; In the case where the first data structure conforms to the preset data structure of the page data, simulation data having the first data structure is generated, and the simulation data is sent to the process, so that the process displays the page according to the simulation data.

2. The method according to claim 1, characterized in that Before the data acquisition request sent by the receiving process, it also includes: Get a configuration operation for configuring a domain name as a domain name accessible to a data requester; Based on the configuration operation, a domain name is configured.

3. The method according to claim 1, characterized in that The obtaining of the first data returned by the data interface corresponding to the data obtaining request includes: The data acquisition request is sent to the backend data platform server, so that the backend 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, characterized in that: After acquiring the first data returned by the data interface corresponding to the data acquisition request and before generating the simulation data having the first data structure, the method further includes: In the case where the first data structure does not conform to the preset data structure of the page data, an error prompt message is generated, and the error prompt message is returned to the process so that the process displays the error prompt message.

5. The method according to claim 4, characterized in that Also includes: When it is determined that the first data is the page data required by the process, the first data is sent to the process so that the process displays the page according to the first data.

6. The method according to claim 1, characterized in that The generating of simulation data having the first data structure comprises: Call 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 characteristics of the data element sequence include: the total number of data elements included in the data element sequence, the value of the starting data element, and the increasing relationship between the data elements in the data element sequence; the increasing relationship between any two adjacent data elements is the same.

7. The method according to claim 1, characterized in that The simulation data is an array of continuous values ​​having the first data structure.

8. A data processing device, characterized in that: include: A receiving unit, used for receiving a data acquisition request sent by a process; An acquiring unit, configured to acquire first data returned by the data interface corresponding to the data acquisition request; A determination unit, used to locate and identify target field content included in the first data, wherein the target field content is field content corresponding to a preset designated field; The judgment unit is further configured to determine, if the target field content is a preset first value, that the first data is page data required by the process, and send the first data to the process so that the process displays the page according to the first data; The judgment unit is further configured to obtain a first data structure from the first data if the target field content is a preset second value; the first data structure is a data structure of the first data; A generating unit, configured to generate simulation data having the first data structure when the first data structure conforms to a preset data structure of the page data; The sending unit is used to send the simulation data to the process, so that the process displays the page according to the simulation data.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program to implement the data processing method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the data processing method described in any one of claims 1 to 7.

11. A data processing system, characterized in that: include: Front-end data platform and back-end data platform servers; The front-end data platform is used to send the data acquisition request to the back-end data platform server after receiving the data acquisition request sent by the process; The backend data platform server is used to obtain the first data from the data interface corresponding to the data acquisition request, and send the first data to the frontend data platform; The front-end data platform is also used to locate and identify target field content included in the first data, where the target field content is field content corresponding to a preset designated field; The front-end data platform is also used for, if the target field content is a preset first value, determining that the first data is page data required by the process, and sending the first data to the process so that the process displays the page according to the first data; The front-end data platform is further used for, if the target field content is a preset second value, obtaining a first data structure from the first data; the first data structure is a data structure of the first data; In the case where the first data structure conforms to the preset data structure of the page data, simulation data having the first data structure is generated, and the simulation data is sent to the process, so that the process displays the page according to the simulation data.

Citation Information

Patent Citations

  • Rear-end data simulation method during webpage front-end and rear-end separation development

    CN111459484A