Method for generating configuration data, data acquisition method, equipment and program product
By generating configuration data, using SDK to build control metadata and quickly render controls, the problems of low development efficiency and data decentralized management of multiple teams are solved, and efficient and unified business indicator management and development efficiency are achieved.
Patent Information
- Application Number
- CN202510375056.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, developing a business process or business function requires different development teams to develop multiple pages separately, resulting in large workload and low efficiency of page development, and the business indicator configuration data is scattered in different systems and is difficult to manage in a unified manner, which is easy to cause errors and risks.
By generating configuration data, the control metadata is constructed using the Software Development Toolkit (SDK), template code is generated, and parsed into a specified data structure in the background, to realize the rapid visual rendering and data configuration of the control, and support the unified management of business metric data.
It improves development efficiency, reduces the workload of repeated development, reduces the risk of system iteration, and realizes unified management and efficient maintenance of business indicator data.
Smart Images

Figure CN120371415A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computers and the like, and particularly relates to a method for generating configuration data, a data acquisition method, an electronic device, a storage medium, and a computer program product. Background Art
[0002] Generally, when designing a business function for business personnel or customers, developers need to develop a visual interaction page, develop the functional logic of the page, and need to interface in aspects such as interfaces, and finally complete the development of the page.
[0003] A business process or business function may require different development teams to develop multiple pages. Then, for each new page developed or each new business function added, manual interface development and function development are required. For example, this makes the workload of page development relatively large and the development efficiency relatively low. Summary of the Invention
[0004] The present disclosure provides a method for generating configuration data, a data acquisition method, an electronic device, a storage medium, and a computer program product.
[0005] In a first aspect of the present disclosure, a method for generating configuration data is proposed, including: constructing metadata for an input code containing basic control information received to obtain a predefined template code containing control metadata; and in response to receiving a parsing instruction, obtaining the template code and parsing the template code to generate control configuration data represented in a specified data structure, where the control configuration data is used to render corresponding controls in a page according to a predefined control style.
[0006] According to some embodiments of the present disclosure, constructing metadata for an input code containing basic control information received to obtain a predefined template code containing control metadata includes: identifying a code segment with a specified identifier from the received input code as basic control information; and constructing metadata based on the basic control information to obtain a predefined template code containing control metadata.
[0007] According to some embodiments of the present disclosure, the execution entity for constructing the metadata can identify multiple specified identifiers, and different types of the specified identifiers correspond to different control metadata of the same control, and there are differences in control attributes between different control metadata of the same control.
[0008] According to some embodiments of the present disclosure, the execution entity for constructing metadata for the input code is a preconfigured software development kit.
[0009] According to some embodiments of the present disclosure, the basic control information includes one or more of the field type and field name of the control.
[0010] According to some embodiments of the present disclosure, after obtaining the predefined template code containing control metadata, the method further includes: storing the template code; obtaining the template code, including: obtaining the stored template code from the stored data.
[0011] According to some embodiments of the present disclosure, the obtained template code is all the template codes related to the specified service.
[0012] According to some embodiments of the present disclosure, after obtaining the template code, the method further includes: obtaining the attribute values of the corresponding controls from the corresponding business system according to the template code; generating control configuration data represented in a specified data structure, including: generating control configuration data represented in a specified data structure through the parsing result and the obtained attribute values.
[0013] A second aspect of the present disclosure provides a data acquisition method, including: generating control configuration data by the method of generating configuration data according to any of the above embodiments; sending the control configuration data to the front end that makes a parsing instruction, and the control configuration data is used to render the corresponding control on the page of the front end; in response to the save operation of the front end, obtaining and storing the business metric data input in the rendered control.
[0014] According to some embodiments of the present disclosure, in response to the save operation of the front end, a specified information sending action is further performed based on the business metric data, and the sending content or information recipient of the information sending action is related to the business metric data.
[0015] According to some embodiments of the present disclosure, among the stored business metric data, the business metric data corresponding to different business systems are marked with different identifiers.
[0016] According to some embodiments of the present disclosure, after obtaining the business metric data, the method further includes: caching the obtained business metric data to the corresponding business system.
[0017] According to some embodiments of the present disclosure, verification configuration data is also generated by the method of generating configuration data; obtaining and storing the business metric data input in the rendered control, including: obtaining the business metric data input in the rendered control, and performing format verification based on the verification configuration data; and if the format verification passes, storing the business metric data.
[0018] According to some embodiments of the present disclosure, the basic control information received during the generation of the control configuration data further includes verification rule information. In the template code constructed by metadata, the parsed part does not include the part corresponding to the verification rule information.
[0019] A third aspect of the present disclosure provides an electronic device, including: a memory storing execution instructions; and a processor that executes the execution instructions stored in the memory, such that the processor executes the method according to any of the above embodiments.
[0020] A fourth aspect of the present disclosure provides a readable storage medium storing a computer program, where the computer program, when executed by a processor, is used to implement the method according to any of the above embodiments.
[0021] A fifth aspect of the present disclosure provides a computer program product including a computer program, where the computer program, when executed by a processor, is used to implement the method according to any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings illustrate exemplary embodiments of the present disclosure and, together with the description, are used to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are included in this specification and form a part of this specification.
[0023] Figure 1 A schematic diagram of an application scenario of a method for generating configuration data according to some embodiments of the present disclosure is shown.
[0024] Figures 2 - 4 A schematic diagram of the overall flow of method M100 for generating configuration data according to some embodiments of the present disclosure is shown.
[0025] Figure 5 A schematic diagram of an application scenario of a data acquisition method M200 according to some embodiments of the present disclosure is shown.
[0026] Figure 6 A structural block diagram showing a page including controls according to some embodiments of the present disclosure is shown.
[0027] Figures 7 - 8 A schematic diagram of an application scenario of a data acquisition method M200 according to some other embodiments of the present disclosure is shown.
[0028] Figure 9 It is a schematic structural block diagram of a device for generating configuration data according to an embodiment of the present disclosure.
[0029] Figure 10It is a schematic block diagram of a data acquisition device according to an embodiment of the present disclosure.
[0030] Figure 11 It is a schematic block diagram of an electronic device 1000 according to an embodiment of the present disclosure. Detailed implementation manners
[0031] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific implementation manners described herein are only used to explain the relevant content and do not limit the present disclosure. Additionally, it should be noted that for the sake of description, only the parts related to the present disclosure are shown in the drawings.
[0032] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The technical solutions of the present disclosure will be described in detail below with reference to the drawings and embodiments.
[0033] Unless otherwise specified, the exemplary embodiments / examples shown are understood to provide exemplary features of various details of some ways that can implement the technical concept of the present disclosure in practice. Therefore, unless otherwise specified, without departing from the technical concept of the present disclosure, the features of various embodiments / examples can be additionally combined, separated, interchanged, and / or rearranged.
[0034] The terms used herein are for the purpose of describing specific embodiments and are not restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are also intended to include the plural forms. In addition, when the terms "comprise" and / or "include" and their variants are used in this specification, it is stated that there are the stated features, wholes, steps, operations, components, assemblies, and / or groups thereof, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, components, assemblies, and / or groups thereof. It should also be noted that, as used herein, the terms "substantially", "about", and other similar terms are used as approximate terms rather than degree terms, so they are used to explain the inherent deviations of measured values, calculated values, and / or provided values that those of ordinary skill in the art will recognize.
[0035] An enterprise usually has multiple development teams. Different development teams are responsible for developing and maintaining different parts of the business process, and work together to achieve the development and maintenance of the overall business process. When the product manager puts forward the requirement of developing a product (such as a page), the front-end personnel in the development team need to understand the business requirements and design the format and style of the page. The back-end personnel need to develop data interfaces to implement functions such as data storage, and need to conduct interface joint debugging on the function interfaces. After all configurations are completed, the page is put into use. In such a development method, whenever a new page is proposed or a new function is to be added to the page, it is necessary to repeat the development of relevant configurations and codes, resulting in a large workload and low development efficiency.
[0036] In addition, with the development of the business, there are more and more business rules and business metrics in different business scenarios. And since the business services are usually built based on the microservice concept, the granularity of the business services will be split relatively fine. For example, different development teams are responsible for developing different functions and maintaining their respective business services.
[0037] This will result in the configuration data of business metrics in the same business process being scattered in different business systems or storage locations, which is not conducive to the unified management and maintenance of data. And since different development teams do not know the content and maintenance methods maintained by other teams, it may cause unexpected errors and risks when modifying or updating business metrics.
[0038] Therefore, the present disclosure proposes a method for generating configuration data.
[0039] Figure 1 FIG. shows a schematic diagram of an application scenario of the method for generating configuration data according to some embodiments of the present disclosure. In this application scenario, it may include a business side 10 and a development system 20. The business side 10 can communicate with the development system 20 to perform data sending and receiving or instruction sending and receiving. In the present disclosure, both the business side 10 and the development system 20 respectively include at least one processor and at least one memory.
[0040] Exemplarily, the business side 10 can be the terminal device of business personnel, and the development system 20 can be the terminal device of development personnel. The development system 20 can receive the basic control information input by the development personnel, and construct metadata for the basic control information through the software development kit (SDK) configured by itself, so as to construct a template code containing the control data structure for subsequent control display. When the business personnel open the browser and enter the business configuration page at the business side 10, the business side 10 will send a parsing instruction to the development system 20, and the development system 20 will parse the control metadata in the template code into a representation of a specified data structure according to the parsing instruction, so as to expose the interface capabilities of the control for the business side 10 to perform page dynamic rendering and configure the control.
[0041] In Figure 1 The shapes and structures of the service terminal 10 and the development system 20 shown should not be construed as limiting the scope of protection of the present disclosure. In the present disclosure, the "terminal device" can be different types of electronic devices. For example, the terminal device can be a tablet computer, a laptop computer, a desktop computer, or other devices. Additionally, the development system 20 can be configured with a server, and the server can be a server with a physical form or a cloud server. The present disclosure does not limit the type of the server.
[0042] Figure 2 FIG. shows a schematic overall flow diagram of a method M100 for generating configuration data according to some embodiments of the present disclosure. As Figure 2 shown, the method includes step S110 and step S120. Among them, the method can be executed by the development system, for example, by the terminal device of the developer.
[0043] S110, construct metadata for the input code containing the basic information of the control, and obtain a predefined template code containing the control metadata.
[0044] The developer inputs the input code into the development system, and the development system constructs information such as the field structure of the control, thereby obtaining the template code. Among them, the input code is used to represent the data model defined by the developer. The data model is a model about the control and the field. The basic information of the control only contains a small amount of information about the control. For example, it can only contain the control name. Exemplarily, the input code contains the basic information m1 of the control, and m1 can be: "private String cityCode", where cityCode is the control name and is used to represent the city code. The input code received by the development system can include the basic information of multiple controls, and these controls are used to be finally displayed on the front-end page for users (business personnel or customers) to operate.
[0045] By constructing metadata for the input code, the data model defined by the developer is parsed into a specified data structure (abbreviated as the first data structure). Among them, each basic information of the control is equivalent to an instruction for the development system to automatically generate the control data structure. The development system can automatically identify each basic information of the control, and then automatically construct the content such as the field structure of the control based on the content in the basic information of the control, that is, the control metadata.
[0046] At the same moment, the control metadata constructed for the same basic information of the control is consistent, that is, before constructing the metadata, the development system is configured to construct the metadata according to predefined data structure and other information. Since it is automatically generated in a predefined manner, the obtained code can be called the template code.
[0047] For example, for the information m1, the generated control metadata data1 may include: "fieldName": "cityCode", "fieldDesc": "City code", "fieldType": "java.lang.Long". It can be understood that the content of the control metadata given here is only a code snippet, and the control metadata may also include more content. The input code may include the basic information of multiple controls, and the development system will output the template codes of the corresponding multiple controls.
[0048] Exemplarily, the execution entity for constructing metadata for the input code may be a pre-configured software development kit (hereinafter referred to as the SDK kit), that is, the development system is configured with the SDK kit, and the SDK kit is pre-configured, that is, some interface templates that can be directly output are predefined in advance. Therefore, the SDK kit can be used as a metadata constructor to generate the metadata of the controls in the input code according to the predefined data structure, that is, to output the defined interfaces, so as to realize the process of defining the corresponding data objects (controls) according to the information provided by the input code.
[0049] The business corresponding to the input code for which metadata can be constructed is any one of multiple businesses. That is to say, all businesses can perform metadata construction of the controls in the page for their own businesses through step S110 to obtain the template codes of their own businesses, which enables the unified generation and management of business indicator configurations. Suppose a development team increases the number of approvers in the business service it is responsible for, from n approvers to n + 1 approvers, and thus updates the configuration of the business indicator of the approver. Since all the template codes are generated by the SDK kit, it is possible to quickly determine whether this update will affect the operation of other business services by analyzing these template codes. Compared with the method in which each business service uses its own system to maintain the configuration of its own business indicators, it avoids the data black box formed due to multiple iterations and handovers of the business, and also avoids the defects that it is difficult to correctly evaluate the scope of the impact on other businesses and it is impossible to accurately estimate the failure risk of system iteration due to the data black box when the business is updated.
[0050] S120. In response to receiving the parsing instruction, obtain the template code and parse the template code to generate control configuration data represented in a specified data structure. The control configuration data is used to render the corresponding control in the page according to the predefined control style.
[0051] The parsing instruction can be made by developers or other persons. When it is necessary to visualize and use the controls, developers or other persons can give corresponding instructions on the development system or other terminals. After receiving the instructions, the development system parses the function interfaces output by the SDK toolkit, and thus converts them into a data structure form recognizable by the front end (abbreviated as the second data structure) to obtain the control configuration data, enabling the device for displaying the controls to visualize the controls. The control configuration data is also code and is also represented as an interface. The execution entity for parsing the template code output by the SDK toolkit can be the background. That is, the interface output by the SDK toolkit is the first data structure, and the interface output by the background is the second data structure. In order to be visualized, it is therefore necessary to convert the first data structure into the second data structure.
[0052] In addition, the predefined control styles are preconfigured in the background. When the background parses the template code, it can add the predefined control styles to the structure of the controls, so that when the controls are rendered and visualized on the page, the controls are directly displayed in the predefined styles, eliminating the need for developers to specifically develop the control styles. The control style is the rendering type of the control. For example, it can be rendered as a text box, a radio box, a checkbox, a dropdown menu, etc.
[0053] According to the method for generating configuration data proposed by the embodiments of the present disclosure, when developing a page, developers can use the SDK to quickly develop the control interfaces. They only need to input some brief basic information to obtain the interface code containing the complete data structure, improving the development efficiency.
[0054] At the same time, when the page needs to be rendered and displayed, the interface code of the controls is parsed into a specified data structure and the predefined control styles are automatically added, eliminating the need to specifically develop the display styles of the controls and saving the links of designing the page format and control styles, enabling developers to focus on business logic development and data use without having to pay extra attention to data definition and parsing, etc. Also, since the data structure of the interface can be automatically converted by the background, the link of interface joint debugging is also saved, reducing the workload of developers in design and development and improving the development efficiency.
[0055] Moreover, whenever a new page needs to be developed or new controls are added to the page or the control attributes are modified, instead of developers developing and configuring the interface code, they can directly input the basic information of the controls to directly regenerate the interface code through the SDK and the background, eliminating the need for front-end developers and back-end developers to hand over and configure, and also being able to reduce the development workload and improve the development efficiency.
[0056] In addition, the development system can be oriented to all business systems, and developers of different businesses can use the same development system to develop business functions. The configuration data of each business page can also be uniformly generated, stored, managed, and maintained through the development system. If a developer of a certain business modifies or updates the configuration data of a certain control, that is, modifies the business metric configuration, the template code of each business can be used to quickly evaluate whether it will cause faults and risks in each business, because all configurations can be fully reached through the SDK toolkit and the background.
[0057] Figure 3 FIG. shows a schematic diagram of the overall process of the method M100 for generating configuration data according to other embodiments of the present disclosure. Refer to Figure 3 , step S110 may specifically include step S111 and step S112.
[0058] S111, identifying a code segment with a specified identifier from the received input code as the basic control information.
[0059] S112, constructing metadata based on the basic control information to obtain a predefined template code containing control metadata.
[0060] When a developer inputs input code containing basic control information into the development system, a specified identifier can be written at the starting position of each basic control information. The specified identifier can be a character or a string. When the SDK toolkit recognizes the specified identifier, it will construct metadata for the code segment with the specified identifier according to the first data structure to obtain the control interface code. If the specified identifier is not recognized, it means that the code segment is ordinary code and there is no need to construct metadata according to the predefined first data structure.
[0061] The specified identifier is equivalent to a custom annotation in the code and can make a constraint definition for the data model. For example, the specified identifier can be "@XXX", where "XXX" can be an English string. The basic control information m1 with the specified identifier can be: "@XXX (value=cityCode) private String cityCode;", where "@XXX" indicates the start of the basic control information, and the start of the subsequent comment segment can be used as the end position of the basic control information, or the next line of code where the specified identifier is located can be used as all the code content of the basic control information, that is, the end of this line is the end of the basic control information. "value=cityCode" is used to indicate that this annotation is about the cityCode field.
[0062] The execution entity that constructs metadata can recognize multiple specified identifiers. Different types of specified identifiers can correspond to different control metadata of the same control, and there can be differences in control attributes among different control metadata of the same control. When developers of different businesses use the same development system to develop business functions, they may have different functional requirements for the same control. Therefore, multiple different types of specified identifiers can be set. The SDK toolkit constructs corresponding data structures by recognizing the specified identifiers. Different specified identifiers result in different constructed data structures, and the functions that the control can implement will also be different accordingly. For example, when the control is a list, the options listed in the list can be different; when the control is a text box, the language of the text that can be input can be different or the default value in the text box can be different, and so on.
[0063] The basic information of the control can include one or more of the field type and field name of the control. For example, in the above basic control information m1, the field type of the control is limited to a string, and the field name is cityCode. The basic information of the control can only include the field type and the field name. When the SDK toolkit generates the control style (rendering type of the control), it can determine the control style based on the input method of the control. For example, for a control with a field type of string, it can be rendered as a text box; for a control with a field type of list, it can be rendered as a list in the form of multiple drop-down menus.
[0064] After obtaining the predefined template code containing control metadata, step S113 can also be executed.
[0065] S113, store the template code.
[0066] Correspondingly, step S120 can include step S121 and step S123.
[0067] S121, in response to receiving a parsing instruction, obtain the stored template code from the stored data.
[0068] S123, parse the template code to generate control configuration data represented in a specified data structure.
[0069] The location for storing the template code can be a specified location in the background or an independent device, such as a separate server, which can be called a registration center. The template code can be directly stored in the registration center after being generated. When the background receives a parsing instruction, it can obtain the template code from the registration center for parsing.
[0070] The registry can be implemented using ZooKeeper (a distributed application coordination service for source code that can provide configuration maintenance, domain name service, distributed synchronization, and group service), or Redis (a remote dictionary service, a key-value pair type database), or MySQL (a relational database management system).
[0071] The obtained template code can be all the template codes related to the specified business. The template codes of each business function of each business system are stored in the registry. When a business person accesses the page for user form configuration, the business side will send a parsing instruction to the background, and the background will obtain all the template codes corresponding to this page from the registry, that is, the template codes related to the business of user form configuration. After parsing, the obtained control configuration data will be sent to the business side for rendering, so that the corresponding controls will be displayed on the page. It can be understood that the background can be configured with a permission controller to manage data versions, business person operation permissions, and corresponding data permissions, etc.
[0072] By configuring the registry to store the template code, developers can modify and update the controls in the above-mentioned page for user form configuration at any time, so that the SDK generates new template code and stores it in the registry, realizing the update of the template code at the registry. When the user goes online and opens the above-mentioned page for user form configuration, the latest template code can be parsed and the updated page can be displayed.
[0073] Figure 4 The overall flowchart of method M100 for generating configuration data according to some other embodiments of the present disclosure is shown. Refer to Figure 4 Step S120 may further include step S122. Step S122 is executed after step S121 is completed.
[0074] S122, obtaining the attribute values of the corresponding controls from the corresponding business system according to the template code.
[0075] Correspondingly, in step S122, the way of generating the control configuration data represented in a specified data structure may specifically be: generating the control configuration data represented in a specified data structure through the parsing result and the obtained attribute values.
[0076] After the background obtains the template code from the registration center, it can identify the control names from the template code, and then obtain the attribute values of the controls from the database of the corresponding business system. The attribute values are equivalent to complementing some content in the template code. The attribute values can specifically be the specific options (enumeration values) in the drop-down menu, the default values in the text box, or other content. That is to say, these specific options, default values, etc. can be not generated by the SDK toolkit, but obtained by the background from the business system. If the attribute values recorded in the business system change, the attribute values obtained this time will also be different from the previous ones. Compared with using the fixed options and default values in the SDK toolkit, it can adapt to the adjustment of the control attributes of the business system at any time.
[0077] Figure 5 FIG. shows a schematic diagram of an application scenario of the data acquisition method M200 according to some embodiments of the present disclosure. As Figure 5 shown, the method includes step S210, step S220, and step S230. This method can be executed by a development system, for example, by the terminal device of a developer.
[0078] S210, generating control configuration data by a method of generating configuration data.
[0079] The method of generating configuration data can be the method M100 of generating configuration data in any of the above embodiments. The specific steps of generating control configuration data are detailed in the above description of method M100, and will not be elaborated here.
[0080] S220, sending the control configuration data to the front end that makes a parsing instruction. Among them, the control configuration data is used to render the corresponding control on the front-end page.
[0081] The action of the background generating the control configuration data is executed under the trigger of the front end (for example, the terminal device of a business person). For example, when the business person opens a page for editing a form on the front end, the front end sends a parsing instruction to the background, the background generates the control configuration data and sends it to the front end, and the front end can convert the control configuration data into HTML language (HyperText Markup Language) or other languages and display it on the browser page.
[0082] It can be understood that the background is equivalent to a general job platform. There can be only one background configured, and each system interacts with the same background, and the same background performs parsing, storage, and other work. Similarly, there can be only one set of SDKs configured, and each system can create a thread of the SDK in its own system to implement the call to the SDK.
[0083] Figure 6 FIG. shows a structural block diagram of a page displaying a control according to some embodiments of the present disclosure. Refer to Figure 6, P1 is the page displayed at the front end, which contains three controls, respectively used to represent filling in the city code, urban area code, and approver system number. The approver system number is in the form of a list list, including three drop-down menus. Developers input the input code of the control basic information containing the above three controls into the SDK toolkit for metadata construction, obtain the template code of the control metadata containing the above three controls predefined, and then the SDK stores the template code in the registration center. When the business personnel open the page P1 at the front end, the front end sends a parsing instruction to the background. The background reads the template code containing these three controls from the registration center, parses it to generate the control configuration data represented by a data structure recognizable by the front end, and renders it according to the predefined control style, so as to display Figure 6 the interface shown in page P1 in
[0084] S230, in response to the save operation at the front end, obtain and store the business metric data input in the rendered control. Among them, the business metric data of multiple services are all stored through the execution entity of the data acquisition method.
[0085] A save button can be configured on page P1 ( Figure 6 not shown in
[0086] When the business personnel click the save button, the background will obtain the city code, urban area code, and approver system number filled in by the business personnel as business metric data, and store the business metric data in the server at the background. The business metric data filled in the pages of different services are uniformly stored, for example, all stored in the server at the background.
[0087] In addition, it is also possible to collect relevant configuration metrics of the business system, dynamically generate a visual interface, and there is no additional development cost for developers. For product and operation personnel, it can provide a unified management background to maintain relevant business metrics, and can uniformly maintain and manage business configuration metrics, achieving the effect of being defined in one place and available everywhere, realizing the standardization of development functions, and forming a set of standardized processes for execution.
[0088] Figure 7 FIG. shows an application scenario diagram of the data acquisition method M200 according to other embodiments of the present disclosure. Refer to Figure 7 , step S230 can specifically be: in response to a save operation on the front end, obtain and store the business metric data input in the rendered control, and perform a specified information sending action based on the business metric data. Among them, the business metric data of multiple services are all stored by the execution entity of the data acquisition method, and the sending content or information recipient of the information sending action is related to the business metric data.
[0089] The information sending action can be used to remind of business metric filling or change. Taking the change as an example, in the approver system numbers initially filled in by the business personnel on page P1, the system numbers of approvers a, b, and c are included. Later, the business personnel open page P1 again, change the system number of approver c to the system number of approver d, and save it. At this time, the 3 approver system numbers stored in the background database become a, b, and d. Through the thread of the SDK running on the front end, the development system can monitor this event of data change on the front end, send a message to d to inform that d has become an approver, and send a message to c to inform that c is no longer an approver. Thus, it can support the business side to implement business functions according to change events.
[0090] Among the stored business metric data, the business metric data corresponding to different business systems can be marked by different identifiers. In the background database, the business metric data can be marked by identifiers, and the metric data corresponding to different services use different and unique identifiers, which is convenient for distinguishing the metric data of different services.
[0091] In step S230, after obtaining the business metric data, the obtained business metric data can also be cached at the corresponding business system. That is to say, the SDK running on the business system can be configured with a cache processor, and the business metric data filled in by the business personnel at the front end of the business system is cached through the cache processor. The front ends of each business system will also uniformly store the metric data in the background database. Through the cache processor, it is possible to reduce the transmission of business metric data between the front end and the back end, reduce the additional performance overhead caused by system interaction, and increase the response speed.
[0092] Figure 8The figure shows a schematic diagram of an application scenario of a data acquisition method M200 according to other embodiments of the present disclosure. Refer to Figure 8 , step S210 may specifically be: generating control configuration data and verification configuration data by a method of generating configuration data. That is, verification configuration data will also be generated by the method of generating configuration data. The basic control information received during the process of generating control configuration data may further include verification rule information. In the template code constructed by metadata, the parsed part may not include the part corresponding to the verification rule information.
[0093] Taking the approver system number as an example, when a developer inputs the basic control information into the SDK toolkit, the basic control information of the approver system number may be: "@XXX(length=3,dataLength=8) private List <integer>"approveUserCode". Here, "length" represents the number of approvers, and "dataLength" represents the number of characters of the system number. At this time, in addition to the field type (List) and field name ("approveUserCode") of the control, the basic information of the control also includes the constraint conditions for the number of approvers and the number of characters of the system number. The control metadata constructed by the SDK toolkit based on this basic information of the control will also include the representation of the corresponding field verification rules (i.e., verification configuration data), and will be stored in the registration center accordingly. When the background obtains the template code from the registration center, it can obtain both the control metadata and the verification configuration data, but only parses the control metadata and does not need to parse the verification configuration data because the verification configuration data does not need to be displayed on the front end and thus does not need to be converted into a data structure recognizable by the front end, and thus does not need to be parsed. And the verification configuration data can be left in the background.
[0094] It can be understood that the verification rules can also include various different verification rules for different fields, such as verifying whether the text box is empty.
[0095] Correspondingly, step S230 can specifically include step S231 and step S232.
[0096] S231, in response to the save operation of the front end, obtain the business metric data input in the rendered control, and perform format verification based on the verification configuration data.
[0097] S232, if the format verification passes, store the business metric data.
[0098] When the business personnel fill in the city number, urban area number, and approver system number in the control on the page and then click the save button to save the filled business metric data, at this time, the background will first verify the business metric data through the retained verification configuration data. For example, verify whether the number of approvers of the approver system number is 3, and verify whether the number of digits of each system number is 8. If any of the above two verification rules is not met, the verification fails, and the background can send a message to the front end to prompt the user that there is an error in the filling. If all verification rules pass, the city number, urban area number, and approver system number will be stored in the database in the background.
[0099] The present disclosure provides an overall full-link solution based on business configuration, which is combined with the management idea of master data (core data of key business entities shared, used, and maintained across multiple systems and business processes), involves the entire life cycle of data definition and application, and provides an efficient and convenient solution for the system to use business configuration data in different scenarios. During the system development stage, developers can complete the definition of the background data configuration page by combining the data model definition, and business personnel can use the page to manage data. Based on the definition of the data model, mapping the data model to visual components can dynamically generate different configuration styles, supporting styles such as text, radio, checkbox, image, table, file, etc. An abstract set of definition annotations is provided for developers to complete the definition of data model visual components during the development stage. Business personnel define business models in the background, and developers can use the already configured data during the development stage to complete the development of corresponding business functions. When business personnel configure business data, the system will complete basic validations such as data types, and at the same time, based on multiple data dimensions, rely on the master data management idea for combined validation to prevent subsequent maintenance costs caused by duplicate data definitions.
[0100] In addition, the present disclosure also provides data permission management capabilities, providing functions for different roles to manage data in different dimensions such as scenarios, businesses, and application systems, and providing data version and validation management capabilities, supporting version dimension release and rollback. Each configuration item will be associated with a corresponding version for version control, and when configuring data, uniqueness and accuracy validations will be performed according to the configuration model.
[0101] Based on any of the above embodiments, the present disclosure also provides an apparatus for generating configuration data. Figure 9 It is a structural schematic diagram of an apparatus for generating configuration data according to an embodiment of the present disclosure. As Figure 9 shown, the apparatus for generating configuration data includes: a metadata construction module 110 and a configuration data generation module 120.
[0102] The metadata construction module 110 is used to construct metadata for the input code containing basic control information received, and obtain a predefined template code containing control metadata.
[0103] The configuration data generation module 120 is used to, in response to receiving a parsing instruction, obtain the template code, and parse the template code to generate control configuration data represented in a specified data structure. Among them, the control configuration data is used to render corresponding controls on the page according to a predefined control style.
[0104] The device for generating the configuration data described above may be in the form of computer software, and each module of the device for generating the configuration data may be implemented by computer software modules. The implementation processes of the functions and roles of each module in the device for generating the configuration data are specifically described in the implementation processes of the corresponding steps in the method M100 for generating the configuration data described above, and will not be elaborated here.
[0105] Based on any of the above embodiments, the present disclosure further provides a data acquisition device. Figure 10 It is a structural schematic diagram of a data acquisition device according to an embodiment of the present disclosure. As Figure 10 shown, the data acquisition device includes: a device 210 for generating configuration data, a data sending module 220, and a metric data acquisition module 230.
[0106] The device 210 for generating configuration data is used to generate control configuration data by the method for generating configuration data. Among them, the method for generating configuration data includes: constructing metadata for the input code containing the basic information of the control received to obtain a predefined template code containing control metadata; and in response to receiving a parsing instruction, obtaining the template code and parsing the template code to generate control configuration data represented in a specified data structure, where the control configuration data is used to render the corresponding control on the page according to the predefined control style.
[0107] The data sending module 220 is used to send the control configuration data to the front end that makes the parsing instruction. Among them, the control configuration data is used to render the corresponding control on the front-end page.
[0108] The metric data acquisition module 230 is used to, in response to a save operation on the front end, acquire and store the business metric data input in the rendered control. Among them, the business metric data of multiple services are all stored by the execution entity of the data acquisition method.
[0109] The data acquisition device described above may be in the form of computer software, and each module of the data acquisition device may be implemented by computer software modules. The implementation processes of the functions and roles of each module in the data acquisition device are specifically described in the implementation processes of the corresponding steps in the data acquisition method M200 described above, and will not be elaborated here.
[0110] The execution entity of the method for generating configuration data and the data acquisition method in the specific embodiments of the present disclosure may be an electronic device such as a computer or a server.
[0111] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, and this electronic device can execute the method for generating configuration data or the data acquisition method described in any of the above embodiments of the present disclosure. Figure 11 It is a schematic block diagram of an electronic device 1000 according to an embodiment of the present disclosure.
[0112] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, a memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0113] The bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Component (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one connecting line is shown in this figure, but it does not mean that there is only one bus or one type of bus.
[0114] Among them, the processor 1200 can be a Central Processing Unit (CPU). The processor 1200 can also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. chips, or a combination of the above types of chips.
[0115] The memory 1300 can be used as a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions of the computer program in the embodiments of the present disclosure. The processor 1200 realizes the method for generating configuration data or the data acquisition method by running the non-transitory software programs, instructions, and modules stored in the memory 1300.
[0116] The memory 1300 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created by the processor 1200. In addition, the memory 1300 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 1300 may optionally include a memory remotely disposed relative to the processor 1200, and these remote memories can be connected to the processor 1200 through a network. Examples of the above networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The present disclosure also provides a readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it is used to implement the above method. The "readable storage medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples of the readable storage medium include the following: an electrical connection part (electronic device) having one or more wirings, a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0118] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of the present disclosure are executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM, or other programmable devices.
[0119] Computer programs or instructions can be stored in a readable storage medium or transmitted from one readable storage medium to another. For example, the computer programs or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The readable storage medium can be any available medium that can be accessed or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc; or it can be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or can include both volatile and non-volatile types of storage media.
[0120] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, system, or computer program product. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0121] The present disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the present disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or the combination of blocks.
[0122] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or the combination of blocks.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process Figure 1 one process or more processes and / or blocks Figure 1 or steps for implementing the functions specified in one block or more blocks.
[0124] In the description of this specification, the description with reference to the terms "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples", etc. means that the specific features, structures, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, or characteristics described can be combined in a suitable manner in any one or more embodiments / ways or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.
[0125] In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically and clearly defined.
[0126] Those skilled in the art should understand that the above embodiments are only for clearly explaining the present disclosure and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or variations can be made on the basis of the above disclosure, and these changes or variations are still within the scope of the present disclosure.< / integer>
Claims
1. A method for generating configuration data, characterized in that including: constructing metadata for the received input code containing basic control information to obtain a predefined template code containing control metadata; and in response to receiving a parsing instruction, obtaining the template code and parsing the template code to generate control configuration data represented in a specified data structure, where the control configuration data is used to render a corresponding control on a page in a predefined control style.
2. The method for generating configuration data according to claim 1, wherein Constructing metadata for the received input code containing basic control information to obtain a predefined template code containing control metadata includes: identifying a code segment with a specified identifier from the received input code as basic control information; and constructing metadata based on the basic control information to obtain a predefined template code containing control metadata.
3. The method for generating configuration data according to claim 2, wherein The execution entity for constructing the metadata can identify multiple types of the specified identifiers, and different types of the specified identifiers correspond to different control metadata of the same control, and there are differences in control attributes among different control metadata of the same control.
4. The method for generating configuration data according to any one of claims 1-3, characterized in that The execution entity for constructing metadata for the input code is a preconfigured software development kit.
5. The method for generating configuration data according to claim 1 or 2, characterized in that, The basic control information includes one or more of the field type and field name of the control.
6. The method for generating configuration data according to claim 1, wherein After obtaining the predefined template code containing control metadata, the method further includes: storing the template code; Obtaining the template code includes: obtaining the stored template code from the stored data.
7. The method for generating configuration data according to claim 1 or 6, characterized in that The obtained template code is all the template codes related to a specified business.
8. A data acquisition method, characterized in that, including: generating control configuration data by the method for generating configuration data according to any one of claims 1-7; sending the control configuration data to the front end that issues the parsing instruction, where the control configuration data is used to render a corresponding control on the page of the front end; in response to a save operation of the front end, obtaining and storing the business metric data input in the rendered control.
9. An electronic device, characterized in that, including: a memory that stores execution instructions; and a processor that executes the execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 7, or executes the method according to claim 8.
10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it is used to implement the method according to any one of claims 1 to 7, or execute the method according to claim 8.
Citation Information
Cited By
Method for configuring applet based on user-defined template component
CN120560748A