Data processing method, device, electronic device and storage medium
By normalizing the word classes input by users into standard word classes and generating a highly compatible application programming interface, the problems of inconsistent data and inflexible development methods in database and back-end interface development are solved, and the degree of development automation and user experience are improved.
Patent Information
- Application Number
- CN202111489424.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-12-08
AI Technical Summary
In the existing technology, database development and back-end interface development have problems such as inconsistent data formats, inflexible development methods, low degree of automation, and poor user experience. In particular, when the front-end interface and the back-end interface are developed in coordination, a lot of manpower and material resources are required for data mapping and unification.
By obtaining the first part of speech input by the user, normalizing it into a standard second part of speech, generating a target data table, and generating a highly compatible application programming interface based on the data table, supporting editing functions such as addition, deletion, modification, and query, simplifying subsequent interface maintenance and integration.
It achieves the standardization of data tables and the unification of interfaces, improves the flexibility and automation of development, reduces the investment of manpower and material resources, and improves the user experience.
Smart Images

Figure CN114168109B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data processing method, device, electronic device, and storage medium. Background Art
[0002] Currently, the data system development process typically includes database development, back-end interface development, and front-end interface construction. During database development, technical personnel typically define the word classes and data types involved in each project based on their personal preferences. Back-end interface development and front-end user interface construction utilize these custom word classes and data types, implementing the desired functionality through extensive code writing.
[0003] However, during database development, developers need to write numerous table creation statements on the development platform. The word class names, styles, and data types within these statements are all defined based on the developer's preferences. This development approach can easily lead to inconsistent data formats in peripheral systems and inconsistent data specifications across project teams. This makes back-end interface development, front-end interface construction, and system maintenance and integration inefficient, making the development approach inflexible.
[0004] During the development of back-end interfaces, existing technologies for application programming interfaces (APIs) still require extensive code writing, resulting in two major problems. First, due to the lack of standardized definitions of word classes and domains in databases, the data used in API development is non-standard. When front-end and back-end interfaces need to be developed in coordination, the data on both sides needs to be mapped and unified. This is a cumbersome operation that requires significant manpower and resources. This results in a poorly standardized development process, a low level of automation, and a poor user experience. Summary of the Invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a data processing method, device, electronic device and storage medium, which can standardize the first word class input by the user into a standard word class, generate a data table based on the standard word class, and then generate a standardized application programming interface based on the data table. The application programming interface has strong compatibility and is also convenient for subsequent maintenance and integration of the application programming interface.
[0006] In a first aspect, an embodiment of the present disclosure provides a data processing method, including:
[0007] Get the first part of speech for constructing the data table;
[0008] Normalizing the first part of speech into a second part of speech, and generating a target data table based on the second part of speech;
[0009] generating at least one application programming interface for editing the target data table based on the target data table, wherein different application programming interfaces correspond to different editing functions;
[0010] In response to a calling operation of at least one application programming interface, the target data table is edited.
[0011] Optionally, the method further includes:
[0012] Based on at least one application programming interface, a functional interface corresponding to the application programming interface is generated.
[0013] Optionally, normalizing the first part of speech to the second part of speech includes:
[0014] Querying a correspondence between a pre-configured normalized expression of a part of speech and at least one non-normalized expression to determine a normalized expression of a part of speech that matches the first part of speech;
[0015] Based on the normalized expression of the part of speech matched by the first part of speech, the first part of speech is normalized into the second part of speech.
[0016] Optionally, querying a correspondence between a pre-configured normalized word class expression and at least one non-normalized expression to determine the normalized word class expression that matches the first word class includes:
[0017] If the target non-standardized expression is found to match the first part of speech, the part of speech standardization expression matched by the first part of speech is determined to be the part of speech standardization expression corresponding to the target non-standardized expression.
[0018] Optionally, querying a correspondence between a pre-configured normalized word class expression and at least one non-normalized expression to determine the normalized word class expression that matches the first word class includes:
[0019] If no non-normalized expression is found to match the first part of speech, determining a first basic part of speech and a first root word in the first part of speech;
[0020] If a normalized root word in any normalized expression of a part of speech is found to match the first root word, then determining that the normalized expression of the part of speech that matches the first part of speech is composed of the first basic part of speech and the normalized root word;
[0021] If a normalized basic part of speech in any normalized part of speech expression is found to match the first basic part of speech, it is determined that the normalized part of speech expression matched by the first part of speech consists of the normalized basic part of speech and the first root.
[0022] Optionally, generating a target data table based on the second part of speech includes:
[0023] determining a second basic word class and a second root in the second word class;
[0024] Determining a target domain corresponding to the second root word based on a pre-configured correspondence between root words and domains;
[0025] A target data table is generated based on the second part of speech and the target domain.
[0026] Optionally, generating at least one application programming interface for editing the target data table based on the target data table includes:
[0027] For any editing function, the name of the target data table and the name of the database storing the target data table are determined as output parameters of the editing function;
[0028] determining each second part of speech included in the target data table as an input parameter of the editing function;
[0029] Based on the output parameters, the input parameters and the preset editing logic corresponding to the editing function, an application programming interface corresponding to the editing function is generated.
[0030] Optionally, based on at least one application programming interface, generating a functional interface corresponding to the application programming interface includes:
[0031] In response to an operation of a button control in the configuration canvas, a property configuration interface is displayed, wherein a plurality of services are displayed in the property configuration interface, and each service corresponds to an application programming interface;
[0032] In response to an operation of selecting a target service, associating the button control with an application programming interface corresponding to the target service;
[0033] After the association is completed, a component library is displayed, which includes multiple components, each of which corresponds to a parameter of the application programming interface corresponding to the target service;
[0034] In response to a drag operation on any component in the component library, the component is placed in the canvas at the location where the drag operation ends;
[0035] In response to the operation of triggering interface generation, a functional interface of an application programming interface corresponding to the target service is generated based on the canvas.
[0036] In a second aspect, an embodiment of the present disclosure provides a data processing device, including:
[0037] An acquisition module, used for acquiring a first part of speech for constructing a data table;
[0038] a first generating module, configured to normalize the first part of speech into a second part of speech, and generate a target data table based on the second part of speech;
[0039] A second generating module is used to generate at least one application programming interface for editing the target data table based on the target data table, wherein different application programming interfaces correspond to different editing functions;
[0040] The response module is used to edit the target data table in response to a calling operation of at least one application programming interface.
[0041] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0042] Memory;
[0043] processor; and
[0044] computer programs;
[0045] The computer program is stored in the memory and is configured to be executed by the processor to implement the data processing method as described above.
[0046] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned data processing method when the computer program is executed by a processor.
[0047] The embodiments of the present disclosure provide a data processing method, device, electronic device and storage medium. The data processing method obtains a first word class for constructing a data table. The first word class can be information input by a user, normalizes the first word class into a second word class, that is, normalizes the input information into standard information, and generates a target data table based on the second word class. Subsequently, at least one application programming interface is generated according to the target data table. The application programming interface can be used to edit the target data table. For example, through the application programming interface, word classes can be added, deleted, modified and queried in the target data table. The method provided by the present disclosure can normalize the information input by the user into standard information. The application programming interface generated by the data table generated based on the standard information is also standardized and has strong compatibility, which facilitates the subsequent maintenance and integration of the application programming interface. The method is relatively flexible and has a relatively fast processing speed, which improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0049] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 A flowchart of a data processing method provided in an embodiment of the present disclosure;
[0051] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0052] Figure 3 A schematic diagram of a functional interface provided by an embodiment of the present disclosure;
[0053] Figure 4 A schematic diagram of a front-end interface provided in an embodiment of the present disclosure;
[0054] Figure 5 A flowchart of a data processing method provided in an embodiment of the present disclosure;
[0055] Figure 6 A flowchart of a data processing method provided in an embodiment of the present disclosure;
[0056] Figure 7 A schematic structural diagram of a data processing device provided in an embodiment of the present disclosure;
[0057] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0058] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0060] In response to the above technical problems, the embodiments of the present disclosure provide a data processing method, which is described in detail through one or more of the following embodiments. When describing the data processing method, the nouns and concepts involved in the method are introduced first.
[0061] Metadata, also known as intermediary data or relay data, is data about data, or structured data used to provide information about a resource. It mainly describes the properties of data and is used to support functions such as indicating storage location, historical data, resource search, and file records.
[0062] Metadata management: standardized definition and management of word parts, word roots, and domains.
[0063] Roots, standardized nouns, such as name, type, and number.
[0064] Parts of speech are composed of basic parts of speech and word roots. For example, user names, user types, and project numbers can be understood as basic parts of speech.
[0065] A domain defines the word type and the number of characters it can store (its length). In a file system, a domain, also known as a field type, is an indivisible unit of data. For example, it can be described by data types such as binary, character, or string.
[0066] Data items, consisting of word classes and domains, are a basic attribute feature of a data table.
[0067] A data table consists of at least one data item.
[0068] Figure 1 A flow chart of a data processing method provided in an embodiment of the present disclosure, specifically including the following steps: Figure 1 The following steps S110 to S140 are shown:
[0069] S110 : Obtain a first part of speech for constructing a data table.
[0070] like Figure 2 As shown, Figure 2A schematic diagram of an application scenario provided for an embodiment of the present disclosure. The data processing method in the present disclosure can be executed by the terminal 21 or the server 20. In one possible implementation, the terminal 21 is configured with a metadata management platform, and the server 20 can be a server corresponding to the metadata management platform. The terminal 21 obtains the first word class input by the user through the metadata management platform, and normalizes the first word class, and sends the second word class after the first word class is normalized to the server 20, and the server 20 generates an application programming interface according to the second word class. In another possible implementation, the server 20 is configured with a metadata management platform, obtains the first word class input by the user through the metadata management platform, and normalizes the first word class, and then generates an application programming interface according to the second word class after the first word class is normalized. The method for implementing data processing by the terminal 21 is the same as that of the server 20, which will not be repeated here. It can be understood that, if Figure 2 The application scenarios shown are merely illustrative and not intended to be limiting. Furthermore, this embodiment does not specifically limit the metadata management platform. For example, the metadata management platform may be a platform capable of receiving and normalizing data. The following describes the data processing method using server 20 as an example.
[0071] It is understandable that the server 20 obtains the first word class for constructing the data table. The first word class can be information entered by the user in the metadata management platform. For example, the first word class can be the user name, or the user's name, or the user's username.
[0072] S120: Normalize the first part of speech into a second part of speech, and generate a target data table based on the second part of speech.
[0073] Currently, during the database development process, that is, the data management process, relevant developers need to write a large number of table creation statements on the development platform. The names, styles, and data types of the word classes in the table creation statements are all defined according to the developer's habits, and the data specifications between different project groups are not unified. In other words, the table creation statements written based on each project cannot be used in conjunction, and the names of the word classes and word roots in the statements are also different. This makes it inconvenient for the back-end to complete interface development based on the table creation language, as well as maintenance and integration between interfaces, and the development method is inflexible.
[0074] It is understandable that, based on the above-mentioned S110, and in response to the above-mentioned problem, the metadata management platform provided in the embodiment of the present disclosure normalizes the acquired first part of speech into the second part of speech, that is, normalizes the user-entered information. The metadata management platform can automatically convert the input information into standard and standardized information according to the specifications set within the platform. The specifications set within the platform can be set by the user according to their needs. The specifications can be to directly normalize the user-entered information into standard English information, or to translate the input Chinese information (first part of speech) into English and normalize the translated English into standard English information (second part of speech). For example, if the input Chinese information is a user name, the user name is translated into English User Name, and then the User Name is normalized into Ur_nm, where Ur_nm is called the second word class, and the word class is composed of a basic word class and a root, Ur is the basic word class, and nm is the root; for another example, if the input information is User_Name or User_name, the input information is directly normalized into the second word class Ur_nm; for another example, if the input information is a currency code, the currency code is translated into English, where the English word for currency is Currency and the English word for code is Code. The standard English information (second word class) corresponding to the currency code is determined based on the translated English. The standard word class of the first word class currency code and the second word class can be CcyCd, where Ccy is the basic word and Cd is the root.
[0075] Optionally, generating a target data table based on the second part of speech in the above S120 specifically includes: determining a second basic part of speech and a second root in the second part of speech; determining a target domain corresponding to the second root based on a pre-configured correspondence between the root and the domain; and generating a target data table based on the second part of speech and the target domain.
[0076] As can be understood, the metadata management platform determines the second basic word class and second root in the normalized second word class. For example, in the normalized second word class Ur_nm, Ur is the second basic word class and nm is the second root. Then, based on the pre-configured correspondence between roots and domains, the platform determines the target domain corresponding to the second root, i.e., the matching domain for the second root. The domain defines the data type, value range, component display method, and data content judgment rules corresponding to the second word class. For example, the data type in the domain corresponding to the second word root nm can be a string, and can also include the length of the string and the display method of the components, which can be displayed in a drop-down selection or input mode. Data items are generated based on the second word class and the target domain, and a data table is generated from the data items. As can be understood, users can enter multiple first word classes at once in the metadata management platform, determine the data items corresponding to each first word class, and generate a data table based on the multiple data items. In other words, the data table will include at least one data item, and there is no limit on the number of first word classes entered.
[0077] For example, see Table 1, which is a table of multiple data items consisting of a second word class and a target domain. The data items corresponding to each first word class determined based on multiple first word classes input by the user can be stored in the form of Table 1 or in text form. The specific storage form is not limited. Each data item includes a word class and a domain. Each word class consists of a basic word class and a root word. The row where sequence number 1 is located in Table 1 is a data item, and the row where sequence number 2 is located is also a data item. Table 1 includes three data items in total. Among them, in the word class Cocos_uid, Cocos is the basic word class, uid is the root word, and the domain of the word class Cocos_uid (second word class) is VARCHAR (20). VARCHAR represents the data type of the word class. In the word class Placement_id, Placement is the basic word class, and id is the root word. Specifically, VARCHAR is used to represent character data. VARCHAR can also store variable-length character strings. The 20 in the brackets represents the length of the character string. The content of the other data items is the same as the data item corresponding to sequence number 1, and will not be repeated here.
[0078] Table 1
[0079] Serial number part of speech domain 1 Cocos_uid VARCHAR(20) 2 Cocos_appid VARCHAR(45) 3 Placement_id VARCHAR(45)
[0080] It is understandable that the generated target data table includes the content of each data item, specifically the content of the second word class in each data item, that is, the second word class can be understood as the header of the target data table. The domain of the second word class limits the format of the information that can be entered in the area corresponding to the second word class in the target data table. For example, if the type of the target data table is an information registration table, then the second word class can be user name, date of birth, ID number and mobile phone number, etc. User name, date of birth, ID number and mobile phone number can be used as the header of the target data table, and the domain of the second word class mobile phone number can be set to char (11), where char is integer data, which is a basic data type in computer programming language that can only accommodate single characters. 11 is the length of the character, that is, 11 numbers can be entered in the input area corresponding to the mobile phone number.
[0081] S130 : Generate at least one application programming interface for editing the target data table based on the target data table, where different application programming interfaces correspond to different editing functions.
[0082] It is understandable that, based on the above S120, after generating the target data table according to the second word class of the specification, the server will continue to generate at least one application programming interface based on the target data table. Specifically, by selecting input and output parameters in the target data table, the target application programming interface corresponding to the target function (add, delete, query, and modify) will be automatically generated. At least one application programming interface can be generated based on each data item in the target data table. The application programming interface can be used to edit the editable area in the target data table. The editable area can be understood as other areas where data can be edited except for the table header, and different application programming interfaces correspond to different editing functions. The application programming interface can be an add interface, a delete interface, a modify interface, and a query interface, which correspond to the editing functions of add, delete, modify, and query respectively.
[0083] S140: Edit the target data table in response to a calling operation of at least one application programming interface.
[0084] It is understandable that, based on the above S130, after at least one application programming interface is generated, the target data table is edited in response to the calling operation of the application programming interface. For example, data can be added to the target data table by adding an interface, data can be deleted from the target data table by deleting an interface, data in the target data table can be modified by modifying an interface, and data in the data table can be queried by querying an interface.
[0085] Optionally, the method further includes: generating a functional interface corresponding to the application programming interface based on at least one application programming interface.
[0086] It is understandable that corresponding functional interfaces can be created for the application programming interface, for example, an add interface can be created for adding an interface, a delete interface can be created for deleting an interface, a modify interface can be created for modifying an interface, etc., and data can be added to the target data table, deleted from the target data table, or modified through each functional interface.
[0087] Optionally, a functional interface corresponding to the application programming interface is generated, specifically including: in response to the operation of configuring a button control in the canvas, displaying a property configuration interface, displaying multiple services in the property configuration interface, and each service corresponds to an application programming interface; in response to the operation of selecting a target service, associating the button control with the application programming interface corresponding to the target service; after completing the association, displaying a component library, the component library includes multiple components, and each component corresponds to a parameter of the application programming interface corresponding to the target service; in response to the dragging operation of any component in the component library, placing the component at the position where the dragging operation ends in the canvas; in response to the operation of triggering interface generation, generating a functional interface of the application programming interface corresponding to the target service based on the canvas.
[0088] It is understandable that the server provides a canvas, which is used to develop and set the functional interface of the above-generated application programming interface. The functional interfaces of "add", "delete", "find" and "modify" can be developed. For example, taking the development of the "add" functional interface as an example, after adding a button to the canvas, the property configuration interface can be directly displayed, and the property configuration interface can also be displayed through the resend button. The button can then be configured through the property configuration interface. In the property configuration interface, multiple services can be displayed in the form of a drop-down box. Each service corresponds to a function, that is, each application programming interface implements a function. The application programming interface can be understood as a service, and the function refers to the above-mentioned addition, deletion, modification and query functions. Select service 1 (corresponding to the "add" function), then associate the button with the add interface (add API), and the button can be configured as a save button, an OK button or other buttons. After adding an interface to the button, the component library is displayed. The component library includes multiple components. Each component corresponds to a parameter of the added interface. The parameter is a data item in the target data table. For example, if the added interface has 3 input parameters and 2 output parameters, then 5 components will be displayed in the component library. Each component corresponds to a parameter, and each parameter is a data item. The constraints of each component are defined by the domain of the target data item corresponding to the component. The domain of the target data item defines the component's display method, name, data type, value range, and data constraints. Then, you can drag the component to the canvas to implement the layout and development of the "Add" function interface. After the user clicks Save, the development of the "Add" function interface is completed.
[0089] For example, see Figure 3 , Figure 3 A schematic diagram of a development interface provided by an embodiment of the present disclosure. Figure 3It includes a canvas 310 and a property configuration interface 320. Taking the above-mentioned generation of the "Add" function interface as an example, a button 311 is added to the canvas 310, and the canvas 310 will display a button 321. The button can be named Save and the button is recorded as Save button 311. The Save button 311 is then triggered. A service can be configured for the Save button 311 in the property configuration interface 320. The property configuration interface 320 includes a drop-down service selection list 321. Multiple services can be seen in the service selection list 321, including Service 1 to Service 4. The corresponding service can be selected for the Save button 311. If Service 1 corresponds to the Add function implemented by the Add interface, click Service 1 in the property configuration interface 320 to associate the Save button 311 with the Add interface. After associating the Save button 311 with the Add interface, the component library of Service 1 will be displayed. The component library 310 of Service 1 includes 5 components. Components 1 to 3 can be regarded as 3 input parameters in the Add interface, and components 4 and 5 can be regarded as 2 output parameters in the Add interface. You can also directly drag components 1 to 5 in the component library to the canvas 310. After completing the layout and development of the Add interface in the canvas, the Add interface can be added as follows: Figure 3 As shown in 340, it is marked as the adding interface 340. In the adding interface 340, only components corresponding to three input parameters can be set. The user only needs to input the information to be added in the target data table. The components corresponding to the three input parameters are marked as 342, and the input boxes corresponding to the three components are marked as 341. The adding interface 340 also includes a save button 343. Enter information in the input boxes corresponding to components 1 to 3 in the adding interface 340. After clicking the save button 343, you can add data to the target data table through the adding interface.
[0090] It is understood that after the functional interface corresponding to the above-mentioned application programming interface is generated and stored, a network address corresponding to the functional interface is generated. This network address is also called a Uniform Resource Locator (URL). When developing the front-end interface, a button control labeled "Add" on the front-end interface can be associated with this network address to carry out the development of the front-end interface. After the front-end interface is developed, the functional interface corresponding to the network address is opened in response to the triggering operation of the button control in the front-end interface.
[0091] For example, see Figure 4 , Figure 4 A schematic diagram of a front-end interface provided by an embodiment of the present disclosure, Figure 4The front-end interface 400 includes an operation area and a data table display area 450. The operation area includes an add button 410, a query button 420, a delete button 430, and a modify button 440. The data display area 450 includes an editable area 451. In response to the trigger operation of the add button 410, a trigger interface 460 is displayed. The trigger interface 460 is based on the trigger interface 400 and directly displays the add interface 470 associated with the add button 410. In the add interface 470, the above Figure 3 In the layout of the add interface, enter information in the input box corresponding to each component in the add interface 470, click the Save button (the Save button is associated with the add interface), and then call the add interface to realize the function of adding data in the editable area 451 of the front-end interface.
[0092] The embodiments of the present disclosure provide a data processing method, device, electronic device and storage medium. The data processing method obtains a first word class for constructing a data table. The first word class can be information input by a user, normalizes the first word class into a second word class, that is, normalizes the input information into standard information, and generates a target data table based on the second word class. Subsequently, at least one application programming interface is generated according to the target data table. The application programming interface can be used to edit the target data table. For example, through the application programming interface, word classes can be added, deleted, modified and queried in the target data table. The method provided by the present disclosure can normalize the information input by the user into standard information. The application programming interface generated by the data table generated based on the standard information is also standardized and has strong compatibility, which facilitates the subsequent maintenance and integration of the application programming interface. The method is relatively flexible and has a relatively fast processing speed, which improves the user experience.
[0093] Based on the above embodiments, Figure 5 A flow chart of a data processing method provided by an embodiment of the present disclosure is shown. Optionally, the first part of speech is normalized into the second part of speech in the above S120, specifically including the following steps: Figure 5 The following steps S510 to S520 are shown:
[0094] S510: Query the correspondence between pre-configured normalized word class expressions and at least one non-normalized expression to determine the normalized word class expression that matches the first word class.
[0095] It is understandable that the correspondence between the pre-configured word class normalized expression and at least one non-normalized expression is queried, that is, the metadata management platform has pre-established a plurality of correspondences between word class normalized expressions and non-normalized expressions, the word class normalized expression is the above-mentioned second word class, for example, the second word class Ur_nm, and the Cocos_uid in the above Table 1, etc., are all word class normalized expressions, and the word class non-normalized expression can be the input information (first word class) or the corresponding information when the input information is translated into English, for example, the input information User Name, User_Name, Username and User_name, or the input information is a user name, a user name, etc., the user name, the user name can be translated into English User Name, among which User Name, User_Name, Username and User_name can be called non-normalized expressions, and Ur_nm can be regarded as the word class normalized expression corresponding to the word class non-normalized expressions such as User Name, User_Name, Username and User_name. At this time, the word class normalized expression matched by the first word class input is Ur_nm, that is, in the metadata management platform, the user enters the user name, user name, User When using Name, User_Name, Username, and User_name, the normalized part-of-speech expression Ur_nm will be matched.
[0096] Optionally, the above S510 specifically includes: if it is found that the target non-standardized expression matches the first part of speech, determining that the part of speech normalized expression matched by the first part of speech is the part of speech normalized expression corresponding to the target non-standardized expression.
[0097] It is understandable that if a target non-standardized expression that matches the first word class is queried, that is, there is a correspondence between a non-standardized expression that matches the first word class and a normalized expression of the word class in the metadata management platform, the normalized expression of the word class corresponding to the target non-standardized expression can be directly determined as the normalized expression of the word class matched by the first word class. For example, the first word class is the user name, and the user name will be translated into English User Name. If a correspondence between the non-standardized expression UserName and the normalized expression Ur_nm is queried, the normalized expression of the word class of the first word class can be directly determined as Ur_nm.
[0098] Optionally, the above S510 specifically also includes: if no non-standardized expression is found to match the first word class, then determining the first basic word class and the first root in the first word class; if the standard root in any word class standard expression is found to match the first root, then determining that the word class standard expression matched by the first word class is composed of the first basic word class and the standard root; if the standard basic word class in any word class standard expression is found to match the first basic word class, then determining that the word class standard expression matched by the first word class is composed of the standard basic word class and the first root.
[0099] Understandably, if the target non-standardized expression that matches the first part of speech is not found, the first basic part of speech and the first root in the first part of speech are determined, that is, the first part of speech input by the user does not have a matching non-standardized expression of the part of speech, then the first root and the first basic part of speech in the first part of speech are determined. For example, the first part of speech input by the user is name, and the name is translated into English as Full name. Full name can also be recorded as the first part of speech. If the non-standardized expression of the part of speech that matches Full name is not found, the first basic part of speech Full and the first root name are determined in the first part of speech Full name; if the standard basic part of speech in any part of speech standardization expression matches the first basic part of speech, that is, whether there is a standard basic part of speech that matches the first basic part of speech in the part of speech standardization expression, for example, if there is a standard basic part of speech User that matches the first basic part of speech Full in the part of speech standardization expression, then it is determined that the initial part of speech standardization expression matched by the first part of speech is composed of the standard basic part of speech and the first root, that is, the initial part of speech standardization expression matched by the first part of speech is User Similarly, if a normalized root in any part-of-speech normalized expression is found to match the first root, it is determined that the initial part-of-speech normalized expression matched by the first part-of-speech is composed of the first basic part-of-speech and the normalized root.
[0100] S520: Based on the normalized expression of the first part of speech that matches the first part of speech, normalize the first part of speech into a second part of speech.
[0101] It can be understood that, based on the above S510, after determining the initial word class normalized expression corresponding to the first word class, and then according to the correspondence between the pre-configured word class normalized expression and at least one non-normalized expression found in the query, in this case, the initial word class normalized expression corresponding to the first word class determined based on S510 can be understood as the word class non-normalized expression, and then the first word class is normalized to the second word class, that is, the corresponding word class normalized expression Ur_nm is determined according to the initial word class normalized expression User name.
[0102] A data processing method provided by an embodiment of the present disclosure determines the normalized expression of the word class matched by the first word class by querying the correspondence between a pre-configured normalized expression of the word class and at least one non-normalized expression, and then normalizes the first word class to the second word class based on the normalized expression of the word class matched by the first word class. When the normalized expression of the word class corresponding to the first word class cannot be directly determined according to the first word class, the first basic word class and the first root in the first word class can be determined, and matching is performed according to the first basic word class and the first root respectively. If a normalized basic word class matching the first basic word class is matched, it can be determined that the normalized expression of the word class matched by the first word class is composed of the normalized basic word class and the first root, or if a normalized root matching the first root is matched, it can be determined that the normalized expression of the word class matched by the first word class is composed of the first basic word class and the normalized root. The first word class can be normalized to the maximum extent, the method is relatively flexible, and the user experience is relatively good.
[0103] During the development of the back-end interface, the existing technology still requires a lot of code writing for the development of the application programming interface. This situation causes two major problems in the development of the back-end interface: First, since there is no unified standard for the definition of word classes and domains in the database, the data during the development of the application programming interface is non-standard. When the front-end interface and the back-end interface need to be developed in coordination, the data information on both sides needs to be mapped and unified, which is cumbersome. Secondly, the entire back-end interface development process requires technicians to manually write a large amount of code, which requires a lot of manpower and material resources. The entire development process is relatively poorly standardized, the degree of automation is relatively low, and the user experience is also relatively poor. Therefore, in order to solve the above problems, on the basis of the above embodiments, a data processing method provided in the embodiment of the present disclosure generates at least one application programming interface for editing a target data table based on a target data table, specifically including the following: Figure 6 The following steps S610 to S630 are shown:
[0104] S610 : For any editing function, determine the name of the target data table and the name of the database storing the target data table as output parameters of the editing function.
[0105] It can be understood that for any editing function, the editing function can be an adding function, a deleting function, a modifying function and a querying function. The name of the target data table and the name of the database storing the target data table are determined as the output parameters of the editing function. The output parameters can be understood as the database targeted by the edited data and the specific data table in the database. Taking the adding function as an example, the output parameters can be understood as which data table in which data table the added data is to be written, that is, the data table to be edited is clearly defined.
[0106] S620: Determine each second part of speech included in the target data table as an input parameter of the editing function.
[0107] It can be understood that, based on the above S610, each second word class included in the target data table is determined as the input parameter of the editing function, that is, the information input by the user is clarified. For example, the target data table is an information data table, and the name, date of birth and mobile phone number in the second word class are used as input parameters for adding the function. Subsequently, the relevant information of the name, date of birth and mobile phone number can be entered at one time in the adding interface, and the save button in the adding interface is responded to to write the input basic information into the area corresponding to the name, date of birth and mobile phone number in the target data table.
[0108] S630: Generate an application programming interface corresponding to the editing function based on the output parameters, the input parameters, and the preset editing logic corresponding to the editing function.
[0109] It can be understood that on the basis of the above S620, the application programming interface corresponding to the editing function is automatically generated based on the input and output parameters determined by each second word class in the target data table and the preset editing logic corresponding to the editing function. The preset editing logic corresponding to the editing function can be a logic set by the user according to the needs of the user. For example, the editing logic corresponding to the adding function, deleting function, modifying function and query function can be pre-set.
[0110] A data processing method provided by an embodiment of the present disclosure determines the name of a target data table and the name of a database storing the target data table as output parameters of the editing function, determines each second word class included in the target data table as an input parameter of the editing function, and then generates an application programming interface corresponding to the editing function based on the output parameters, input parameters and the preset editing logic corresponding to the editing function. It only needs to determine the input and output parameters and the editing logic corresponding to the editing function to complete the application programming interface that can realize the editing function. When realizing the application programming interface of multiple editing functions, there is no need to repetitively write code. The operation is simple and flexible, can effectively reduce human and material resources, and is relatively practical.
[0111] Figure 7 The data processing device provided by the embodiment of the present disclosure can execute the processing flow provided by the above data processing method embodiment, such as Figure 7 As shown, the data processing device 700 includes:
[0112] A first generating module 710 is configured to normalize the first part of speech into a second part of speech and generate a target data table based on the second part of speech;
[0113] A second generating module 720 is configured to generate at least one application programming interface for editing the target data table based on the target data table, wherein different application programming interfaces correspond to different editing functions;
[0114] The response module 730 is configured to edit the target data table in response to a call operation of at least one application programming interface.
[0115] Optionally, the apparatus 700 further includes a third generating module, which is specifically configured to:
[0116] Based on at least one application programming interface, a functional interface corresponding to the application programming interface is generated.
[0117] Optionally, the first generating module 710 normalizes the first part of speech into the second part of speech, including:
[0118] Querying a correspondence between a pre-configured normalized expression of a part of speech and at least one non-normalized expression to determine a normalized expression of a part of speech that matches the first part of speech;
[0119] Based on the normalized expression of the part of speech matched by the first part of speech, the first part of speech is normalized into the second part of speech.
[0120] Optionally, the first generating module 710 queries the correspondence between the pre-configured normalized word representation and at least one non-normalized representation to determine the normalized word representation that matches the first word representation, including:
[0121] If the target non-standardized expression is found to match the first part of speech, the part of speech standardization expression matched by the first part of speech is determined to be the part of speech standardization expression corresponding to the target non-standardized expression.
[0122] Optionally, the first generating module 710 queries the correspondence between the pre-configured normalized word representation and at least one non-normalized representation to determine the normalized word representation that matches the first word representation, including:
[0123] If no non-normalized expression is found to match the first part of speech, determining a first basic part of speech and a first root word in the first part of speech;
[0124] If a normalized root word in any normalized expression of a part of speech is found to match the first root word, then determining that the normalized expression of the part of speech that matches the first part of speech is composed of the first basic part of speech and the normalized root word;
[0125] If a normalized basic part of speech in any normalized part of speech expression is found to match the first basic part of speech, it is determined that the normalized part of speech expression matched by the first part of speech consists of the normalized basic part of speech and the first root.
[0126] Optionally, generating a target data table based on the second part of speech in the first generating module 710 includes:
[0127] determining a second basic word class and a second root in the second word class;
[0128] Determining a target domain corresponding to the second root word based on a pre-configured correspondence between root words and domains;
[0129] A target data table is generated based on the second part of speech and the target domain.
[0130] Optionally, the generating of at least one application programming interface for editing the target data table based on the target data table in the second generating module 720 includes:
[0131] For any editing function, the name of the target data table and the name of the database storing the target data table are determined as output parameters of the editing function;
[0132] determining each second part of speech included in the target data table as an input parameter of the editing function;
[0133] Based on the output parameters, the input parameters and the preset editing logic corresponding to the editing function, an application programming interface corresponding to the editing function is generated.
[0134] Optionally, the third generation module generates a functional interface corresponding to the application programming interface based on at least one application programming interface, including:
[0135] In response to an operation of a button control in the configuration canvas, a property configuration interface is displayed, wherein a plurality of services are displayed in the property configuration interface, and each service corresponds to an application programming interface;
[0136] In response to an operation of selecting a target service, associating the button control with an application programming interface corresponding to the target service;
[0137] After the association is completed, a component library is displayed, which includes multiple components, each of which corresponds to a parameter of the application programming interface corresponding to the target service;
[0138] In response to a drag operation on any component in the component library, the component is placed in the canvas at the location where the drag operation ends;
[0139] In response to the operation of triggering interface generation, a functional interface of an application programming interface corresponding to the target service is generated based on the canvas.
[0140] Figure 7 The data processing device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0141] Figure 8 The electronic device provided by the embodiment of the present disclosure can execute the processing flow provided by the above embodiment, such as Figure 8 As shown, the electronic device 800 includes: a processor 810, a communication interface 820 and a memory 830; wherein the computer program is stored in the memory 830 and is configured so that the processor 810 executes the above-mentioned data processing method.
[0142] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the data processing method described in the above embodiment.
[0143] In addition, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the data processing method as described above is implemented.
[0144] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0145] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized in that: include: Get the first part of speech for constructing the data table; Normalizing the first part of speech into a second part of speech, and generating a target data table based on the second part of speech; generating at least one application programming interface for editing the target data table based on the target data table, wherein different application programming interfaces correspond to different editing functions; In response to a calling operation of the at least one application programming interface, editing the target data table; The step of generating a target data table based on the second part of speech includes: determining a second basic part of speech and a second root word in the second part of speech; Determining a target domain corresponding to the second word root based on a pre-configured correspondence between word roots and domains; the target domain defines a data type corresponding to the second part of speech; generating a target data table based on the second part of speech and the target domain; The step of normalizing the first part of speech into a second part of speech includes: Querying the correspondence between pre-configured normalized expressions of word classes and at least one non-normalized expression to determine the normalized expression of the word class that matches the first word class; including: if no non-normalized expression is found to match the first word class, determining the first basic word class and the first root in the first word class; if a normalized root in any normalized expression of word class is found to match the first root, determining that the normalized expression of word class that matches the first word class is composed of the first basic word class and the normalized root; if a normalized basic word class in any normalized expression of word class is found to match the first basic word class, determining that the normalized expression of word class that matches the first word class is composed of the normalized basic word class and the first root; Normalizing the first part of speech into a second part of speech based on the normalized part of speech expression matched by the first part of speech; The step of generating at least one application programming interface for editing the target data table based on the target data table includes: For any editing function, determining the name of the target data table and the name of the database storing the target data table as output parameters of the editing function; determining each second part of speech included in the target data table as an input parameter of the editing function; Based on the output parameters, the input parameters and the preset editing logic corresponding to the editing function, an application programming interface corresponding to the editing function is generated.
2. The method according to claim 1, characterized in that The method further comprises: Based on the at least one application programming interface, a functional interface corresponding to the application programming interface is generated.
3. The method according to claim 2, characterized in that The generating, based on the at least one application programming interface, a functional interface corresponding to the application programming interface comprises: In response to an operation of a button control in the configuration canvas, a property configuration interface is displayed, wherein the property configuration interface displays a plurality of services, each service corresponding to an application programming interface; In response to an operation of selecting a target service, associating the button control with an application programming interface corresponding to the target service; After completing the association, displaying a component library, wherein the component library includes a plurality of components, each component corresponding to a parameter of an application programming interface corresponding to the target service; In response to a drag operation of any component in the component library, placing the component in the canvas at a position where the drag operation ends; In response to the operation of triggering interface generation, a functional interface of the application programming interface corresponding to the target service is generated based on the canvas.
4. The method according to claim 1, wherein The querying of the correspondence between the pre-configured normalized word class expression and at least one non-normalized expression to determine the normalized word class expression that matches the first word class includes: If the target non-standardized expression is found to match the first part of speech, the normalized part of speech expression matched by the first part of speech is determined to be the normalized part of speech expression corresponding to the target non-standardized expression.
5. A data processing device, characterized in that: include: An acquisition module, used for acquiring a first part of speech for constructing a data table; a first generating module, configured to normalize the first part of speech into a second part of speech, and generate a target data table based on the second part of speech; A second generating module is configured to generate at least one application programming interface for editing the target data table based on the target data table, wherein different application programming interfaces correspond to different editing functions; a response module, configured to edit the target data table in response to a call operation of the at least one application programming interface; Wherein, the first generating module is used for: Determining a second basic word class and a second root in the second word class; determining a target domain corresponding to the second root based on a pre-configured correspondence between roots and domains; the target domain defines a data type corresponding to the second word class; generating a target data table based on the second word class and the target domain; Wherein, the first generating module is used for: Querying the correspondence between pre-configured normalized expressions of word classes and at least one non-normalized expression to determine the normalized expression of word classes that matches the first word class; including: if no non-normalized expression is found to match the first word class, determining the first basic word class and the first root in the first word class; if a normalized root in any normalized expression of word class is found to match the first root, determining that the normalized expression of word class that matches the first word class is composed of the first basic word class and the normalized root; if a normalized basic word class in any normalized expression of word class is found to match the first basic word class, determining that the normalized expression of word class that matches the first word class is composed of the normalized basic word class and the first root; based on the normalized expression of word class that matches the first word class, normalizing the first word class to a second word class; Wherein, the second generating module is used for: For any editing function, the name of the target data table and the name of the database storing the target data table are determined as the output parameters of the editing function; each second word class included in the target data table is determined as the input parameter of the editing function; based on the output parameters, the input parameters and the preset editing logic corresponding to the editing function, the application programming interface corresponding to the editing function is generated.
6. An electronic device, characterized in that: include: Memory; processor; as well as computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the data processing method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Application programming interface creating method and device
CN110083384A
Script aided design method and device based on word root table
CN110737432A