CN116263659A - Data processing method, apparatus, computer program product, device and storage medium - Google Patents

Data processing method, apparatus, computer program product, device and storage medium Download PDF

Info

Publication number
CN116263659A
CN116263659A CN202111531750.8A CN202111531750A CN116263659A CN 116263659 A CN116263659 A CN 116263659A CN 202111531750 A CN202111531750 A CN 202111531750A CN 116263659 A CN116263659 A CN 116263659A
Authority
CN
China
Prior art keywords
field
target
custom
code
source code
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
CN202111531750.8A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111531750.8A priority Critical patent/CN116263659A/en
Publication of CN116263659A publication Critical patent/CN116263659A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • G06F8/355Round-trip engineering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the application discloses a data processing method, a device, a computer program product, equipment and a storage medium, wherein the data processing method comprises the following steps: acquiring a target source code of a target business service page and a field analysis result of the target source code; creating one or more custom fields and attribute information of each custom field on the target business service page based on the target source code and the field analysis result; determining the simulation data of each custom field according to the service form of the target service page and the attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields; after the target source code is released, the configuration file is used for rendering the target business service page. The method and the device for rendering the target business service page conveniently acquire the configuration file for rendering the target business service page.

Description

Data processing method, apparatus, computer program product, device and storage medium
Technical Field
The present invention relates to the field of computer technology, and in particular, to a data processing method, apparatus, computer program product, device, and storage medium.
Background
Currently, with the sustainable development of internet technology, the construction of business service pages has been widely used; in the process of constructing a service page, a front-end developer usually creates a front-end interface presented to a user, and a back-end developer writes source codes to enable a server, a database and the like to interact with each other, which results in that the back-end developer usually grasps the design of the database and the interface, and the front-end developer has weaker knowledge on data, so that it is difficult for the front-end developer to independently construct the service page, that is, it is difficult for the front-end developer to generate a configuration file for rendering the service page. Based on this, how to easily acquire a profile becomes a research hotspot.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a data processing device, a computer program product, equipment and a storage medium, which can efficiently and conveniently acquire a configuration file for rendering a target business service page.
In one aspect, an embodiment of the present application provides a data processing method, where the method includes:
Acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
creating one or more custom fields and attribute information of each custom field about the target business service page based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
determining simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
after the target source code is released, the configuration file is used for rendering the target business service page.
In another aspect, an embodiment of the present application provides a data processing apparatus, including:
the acquisition unit is used for acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
a processing unit, configured to create one or more custom fields related to the target business service page and attribute information of each custom field based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
the processing unit is further configured to determine simulation data of each custom field according to the service form of the target service page and attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
After the target source code is released, the configuration file is used for rendering the target business service page.
In yet another aspect, embodiments of the present application provide a computer program product which, when executed by a processor, performs the steps of:
acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
creating one or more custom fields and attribute information of each custom field about the target business service page based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
determining simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
After the target source code is released, the configuration file is used for rendering the target business service page.
In yet another aspect, an embodiment of the present application provides a computer device, including a processor, and a memory, where the memory is configured to store a computer program, and the computer program when executed by the processor implements the steps of:
acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
creating one or more custom fields and attribute information of each custom field about the target business service page based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
determining simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
After the target source code is released, the configuration file is used for rendering the target business service page.
In yet another aspect, embodiments of the present application provide a computer storage medium storing a computer program adapted to be loaded by a processor and to perform the steps of:
acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
creating one or more custom fields and attribute information of each custom field about the target business service page based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
determining simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
After the target source code is released, the configuration file is used for rendering the target business service page.
According to the embodiment of the application, the target source code of the target business service page, each model field in the target source code and the attribute information of each model field can be acquired, so that the custom fields corresponding to each model field and the attribute information of each custom field can be conveniently created based on the acquired content, namely, one or more custom fields and the attribute information of each custom field of the target business service page are created; after each custom field and the attribute information of each custom field are created, the simulation data of each custom field can be determined according to the service form of the target service page and the attribute information of each custom field, and the simulation data of each custom field is adopted to fill the field content of the corresponding custom field, so that the field content of each custom field is automatically pulled, and the situation that the field content of the custom field is not filled can be effectively avoided. And then, generating a configuration file of the target business service page according to the filled custom field, so that the configuration file for rendering the target business service page is conveniently obtained. Therefore, the configuration file for rendering the target business service page can be quickly obtained, the problem that the custom field and the project field (namely the model field) are required to be manually configured and manually checked is solved, and labor cost is saved. In addition, the problem that the error reporting risk and the business risk are caused when project requirements are generated and released due to the fact that field contents are not filled after custom fields are created manually is solved; that is, the field content of each custom field in the configuration file obtained by the embodiment of the application is filled, so that the error reporting risk and the business risk caused by the configuration file error can be effectively avoided when the project demand is generated and released.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a data processing scheme provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 3a is a schematic diagram of a display interface according to an embodiment of the present disclosure;
FIG. 3b is a schematic diagram of another display interface provided by an embodiment of the present application;
FIG. 4 is a flowchart of another data processing method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a communication process provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a code information submission progress provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of a binary tree according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another communication process provided by an embodiment of the present application;
FIG. 9 is a schematic flow chart of determining analog data according to an embodiment of the present application;
FIG. 10 is a schematic diagram of another display interface provided by an embodiment of the present application;
FIG. 11 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In order to conveniently acquire a configuration file with higher reliability, the embodiment of the application provides a data processing scheme. In a specific implementation, the data processing scheme may be performed by a computer device, which may be a terminal or a server; among them, the terminals mentioned herein may include, but are not limited to: smart phones, tablet computers, notebook computers, desktop computers, smart watches, smart televisions, smart car terminals, and the like; a wide variety of clients (APP) may be running within the terminal, such as a video play client, a social client, a browser client, a streaming client, an educational client, and so forth. The server mentioned herein may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and so on.
It should be noted that, in other embodiments, the data processing scheme may be executed by the server and the terminal together; the server and the terminal are connected via a network (e.g., wired network, wireless network, etc.), which is not limited. Moreover, the computer device mentioned in the embodiments of the present application may be located outside the blockchain network or may be located inside the blockchain network, which is not limited thereto; a blockchain network is a network composed of a point-to-point network (P2P network) and a blockchain, and a blockchain refers to a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm, etc., which is essentially a decentralised database, and is a string of data blocks (or referred to as blocks) generated by association using a cryptographic method.
Further, the above-mentioned data processing scheme may be executed by two computer devices together, where the two computer devices may be an object code device and a data configuration device, respectively; or by two clients running within one computer device, as this application is not limited in this regard. For convenience of explanation, the embodiments of the present application will be described taking two computer devices (i.e., an object code device and a data configuration device) as execution bodies of a data processing scheme as an example; referring to fig. 1, the general principle of the data processing scheme proposed in the embodiment of the present application is as follows:
(1) The object code device may generate a source code file containing source code for one or more business service pages, the source code for each business service page including one or more model fields. (2) When the target code device detects a submission trigger event for a source code file, code analysis is performed on the change file by adopting a code analysis script file in a code checking hook function (such as pre-commit, a code checking tool before submitting codes) so as to extract model fields in the change file; wherein the change file may refer to a file that is not committed within a time range of the creation time or the modification time and the current system time. It may be understood that when the object code device detects the commit triggering event for the first time, none of the source codes of one or more business service pages included in the source code file is committed, that is, the change file at this time is the source code file, that is, the change file at this time includes all the source codes in the source code file. For convenience of explanation, the following description will take the change file as the source code file as an example, that is, the object code device may perform code analysis on the source code file and extract the model field in the source code file. (3) The object code device may submit the source code file, model fields in the source code file, attribute information of each model field, and the like to the data configuration device.
(4) After receiving a source code file sent by a target code device, model fields in the source code file and attribute information of each model field, the data configuration device can create one or more demand data classification sets; one of the demand data classification sets corresponds to one of the business service pages. (5) The data configuration equipment can respectively create sub-custom fields in each requirement data classification set according to the model fields in the source code file and the attribute information of each model field, wherein the sub-custom fields refer to custom fields under each attribute information; custom fields in a demand data taxonomy correspond to model fields in the source code of a business service page. (6) The data configuration device may request the business system database to populate the simulation data for each custom field in each of the required data taxonomies, thereby generating a configuration file based on the simulation data for each custom field, the configuration file being usable to render each of the one or more business service pages.
It can be understood that, according to the data processing scheme provided by the embodiment of the application, the pre-commit and the data configuration equipment can be combined with the system source code (i.e. source code) in the project development to scan and extract the data model item (i.e. model field and attribute information of the model field), the data configuration equipment is automatically communicated based on the data model item and the data configuration equipment, the custom field model data item (i.e. custom field and attribute information of the custom field) is automatically generated at the data configuration equipment while the development source code is submitted, and the simulation data is generated, so that the corresponding configuration file is obtained based on the simulation data of each custom field.
Practice shows that the data processing scheme provided by the embodiment of the application can have at least the following beneficial effects:
first point: the target code device can automatically perform code analysis on source codes of one or more business service pages contained in the source code file through a code checking hook function, and each model field in the source code file is efficiently extracted; second point: the data configuration equipment can automatically create custom fields corresponding to each model field according to each received model field and the like, and fill simulation data into each custom field so as to conveniently obtain a configuration file for rendering each business service page, thereby effectively saving labor cost and avoiding the condition that custom fields with missing field contents exist in the configuration file; third point: creating each custom field according to the demand data classification set so as to facilitate the subsequent management of each custom field; fourth point: the object code device can acquire the change file when the submission trigger event aiming at the source code file is detected, and conduct code analysis on the change file, so that model fields in the change file are extracted, namely, when the object code device detects the submission trigger event aiming at the source code file for the first time, code analysis can be conducted on all source codes in the source code file, and when the object code device detects the submission trigger event aiming at the source code file subsequently, code analysis can be conducted on part of source codes in the source code file, so that a large number of repeated operations can be effectively avoided, and resource waste is reduced.
Based on the above description of the data processing scheme, the embodiments of the present application propose a data processing method, which may be executed by the above-mentioned data configuration device (i.e. one computer device) or by the above-mentioned object code device (i.e. another computer device), and the computer device may be a terminal or a server; alternatively, the data processing method may be performed by a terminal and a server together. For convenience of explanation, the data processing method is executed by the data configuration device in the following description; it should be noted that the data configuration device in the embodiments of the present application may also be referred to as a data configuration platform. Referring to fig. 2, the data processing method may include the following steps S201 to S203:
s201, acquiring a target source code of a target business service page and a field analysis result of the target source code.
The field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification. It will be appreciated that the above attribute information may refer to a field type of the model field, and the attribute information may include, but is not limited to: a single row of input boxes, multiple rows of input boxes, dates, radio buttons, drop down lists, pictures, links, text, and so forth. Alternatively, the model field in the embodiments of the present application may also be referred to as a data model field.
It should be noted that, the data configuration device may obtain a source code file, where the source code file includes source codes of one or more service pages, and then the target service page may be one service page of the one or more service pages included in the source code file, and the target source code may be a source code of one service page in the source code file.
Optionally, the data configuration device may download the target source code of the target service page and the field analysis result of the target source code from the cloud according to the user instruction, or may obtain the target source code of the target service page and the field analysis result of the target source code from a mobile memory provided by the user, where the mobile memory may be a mobile hard disk or a USB flash disk (USB flash disk), and so on. The data configuration device may also obtain the target source code of the target business service page and the field analysis result of the target source code from the storage space of the data configuration device, for example, when the target source code and the corresponding field analysis result exist in a Read Only Memory (ROM) of the data configuration device, the data configuration device may obtain the target source code and the field analysis result of the target source code from the Read Only Memory. The data configuration device may also obtain the target source code and the corresponding field analysis result from any computer device other than the data configuration device, that is, the data configuration device may obtain the target source code and the corresponding field analysis result by receiving the target source code and the corresponding field analysis result sent by any computer device other than the data configuration device. The present application is not limited to a specific embodiment in which the data configuration device obtains the target source code and the field analysis result of the target source code.
S202, one or more custom fields and attribute information of each custom field of the target business service page are created based on the target source code and the field analysis result.
Wherein, a custom field corresponds to a model field, and the custom field refers to a field of unspecified field content. It can be understood that the custom field means a field without a specified name and content in the database, and the custom field is also called an "open model", and the user can add the required field according to own requirements, so as to realize personalized customization.
It should be noted that, the attribute information of each custom field is the same as the attribute information of the model field corresponding to each custom field; that is, the attribute information of any custom field is equal to the attribute information of the model field corresponding to the custom field. It can be understood that the data configuration device may use attribute information of any model field as attribute information of a custom field corresponding to the any model field.
For example, assuming that the field analysis result of the object source code includes a model field a and a model field B, and the attribute information of the model field a is a single line input box and the attribute information of the model field B is a multiple line input box, the data configuration apparatus may create two custom fields and the attribute information of each of the two custom fields. In this case, assuming that the two custom fields created by the data configuration device are a custom field a and a custom field B, respectively, and the custom field a corresponds to a model field a and the custom field B corresponds to a model field B, the data configuration device may determine that attribute information of the custom field a is a single-line input box and attribute information of the custom field B is a multiple-line input box.
It will be appreciated that after the data configuration device obtains the source codes of the plurality of business service pages and the field analysis results of the respective source codes, the data configuration device may create one or more custom fields for the respective business service pages and attribute information for the respective custom fields in each business service page.
S203, determining the simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; and filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields.
After the target source code is released, the configuration file is used for rendering the target business service page. It should be noted that the business forms described above may be used to describe the overall layout of the target business service page, the presentation effect, and the like. Correspondingly, a business form has a corresponding relation with a data set, so that the data configuration equipment can determine the data set corresponding to the business form of the target business service page, and in the determined data set, the data matched with the attribute information of each custom field is used as corresponding simulation data; the data matched with the attribute information of any custom field may be: the data type is the data of the data type corresponding to the attribute information of any custom field. Specifically, the business form may be used to indicate one or more data types, and the target business service page may be capable of displaying data of each data type in the one or more data types; the data set corresponding to the traffic pattern includes data of the respective data types described above.
For example, assuming that the data configuration device creates a custom field a, the attribute information of the custom field a is a picture, and the data configuration device includes a data set a and a data set B, and the service form of the target service page corresponds to the data set a, the data configuration device may use, in the data set a, data matched with the attribute information of the custom field a as the analog data of the custom field a; that is, the data configuration apparatus may determine that the data type is data of a picture in the data set a, and use the determined data as the analog data of the custom field a. Further, assuming that the simulation data of the custom field a is the simulation data a, the data configuration device may fill the field content of the custom field a with the simulation data a, so as to obtain the configuration file of the target business service page. In this case, when the target business service page is rendered using the configuration file, the target business service page may include field contents of the custom field a, i.e., the target business service page may include the simulation data a.
Optionally, the above-mentioned analog data may refer to data about financial services, data about sales services, and data about advertisement services, which is not limited in this application.
It should be noted that, the data configuration device may also create custom fields and attribute information of the custom fields when a visualization operation of a user is detected. Optionally, if the target source code of the target business service page is updated, the user may create a custom field corresponding to the added model field and corresponding attribute information through a visualization operation in the data configuration device, or edit the custom field created in the data configuration device according to the updated target source code, and so on; the user may also make the data configuration device acquire the target source code of the target service page (i.e. the updated target source code) and the field analysis result of the updated target source code again, so as to create the custom field and the corresponding attribute information corresponding to the model field in the updated target source code, that is, update the custom field and the corresponding attribute information is implemented, which is not limited in this application.
For example, as shown in fig. 3a, it is assumed that the target source code of the target business service page corresponds to the data source in the display interface 301, for example, the name of the target source code may be the corresponding data source name, and the display interface 301 includes a field management option. If the user performs a clicking operation on the field management option, the data configuration device may display the created one or more custom fields and attribute information of each custom field about the target business service page in the display interface 302 in response to the clicking operation performed by the user, and the option of the newly added field is included in the display interface 302. When the object source code is updated and at least one model field is added to the updated object source code, assuming that a user wants to create a custom field corresponding to the added model field and corresponding attribute information through a visualization operation on the data configuration device, the user may perform a click operation on a newly added field option in the display interface 302, the data configuration device may respond to the click operation on the newly added field option by the user, display the creation interface of the custom field in the display interface 303, where the display interface 303 includes an input box of a field keyword, an input box of a field type, a save option, and so on. After the user inputs the related content of the custom field, a clicking operation is performed on the save option in the display interface 303, and then the data configuration device may respond to the clicking operation of the user on the save option to save the custom field created by the user through the visualization operation. It should be noted that, fig. 3a only illustrates a display interface of the data configuration device, and specific display contents of each display interface are not limited in this application; for example, the save option in the display interface 303 may also be a complete option, or the display interface 303 page may not include a return option, or the like.
Further, the data configuration device may issue the target source code and may display presentation information of the target source code. For example, as shown in fig. 3b, assuming that the data configuration device has published the target source code, the data configuration device may display the published presentation information of the source code (i.e. the presentation information of the target source code) in the display interface 304, the display interface 304 may include an editing option, a deleting option, and the like of the target source code, and then the user may perform a corresponding operation on the target source code through an operation option such as the editing option or the deleting option in the display interface 304; further, if the user performs a click operation on the new release option in the display interface 304, the data configuration device may display the source code that allows release in response to the click operation performed on the new release option by the user.
It will be appreciated that the data configuration device may also publish a configuration file for rendering the target business service page when publishing the target source code. Further, the user can download the target source code and the configuration file for rendering the target service page in the data configuration device, so that any computer device adopts the target source code and the configuration file for rendering the target service page to construct the target service page.
According to the embodiment of the application, the target source code of the target business service page, each model field in the target source code and the attribute information of each model field can be acquired, so that the custom fields corresponding to each model field and the attribute information of each custom field can be conveniently created based on the acquired content, namely, one or more custom fields and the attribute information of each custom field of the target business service page are created; after each custom field and the attribute information of each custom field are created, the simulation data of each custom field can be determined according to the service form of the target service page and the attribute information of each custom field, and the simulation data of each custom field is adopted to fill the field content of the corresponding custom field, so that the field content of each custom field is automatically pulled, and the situation that the field content of the custom field is not filled can be effectively avoided. And then, generating a configuration file of the target business service page according to the filled custom field, so that the configuration file for rendering the target business service page is conveniently obtained. Therefore, the configuration file for rendering the target business service page can be quickly obtained, the problem that the custom field and the project field (namely the model field) are required to be manually configured and manually checked is solved, and labor cost is saved. In addition, the problem that the error reporting risk and the business risk are caused when project requirements are generated and released due to the fact that field contents are not filled after custom fields are created manually is solved; that is, the field content of each custom field in the configuration file obtained by the embodiment of the application is filled, so that the error reporting risk and the business risk caused by the configuration file error can be effectively avoided when the project demand is generated and released.
Fig. 4 is a flow chart of another data processing method according to an embodiment of the present application. The data processing method may be performed by the above-mentioned data configuration device (i.e., computer device), which may be a terminal or a server; alternatively, the data processing method may be performed by a terminal and a server together. For convenience of explanation, the data processing method will be described hereinafter by taking a data configuration device as an example. Referring to fig. 4, the data processing method may include the following steps S401 to S403:
s401, code information submitted by target code equipment is received.
The target code device is a device for generating target source codes of target business service pages; the so-called code information includes: the method comprises the steps of calling a code check hook function to analyze a code script file when target source codes and field analysis results of the target source codes are detected by target code equipment, and analyzing and processing model fields of the target source codes. It should be noted that, the commit triggering event may refer to an execution event of a commit command, and the code analysis script file may also be directly referred to as a script file.
In this case, the user may submit the code in the object code device, i.e., execute the commit command, and trigger the pre-commit hook operation; that is, when the user executes the commit command in the object code device, the object code device may call the code analysis script file in the code check hook function (i.e., pre-commit), perform analysis processing of the model field on the object source code, and thus obtain a field analysis result of the object source code. Wherein, pre-commit is a hook carried by Git (an open source distributed version control system), which can traverse, detect or otherwise manipulate submitted content prior to our commit; that is, the target code device may invoke code to check the code analysis script file in the hook function when it detects that the commit trigger event for the target source code is reached, and perform analysis processing of the model field on the target source code. It should be noted that, pre-commit is executed when the git add (a command to add a file to a scratch) is submitted and then the git commit (a command to submit a specified file of a scratch to a repository) is executed, script execution continues to commit without error, and otherwise the operation of commit is rejected.
For example, as shown in FIG. 5, the communication process between the object code device and the data configuration device may include three phases, wherein the coordinator of each phase is the object code device. If the current phase is the first phase (i.e., phase one), the participant may configure the device for the data; at this point, the coordinator may send a request to the participant whether to submit the code information, and the participant may allow the code sent by the coordinator to submit the request. If the current stage is the second stage (i.e. stage two), the participant is a code analysis script file in pre-commit; at this time, the coordinator may call the code analysis script file in the code check hook function to perform analysis processing of the model field on the target source code. If the current phase is the third phase (i.e., phase three), the participant may configure the device for the data; at this point, the adjustments may submit the code information to the participant, eventually completing the commit operation. Further, as shown in fig. 6, in the process of submitting the code information by the object code device, the object code device may sequentially display the submitting progress of the code information.
It will be appreciated that the object code device invoking the code analysis script file to perform analysis processing of model fields on the object source code may refer to: triggering script files in pre-commit, the script files analyzing logic in the extraction code (i.e., object source code) to extract each model field from the object source code, and attribute information of each model field.
In a specific embodiment, the object source code includes a plurality of parameter acquisition requests, each parameter acquisition request corresponds to an object structure, and each parameter acquisition request includes a request address; the specific process of calling the code analysis script file to analyze the model field of the target source code to obtain the field analysis result can comprise the following steps: traversing each parameter acquisition request in the target source code, and determining a current parameter acquisition request of current traversal; inquiring a target keyword in a request address included in a current parameter acquisition request, wherein the target keyword refers to: code identification for indicating that field modifications are allowed; if the target keyword is queried, taking the object structure corresponding to the current parameter acquisition request as a model field. Wherein the object structure may refer to a field; each parameter acquisition request may correspond to an object structure, which may refer to that each parameter acquisition request includes an object structure, or may refer to that each parameter acquisition request is followed by an object structure, which is not limited in this application.
It should be noted that, the target keyword may refer to a/vtools keyword (a preset keyword), the parameter obtaining request may refer to a request, and the object structure may refer to a field in the parameter obtaining request. It can be understood that the object code device can query and traverse the/vtools keywords in the search source code, find the address containing vtools in the request, analyze the used object structure after the request, the object structure is the custom field key (keyword) value in the data configuration device, that is, the object structure is used as the extracted model field.
Further, if the target keyword is queried, determining an address suffix identification of a request address in the current parameter acquisition request; and the determined address suffix identification is used as attribute information of a model field corresponding to the current parameter acquisition request.
In this case, the object code device may determine a vtools address suffix identifier (i.e., an address suffix identifier of a request address containing a/vtools keyword), which is a classification key value (i.e., attribute information of a custom field) that is to be created at the data configuration device later; and the determined address suffix identification is used as attribute information of a corresponding model field.
It should be noted that, the object source code may include a plurality of code segments, one parameter acquisition request may refer to one or more lines of code statements, and any parameter acquisition request of the plurality of parameter acquisition requests may be located in any code segment. Alternatively, the object code device may construct a binary tree according to a hierarchy among the code segments and traverse the parameter acquisition requests in the object source code using the resulting binary tree. For example, as shown in fig. 7, any node in the binary tree may include a code segment, and the target code device may sequentially traverse the code segments in each node using the binary tree corresponding to the target source code to search for the parameter acquisition request in each code segment.
Further, the code information may include source codes of one or more business service pages and field analysis results of the respective source codes; the target business service page is one business service page of the one or more business service pages, and the field analysis result of each source code is obtained by calling a code analysis script file in a code check hook function when the target code equipment detects a submission trigger event aiming at each source code, and carrying out analysis processing of a model field on each source code. In this case, the specific manner of calling the code analysis script file to perform analysis processing of the model field on each source code to obtain the field analysis result of each source code may include: traversing each source code, and taking the currently traversed source code as a current target source code; the code analysis script file is called to analyze the model field of the current target source code, so that a field analysis result of the current target source code is obtained; and after traversing each source code, obtaining a field analysis result of each source code.
S402, based on the target source code and the field analysis result, one or more custom fields and attribute information of each custom field of the target business service page are created.
It should be noted that, when the code information includes source codes of one or more business service pages and field analysis results of each source code, the data configuration device may create one or more demand data classification sets, where one demand data classification set corresponds to one business service page; according to the corresponding relation between the demand data classification sets and the business service pages, each source code and the field analysis result of each source code, one or more custom fields of the business service pages corresponding to each demand data classification set and the attribute information of each custom field are respectively created in each demand data classification set; the custom field included in any requirement data classification set may refer to: one or more custom fields of the business service page corresponding to the any one of the required data classification sets. It will be appreciated that the data configuration device may create all custom fields of a business service page in the same set of demand data classifications.
For example, assuming that the code information includes a source code a of a service page a, a field analysis result of the source code a, a source code B of a service page B, and a field analysis result of the source code B, and the field analysis result of the source code a includes a model field a, a model field B, and a model field C, and the field analysis result of the source code B includes a model field D and a model field E, the data configuration apparatus may create a demand data class a and a demand data class B according to a principle that one demand data class corresponds to one service page, where the demand data class a corresponds to the service page a, and the demand data class B corresponds to the service page B. Further, the data configuration device may create a custom field a, a custom field B, and a custom field C in the required data classification set a according to the source code a and the field analysis result of the source code a, where the custom field a corresponds to the model field a, the custom field B corresponds to the model field B, and the custom field C corresponds to the model field C; the data configuration device may further create a custom field D and a custom field E in the required data classification set B according to the source code B and the field analysis result of the source code B, where the custom field D corresponds to the model field D, and the custom field E corresponds to the model field E.
Further, each model field in the field analysis result of any source code may carry a category identifier, where the category identifier may refer to a name or a keyword of a business service page indicated by the any source code, or may refer to a name or a keyword of the any source code, which is not limited in this application. In this case, the data configuration device may create one or more demand data classification sets according to the class identifier carried by each model field in the field analysis result of each source code, where one demand data classification set corresponds to one service page; and creating custom fields corresponding to model fields with the same category identification in the same requirement data classification set. It will be appreciated that the category identification of all model fields in the field analysis result of the source code of the same business service page is the same.
In one embodiment, the data configuration device may respond to a login request sent by the target code device, and perform identity verification on the target code device according to the pass credential information carried in the login request; after the target code device passes the identity verification, a successful login notification can be returned to the target code device to notify the target code device to submit code information; wherein the code information further includes pass credential information. Then, after receiving the code information, the data configuration device may perform reliability verification on the code information according to the pass credential information in the code information, and after the code information passes the reliability verification, trigger to execute the step of creating one or more custom fields related to the target business service page and attribute information of each custom field based on the target source code and the field analysis result. The successful login notification may refer to the status code 200, a successful login identifier, and so on.
It will be appreciated that the data configuration device may automatically create the classification key value (i.e., the attribute information of the custom field) and the custom field via the API (Application Programming Interface ) after receiving the code information for verification (i.e., reliability verification). In this case, the classification key value and the custom field are created in a hidden way through the API interface, and the presentation display of the manual configuration is consistent after the creation; that is, the data configuration device may automatically create the corresponding custom field and attribute information of each custom field after receiving the code information, and the automatically created custom field is identical to the custom field created by the user through the visualization operation on the data configuration device.
Note that, the password information carried in the login request may be the same as or different from the password information included in the code information, which is not limited in this application. Optionally, the password information carried in the login request may be a login name and a login password, or may be developer identity information, etc.; the pass credential information in the code information may be developer identity information, or may be authentication information sent to the target code device when the data configuration device returns a successful login notification to the target code device, such as JWT (Json web token, an open standard based on Json), and so on. Wherein, a JWT can refer to a character string and consists of a head part, a load and a signature; wherein the header of the JWT is used to describe the most basic information of the JWT, such as the type of the JWT and the algorithm used for signing, etc., the payload of the JWT may refer to the place for storing valid information, which may include the statement registered in the standard (such as the issuer of the JWT, the unique identity of the JWT, etc.), the public statement, and the private statement.
In this case, when the data configuration device performs identity verification on the target code device according to the pass credential information carried in the login request, the comparison analysis can be performed on the pass credential information carried in the login request and the preset pass credential information stored in the data configuration device, and if the pass credential information carried in the login request is the same as the preset verification information, the target code device can be determined to pass the identity verification. Optionally, the preset verification information may be preset by the data configuration device, or may be set by a user according to wish, which is not limited in this application. For example, assuming that the pass credential information carried in the login request refers to a login name and a login password, and that the pass credential information carried in the login request includes a login name a and a login password a, the data configuration device may determine that the object code device passes the authentication, assuming that the preset authentication information in the data configuration device includes the login name a and the login password a.
For example, as shown in fig. 8, if the object code device sends a login request to the data configuration device, the data configuration device may respond to the login request sent by the object code device and perform identity verification on the object code device according to the pass credential information carried in the login request. After the object code device passes the identity verification, the data configuration device may return a status code 200 to the object code device to inform the object code device to submit the code information. It will be appreciated that FIG. 8 is merely illustrative of an interaction process between an object code device and a data configuration device, and is not limiting in this application; for example, fig. 8 may also transmit a transmission request of code information to the object code device by the data configuration device, thereby acquiring the code information in the object code device. Optionally, as shown in fig. 8, after the commit is completed, the data configuration device may also send commit complete information to the object code device to notify the object code device that the commit is completed.
Further, when the data configuration device performs the reliability check on the code information according to the pass credential information in the code information, the data configuration device can perform a comparison analysis on the pass credential information in the code information and the preset check information in the data configuration device, and if the pass credential information in the code information is the same as the preset check information, the code information can be determined to pass the reliability check. Optionally, the preset check information may be set by the data configuration device, or may be set by the user according to wish, or may be check information carried in the login request, that is, after the target code device passes identity verification, the data configuration device may use the check information carried in the login request as the preset check information, and so on.
For example, assuming that the pass credential information in the code information refers to developer identity information, the object code device may cause the code information to send the code information to the data configuration device with a request of Node (Node. Js, a web page programming language running on the server side) for developer identity information, classification key (key) values (i.e., attribute information of model fields), model field key sets (i.e., all model fields extracted from the object source code). In this case, the preset check information in the data configuration device may refer to developer identity information; assuming that the developer identity information carried by the code information is developer identity information A, and the preset verification information in the data configuration equipment is developer identity information A, the developer identity information iterated by the code information is identical to the preset verification information, and then the data configuration equipment can determine that the code information passes the reliability verification.
S403, determining the simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; and filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields.
It should be noted that, after the classification key value and the custom field set are created in the previous step, the target code device may combine with a single field of the custom field set to request the service system and return daily simulation data; the service system may also refer to a service system database, and the single field of the custom field set may refer to one custom field of all custom fields created by the data configuration device. In other words, the data configuration device may request the business system database to determine the simulated data for each custom field.
In one embodiment, the specific implementation process of determining the simulation data of each custom field by the data configuration device according to the service form of the target service page and the attribute information of each custom field may include: performing mode processing based on each custom field and corresponding attribute information to obtain one or more modes, wherein one mode comprises at least one custom field and corresponding attribute information; generating a data acquisition request by adopting each mode and the service form of the target service page, and sending the data acquisition request to a service system database so that the service system database returns the simulation data of each custom field according to the service form and each mode; and receiving the simulation data of each custom field returned by the service system database. It will be appreciated that the data acquisition request includes the traffic patterns of the respective patterns and the target traffic service page.
For example, as shown in fig. 9, the data configuration device may perform mode processing on each custom field and attribute information of each custom field through a mode generator to obtain one or more modes, and send the obtained modes and the service form of the target service page to a service generator (i.e. a service system database), so that the service generator determines corresponding simulation data for each custom field according to the service form of the target service page and the attribute information of each custom field. It will be appreciated that fig. 9 is merely an exemplary illustration of a process of requesting a service generator to obtain analog data of each custom field, which is not limited in this application; for example, the data configuration device may send the simulated data of each custom field determined in the service generator to a relational database generator (e.g., an Oracle generator), so that the Oracle generator may store the simulated data of each custom field, may not store the simulated data of each custom field in the database system, and so on.
For another example, assuming that the data configuration device creates the custom field a and the custom field B, the attribute information of the custom field a is a picture, and the attribute information of the custom field B is a link, the data configuration device may perform mode processing on the custom field a and the custom field B to obtain one or more modes. Assuming that the data configuration device performs mode processing on the custom field a and the custom field B to obtain a mode, where the mode includes the custom field a, the custom field B, attribute information of the custom field a, and attribute information of the custom field B, then the data configuration device may send the mode and a service form of the target service page to the service system database, so that the service system database determines analog data of the custom field a and the custom field B. Further, after the service system database determines the simulation data of the custom field a and the custom field B, the data configuration device may receive the simulation data of each custom field returned by the service system database.
In another embodiment, the specific implementation process of the data configuration device for generating the configuration file of the target business service page according to the filled custom fields may include: and converting the configuration data corresponding to each filled custom field by adopting a template engine grammar of the hypertext preprocessor to obtain a configuration file. Note that, the hypertext preprocessor (PHP, hypertext Preprocessor) may refer to a universal open source scripting language, and the template engine may refer to smart, which is one of the most well-known PHP template engines in the industry, which is a template engine written using PHP.
It should be noted that, the data configuration device may import the filled custom fields into the established data table in batch to obtain configuration data; and converting the configuration data into a configuration file by using a template engine grammar.
For example, as shown in fig. 10, it is assumed that the content of the template engine grammar is the template content displayed in the display interface 1001, that is, the template engine grammar may be the following:
Figure BDA0003411669320000191
accordingly, the configuration file obtained by the data configuration device through the above template engine grammar may include field contents of a custom field rule. Further, assuming that the field contents of the filled custom field rule include a field content a and a field content B, the specific contents of the obtained configuration file may be: { "redeveloptwo" [ { "rule": "field content A" }, { "rule": "field content B" } ]; that is, the custom field corresponding to the source code named redevelopwo includes a custom field rule, and the field contents of the custom field rule may be a field content a and a field content B.
The method and the device can receive code information submitted by target code equipment, wherein the code information comprises target source codes and field analysis results of the target source codes, and the field analysis results are obtained by calling code analysis script files in code checking hook functions when the target code equipment detects a submitting trigger event aiming at the target source codes, and analyzing and processing model fields of the target source codes; that is, the object code device can extract the business requirement data model fields in a source code automatic analysis mode, namely, the code analysis script file in the code checking hook function is adopted to automatically extract the model fields and the attribute information of each model field from the object source code. Then, a custom field can be created in the data configuration equipment according to the analyzed data model field (namely the model field) while communicating with the target code equipment, and the real initialization data can be filled and simulated according to the custom field according to the service form, so that the systematic risk is reduced; that is, the data configuration device may create one or more custom fields and attribute information of each custom field about the target service page, determine simulation data of each custom field according to the service form of the target service page and attribute information of each custom field, and fill field contents of corresponding custom fields with the simulation data of each custom field, thereby automatically determining field contents of each custom field, effectively avoiding a situation of filling omission, and conveniently acquiring corresponding configuration files. It can be seen that the object code device can communicate with the data configuration device before project demand is submitted in a pre-commit (i.e. code checking hook function) manner, so as to realize automatic creation of each custom field by the data configuration device and automatic filling of field content of each custom field, and can efficiently obtain the configuration file for rendering the object business service page.
Based on the above description of related embodiments of the data processing method, the embodiments of the present application also propose a data processing apparatus, which may be a computer program (including program code) running in a computer device. The data processing apparatus may perform the data processing method shown in fig. 2 or fig. 4; referring to fig. 11, the data processing apparatus may operate the following units:
an obtaining unit 1101, configured to obtain a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
a processing unit 1102, configured to create one or more custom fields related to the target business service page and attribute information of each custom field based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
the processing unit 1102 is further configured to determine simulation data of each custom field according to a service form of the target service page and attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
After the target source code is released, the configuration file is used for rendering the target business service page.
In one embodiment, the obtaining unit 1101 may be specifically configured to, when used to obtain the target source code of the target business service page and the field analysis result of the target source code:
code information submitted by target code equipment is received, wherein the target code equipment refers to equipment for generating target source codes of the target business service pages;
wherein the code information includes: the target source code and the field analysis result of the target source code; and the field analysis result is obtained by calling a code to check a code analysis script file in a hook function when the target code equipment detects a submission trigger event aiming at the target source code, and analyzing and processing a model field of the target source code.
In another embodiment, the apparatus further includes an output unit 1103; the processing unit 1102 may further be configured to: responding to a login request sent by target code equipment, and carrying out identity verification on the target code equipment according to the password information carried in the login request;
After the object code device passes the authentication, the output unit 1103 may be configured to: returning a successful login notification to the target code device to notify the target code device of submitting code information; wherein the code information further includes pass credential information;
after receiving the code information, the processing unit 1102 is further operable to: and carrying out reliability verification on the code information according to the pass certificate information in the code information, and triggering and executing the step of creating one or more custom fields and attribute information of each custom field on the target business service page based on the target source code and the field analysis result after the code information passes the reliability verification.
In another embodiment, the processing unit 1102 is configured to determine the simulation data of each custom field according to the service form of the target service page and the attribute information of the custom field, where the simulation data is specifically configured to:
performing mode processing based on the custom fields and the corresponding attribute information to obtain one or more modes, wherein one mode comprises at least one custom field and the corresponding attribute information;
Generating a data acquisition request by adopting the service forms of the modes and the target service page, and sending the data acquisition request to a service system database so that the service system database returns the simulation data of each custom field according to the service forms and the modes;
and receiving the simulation data of the custom fields returned by the service system database.
In another embodiment, when generating the configuration file of the target business service page according to the filled custom fields, the processing unit 1102 may be specifically configured to:
and converting the configuration data corresponding to each filled custom field by adopting a template engine grammar of a hypertext preprocessor to obtain the configuration file.
According to one embodiment of the present application, the steps involved in the method shown in fig. 2 or fig. 4 may be performed by the units in the data processing apparatus shown in fig. 11. For example, step S201 shown in fig. 2 may be performed by the acquisition unit 1101 shown in fig. 11, and both step S202 and step S203 may be performed by the processing unit 1102 shown in fig. 11. As another example, step S401 shown in fig. 4 may be performed by the acquisition unit 1101 shown in fig. 11, step S402 and step S403 may each be performed by the processing unit 1102 shown in fig. 11, and so on.
According to another embodiment of the present application, each unit in the data processing apparatus shown in fig. 11 may be separately or completely combined into one or several other units, or some unit(s) thereof may be further split into a plurality of units with smaller functions, which may achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units are divided based on logic functions, and in practical applications, the functions of one unit may be implemented by a plurality of units, or the functions of a plurality of units may be implemented by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, these functions may also be implemented with assistance from other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, a data processing apparatus as shown in fig. 11 may be constructed by running a computer program (including program code) capable of executing the steps involved in the respective methods as shown in fig. 2 or fig. 4 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and the like, and a storage element, and the data processing method of the embodiments of the present application may be implemented. The computer program may be recorded on, for example, a computer readable storage medium, and loaded into and executed by the computing device described above.
According to the embodiment of the application, the target source code of the target business service page, each model field in the target source code and the attribute information of each model field can be acquired, so that the custom fields corresponding to each model field and the attribute information of each custom field can be conveniently created based on the acquired content, namely, one or more custom fields and the attribute information of each custom field of the target business service page are created; after each custom field and the attribute information of each custom field are created, the simulation data of each custom field can be determined according to the service form of the target service page and the attribute information of each custom field, and the simulation data of each custom field is adopted to fill the field content of the corresponding custom field, so that the field content of each custom field is automatically pulled, and the situation that the field content of the custom field is not filled can be effectively avoided. And then, generating a configuration file of the target business service page according to the filled custom field, so that the configuration file for rendering the target business service page is conveniently obtained. Therefore, the configuration file for rendering the target business service page can be quickly obtained, the problem that the custom field and the project field (namely the model field) are required to be manually configured and manually checked is solved, and labor cost is saved. In addition, the problem that the error reporting risk and the business risk are caused when project requirements are generated and released due to the fact that field contents are not filled after custom fields are created manually is solved; that is, the field content of each custom field in the configuration file obtained by the embodiment of the application is filled, so that the error reporting risk and the business risk caused by the configuration file error can be effectively avoided when the project demand is generated and released.
Based on the description of the method embodiment and the apparatus embodiment, the embodiment of the application further provides a computer device. Referring to fig. 12, the computer device includes at least a processor 1201, an input interface 1202, an output interface 1203, and a computer storage medium 1204. Wherein the processor 1201, the input interface 1202, the output interface 1203, and the computer storage medium 1204 within the computer device may be connected by a bus or other means.
The computer storage medium 1204 may be stored in a memory of a computer device, the computer storage medium 1204 storing a computer program, the computer program comprising program instructions, the processor 1201 being configured to execute the program instructions stored by the computer storage medium 1204. Processor 1201 (or CPU (Central Processing Unit, central processing unit)) is a computing core and a control core of a computer device adapted to implement one or more instructions, in particular to load and execute one or more instructions to implement a corresponding method flow or a corresponding function; in one embodiment, the processor 1201 described in the embodiments of the present application may be configured to perform a series of data processing, specifically including: acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification; creating one or more custom fields and attribute information of each custom field on the target business service page based on the target source code and the field analysis result, wherein one custom field corresponds to one model field, and the custom field refers to a field with unspecified field content; determining simulation data of each custom field according to the service form of the target service page and the attribute information of each custom field, filling field contents of the corresponding custom field by adopting the simulation data of each custom field, and generating a configuration file of the target service page according to each filled custom field; after the target source code is released, the configuration file is used for rendering the target business service page.
The embodiment of the application also provides a computer storage medium (Memory), which is a Memory device in a computer device, and is used for storing programs and data. It is understood that the computer storage media herein may include both built-in storage media in a computer device and extended storage media supported by the computer device. The computer storage media provides storage space that stores an operating system of the computer device. Also stored in the memory space are one or more instructions, which may be one or more computer programs (including program code), adapted to be loaded and executed by the processor. The computer storage medium herein may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory; alternatively, it may be at least one computer storage medium located remotely from the aforementioned processor. In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by a processor to implement the various method steps described above in connection with the embodiments of the data processing method illustrated in fig. 2 or 4.
According to the embodiment of the application, the target source code of the target business service page, each model field in the target source code and the attribute information of each model field can be acquired, so that the custom fields corresponding to each model field and the attribute information of each custom field can be conveniently created based on the acquired content, namely, one or more custom fields and the attribute information of each custom field of the target business service page are created; after each custom field and the attribute information of each custom field are created, the simulation data of each custom field can be determined according to the service form of the target service page and the attribute information of each custom field, and the simulation data of each custom field is adopted to fill the field content of the corresponding custom field, so that the field content of each custom field is automatically pulled, and the situation that the field content of the custom field is not filled can be effectively avoided. And then, generating a configuration file of the target business service page according to the filled custom field, so that the configuration file for rendering the target business service page is conveniently obtained. Therefore, the configuration file for rendering the target business service page can be quickly obtained, the problem that the custom field and the project field (namely the model field) are required to be manually configured and manually checked is solved, and labor cost is saved. In addition, the problem that the error reporting risk and the business risk are caused when project requirements are generated and released due to the fact that field contents are not filled after custom fields are created manually is solved; that is, the field content of each custom field in the configuration file obtained by the embodiment of the application is filled, so that the error reporting risk and the business risk caused by the configuration file error can be effectively avoided when the project demand is generated and released.
It should be noted that according to an aspect of the present application, there is also provided a computer program product or a computer program comprising computer instructions stored in a computer storage medium. The processor of the computer device reads the computer instructions from the computer storage medium and executes the computer instructions to cause the computer device to perform the methods provided in the various alternatives described above with respect to the data processing method embodiments shown in fig. 2 or fig. 4.
It is also to be understood that the foregoing is merely illustrative of the presently preferred embodiments of the present invention, and is not to be construed as limiting the scope of the appended claims, which are intended to cover all such modifications as fall within the true scope of the invention.

Claims (11)

1. A method of data processing, comprising:
acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
Creating one or more custom fields and attribute information of each custom field about the target business service page based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
determining simulation data of each custom field according to the business form of the target business service page and the attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
after the target source code is released, the configuration file is used for rendering the target business service page.
2. The method of claim 1, wherein the obtaining the target source code of the target business service page and the field analysis result of the target source code comprises:
code information submitted by target code equipment is received, wherein the target code equipment refers to equipment for generating target source codes of the target business service pages;
Wherein the code information includes: the target source code and the field analysis result of the target source code; and the field analysis result is obtained by calling a code to check a code analysis script file in a hook function when the target code equipment detects a submission trigger event aiming at the target source code, and analyzing and processing a model field of the target source code.
3. The method of claim 2, wherein the object source code comprises a plurality of parameter acquisition requests, each parameter acquisition request corresponding to an object structure, and wherein each parameter acquisition request comprises a request address; the mode of calling the code analysis script file to analyze and process the model field of the target source code to obtain the field analysis result comprises the following steps:
traversing each parameter acquisition request in the target source code, and determining a current parameter acquisition request of current traversal;
inquiring a target keyword in a request address included in the current parameter acquisition request, wherein the target keyword refers to: code identification for indicating that field modifications are allowed;
and if the target keyword is inquired, taking the object structure corresponding to the current parameter acquisition request as a model field.
4. A method according to claim 3, characterized in that the method further comprises:
if the target keyword is queried, determining an address suffix identification of a request address in the current parameter acquisition request;
and using the determined address suffix identifier as attribute information of a model field corresponding to the current parameter acquisition request.
5. The method according to claim 2, wherein the method further comprises:
responding to a login request sent by target code equipment, and carrying out identity verification on the target code equipment according to the password information carried in the login request;
after the target code device passes the identity verification, a successful login notification is returned to the target code device so as to notify the target code device of submitting code information; wherein the code information further includes pass credential information;
and after the code information is received, carrying out reliability verification on the code information according to the pass certificate information in the code information, and triggering and executing the step of creating one or more custom fields and attribute information of each custom field on the target business service page based on the target source code and the field analysis result after the code information passes the reliability verification.
6. The method of claim 1, wherein determining the simulation data for each custom field based on the business form of the target business service page and the attribute information for the respective custom field comprises:
performing mode processing based on the custom fields and the corresponding attribute information to obtain one or more modes, wherein one mode comprises at least one custom field and the corresponding attribute information;
generating a data acquisition request by adopting the service forms of the modes and the target service page, and sending the data acquisition request to a service system database so that the service system database returns the simulation data of each custom field according to the service forms and the modes;
and receiving the simulation data of the custom fields returned by the service system database.
7. The method of claim 1, wherein generating the configuration file of the target business service page according to the filled custom fields comprises:
and converting the configuration data corresponding to each filled custom field by adopting a template engine grammar of a hypertext preprocessor to obtain the configuration file.
8. A data processing apparatus, comprising:
the acquisition unit is used for acquiring a target source code of a target business service page and a field analysis result of the target source code; the field analysis result comprises various model fields extracted from the target source code and attribute information of each model field, wherein the model fields refer to code fields supporting data modification;
a processing unit, configured to create one or more custom fields related to the target business service page and attribute information of each custom field based on the target source code and the field analysis result; wherein, a custom field corresponds to a model field, and the custom field refers to a field without specifying the content of the field;
the processing unit is further configured to determine simulation data of each custom field according to the service form of the target service page and attribute information of each custom field; filling field contents of the corresponding custom fields by adopting simulation data of the custom fields, and generating a configuration file of the target business service page according to the filled custom fields;
After the target source code is released, the configuration file is used for rendering the target business service page.
9. A computer device comprising a processor, a memory, wherein the memory is configured to store a computer program which, when executed by the processor, implements the method of any of claims 1-7.
10. A computer storage medium, characterized in that the computer storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1-7.
CN202111531750.8A 2021-12-15 2021-12-15 Data processing method, apparatus, computer program product, device and storage medium Pending CN116263659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111531750.8A CN116263659A (en) 2021-12-15 2021-12-15 Data processing method, apparatus, computer program product, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111531750.8A CN116263659A (en) 2021-12-15 2021-12-15 Data processing method, apparatus, computer program product, device and storage medium

Publications (1)

Publication Number Publication Date
CN116263659A true CN116263659A (en) 2023-06-16

Family

ID=86722511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111531750.8A Pending CN116263659A (en) 2021-12-15 2021-12-15 Data processing method, apparatus, computer program product, device and storage medium

Country Status (1)

Country Link
CN (1) CN116263659A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117215542A (en) * 2023-11-07 2023-12-12 上海华创自动化工程股份有限公司 Custom data processing system and method
CN118350356A (en) * 2024-06-12 2024-07-16 北京冠群信息技术股份有限公司 Form page dynamic rendering method, system, memory and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117215542A (en) * 2023-11-07 2023-12-12 上海华创自动化工程股份有限公司 Custom data processing system and method
CN117215542B (en) * 2023-11-07 2024-05-14 上海华创自动化工程股份有限公司 Custom data processing system and method
CN118350356A (en) * 2024-06-12 2024-07-16 北京冠群信息技术股份有限公司 Form page dynamic rendering method, system, memory and storage medium

Similar Documents

Publication Publication Date Title
US9015657B2 (en) Systems and methods for developing and delivering platform adaptive web and native application content
CN109964216A (en) Identify unknown data object
JP2019530921A (en) Method and system for server-side rendering of native content for presentation
CN107818143A (en) A kind of page configuration, generation method and device
JP7397094B2 (en) Resource configuration method, resource configuration device, computer equipment, and computer program
CN109194714B (en) A copywriting push method, device, terminal device and storage medium
US11886556B2 (en) Systems and methods for providing user validation
CN111435367B (en) Knowledge graph construction method, system, equipment and storage medium
CN113157947A (en) Knowledge graph construction method, tool, device and server
CN111460394A (en) Copyright file verification method and device and computer readable storage medium
CN116263659A (en) Data processing method, apparatus, computer program product, device and storage medium
US20150379112A1 (en) Creating an on-line job function ontology
CN109271160A (en) Active rule construction method, device and computer system, medium
CN113094393A (en) Data aggregation method and device and electronic equipment
CN107430614A (en) Application partial-depth to corresponding resource links
Szekely et al. Exploiting semantics of web services for geospatial data fusion
EP4315009A1 (en) Integrated energy data science platform
CN114139502A (en) Document content processing method, device, device and storage medium
US20230065934A1 (en) Extract Data From A True PDF Page
CN110737662A (en) A data analysis method, device, server and computer storage medium
KR20200139038A (en) Devices and methods for relaying between game developers and producers
US12050634B2 (en) Method and apparatus for distributing content across platforms, device and storage medium
JP2024031109A (en) Contract template management program, information processing device, information processing system, information processing method
CN116127945A (en) Network link processing method and device, electronic equipment and storage medium
CN115062055B (en) A data table processing method, device, equipment and 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40088250

Country of ref document: HK