Customized product generation method and device, equipment and storage medium
By obtaining product identification and scenario identification, querying page component parameter configuration, and creating and displaying page components, it solves the problem of difficult to understand and maintain customized product codes, and realizes lightweight and easy-to-maintain page codes.
Patent Information
- Application Number
- CN202410135586.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, the number of page codes of customized products increases with the increase of products, making the code difficult to understand, optimize and maintain.
By obtaining the product identity and scene identity of the target customer, querying the page component parameter configuration, creating and displaying the page components, performing scene elements verification, and generating customized products.
Reduce the amount of page code, making page code lightweight, easy to understand and maintain, and improves the efficiency and accuracy of customized product generation.
Smart Images

Figure CN120406938A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of page development, and particularly to a method, apparatus, device, and storage medium for generating customized products. Background Art
[0002] In a highly competitive market environment, the business volume of customized products is gradually increasing. Therefore, a business model that meets the customized product requirements of customers in different industries has emerged. For example, provincial branches independently configure products to achieve customized products.
[0003] In the related art, for the customized product requirements of customers, the form data structure of page elements is usually organized in JavaScript, and the form data structure is parsed through the idea of page componentization to generate and display the page elements corresponding to the customized product requirements of the customers.
[0004] However, the inventor has found through research that the page code volume and code condition judgment logic of the above business model will increase as the number of products increases. For example, adding one product corresponds to adding one if statement or switch statement, resulting in difficult-to-understand, difficult-to-optimize, and difficult-to-maintain page code. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for generating customized products to solve the technical problem that page code is difficult to understand, optimize, and maintain when generating customized products.
[0006] In a first aspect, this application provides a method for generating a customized product, including:
[0007] Obtain the product identifier selected by the target customer, and determine the target scenario identifier corresponding to the product identifier; [[ID=2�]]
[0008] Query the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier;
[0009] Create a page component according to the scenario configuration information;
[0010] Display the page component to complete the page information corresponding to the page component, where the page information includes scenario elements;
[0011] If the verification of the scenario elements in the page information passes, then pass the page information to the order service to generate the customized product corresponding to the product identifier.
[0012] In a possible implementation manner, the above querying the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier includes:
[0013] According to the target scenario identifier, call the microservice to query the page component parameter configuration corresponding to the target scenario identifier from the database, and obtain the scenario configuration information corresponding to the target scenario identifier.
[0014] In a possible implementation, the scenario configuration information includes the quantity configuration and type configuration of page components. The microservice is specifically used for:
[0015] According to the target scenario identifier, query the quantity configuration of the target page component associated with the target scenario identifier in the scenario information configuration table in the database. The scenario information configuration table contains the quantity configurations of page components associated with different scenario identifiers;
[0016] In the scenario component type configuration table, query the target type configuration of the target page component. The scenario component type configuration table contains the component types of different page components;
[0017] Based on the set data structure, organize the scenario configuration information corresponding to the query obtained target scenario identifier.
[0018] In a possible implementation, the scenario configuration information further includes the enumerated information configuration of page components. The microservice is specifically used for:
[0019] If the target type configuration includes a dropdown component, query the enumerated information configuration of the dropdown component in the component enumerated information configuration table. The enumerated information configuration includes the dropdown component identifier, the value of the dropdown element, the content displayed by the dropdown element, and the configuration effective time.
[0020] In a possible implementation, the above-mentioned display of page components to complete the page information corresponding to the page components includes:
[0021] Store the page component in the target object and return it to JavaScript;
[0022] According to the target scenario identifier, determine whether to call the scenario component to perform change processing on the page component. The change processing includes resetting the text, graying out, and hiding;
[0023] If so, call the scenario component for the page component and display the changed page component to complete the page information corresponding to the page component;
[0024] If not, display the page component to complete the page information corresponding to the page component.
[0025] In a possible implementation, after determining the target scenario identifier corresponding to the product identifier, it further includes:
[0026] Empty the container, where the container is used to hold existing page elements;
[0027] Store the target scenario identifier in the container.
[0028] In a possible implementation, the method for generating a customized product further includes: if the verification of the scene elements in the page information fails, return to execute the step of displaying the page components to complete the page information corresponding to the page components.
[0029] In a second aspect, the present application provides a device for generating a customized product, including:
[0030] An acquisition module, configured to acquire the product identifier selected by the target customer and determine the target scene identifier corresponding to the product identifier;
[0031] A query module, configured to query the page component parameter configuration corresponding to the target scene identifier to obtain the scene configuration information corresponding to the target scene identifier;
[0032] A creation module, configured to create a page component according to the scene configuration information;
[0033] A display module, configured to display the page component to complete the page information corresponding to the page component, where the page information includes scene elements;
[0034] A processing module, configured to, when the verification of the scene elements in the page information passes, transmit the page information to the order service to generate a customized product corresponding to the product identifier.
[0035] In a possible implementation, the query module is specifically configured to: call a microservice according to the target scene identifier to query the page component parameter configuration corresponding to the target scene identifier from the database to obtain the scene configuration information corresponding to the target scene identifier.
[0036] In a possible implementation, the scene configuration information includes the quantity configuration and type configuration of the page components, and the microservice is specifically configured to:
[0037] According to the target scene identifier, query the quantity configuration of the target page component associated with the target scene identifier in the scene information configuration table in the database, where the scene information configuration table includes the quantity configurations of the page components associated with different scene identifiers;
[0038] Query the target type configuration of the target page component in the scene component type configuration table, where the scene component type configuration table includes the component types of different page components;
[0039] Organize the scene configuration information corresponding to the target scene identifier obtained by the query based on a set data structure.
[0040] In a possible implementation, the scene configuration information further includes the enumerated information configuration of the page components, and the microservice is further configured to:
[0041] If the target type configuration includes a dropdown component, query the enumeration information configuration of the dropdown component in the component enumeration information configuration table. The enumeration information configuration includes the dropdown component identifier, the value of the dropdown element, the content displayed by the dropdown element, and the configuration effective time.
[0042] In a possible implementation, the display module is specifically configured to:
[0043] Store the page component in the target object and return JavaScript;
[0044] According to the target scenario identifier, determine whether to call the scenario component to perform change processing on the page component. The change processing includes resetting the text, graying out, and hiding;
[0045] If so, call the scenario component for the page component and display the changed page component to improve the page information corresponding to the page component;
[0046] If not, display the page component to improve the page information corresponding to the page component.
[0047] In a possible implementation, the acquisition module is further configured to: after determining the target scenario identifier corresponding to the product identifier, clear the container, where the container is used to hold existing page elements; store the target scenario identifier in the container.
[0048] In a possible implementation, the processing module is configured to: when the verification of the scenario elements in the page information fails, return to execute the step of displaying the page component to improve the page information corresponding to the page component.
[0049] In a third aspect, the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0050] The memory stores computer-executable instructions;
[0051] The processor executes the computer-executable instructions stored in the memory to implement the method for generating a customized product according to any one of the first aspects.
[0052] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed, they are used to implement the method for generating a customized product according to any one of the first aspects.
[0053] In a fifth aspect, the present application provides a computer program product, including a computer program, which is used to implement the method for generating a customized product according to any one of the first aspects when the computer program is executed.
[0054] The method, apparatus, device, and storage medium for generating customized products provided by this application obtain the product identifier selected by the target customer and determine the target scenario identifier corresponding to the product identifier; query the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier; create page components according to the scenario configuration information; display the page components to complete the page information corresponding to the page components, where the page information includes scenario elements; if the verification of the scenario elements in the page information passes, the page information is transmitted to the order service to generate the customized product corresponding to the product identifier. This application completes operations such as creating and displaying page components by referring to parameter-configured page components, which can effectively reduce the amount of page code in the method for generating customized products, making the page code lightweight, easy to understand, and easy to maintain. Brief Description of the Drawings
[0055] The drawings here are incorporated into the specification and form a part of this specification, showing the embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0056] Figure 1 It is a schematic flowchart of the method for generating customized products provided by an embodiment of this application;
[0057] Figure 2 It is a schematic flowchart of the method for generating customized products provided by another embodiment of this application;
[0058] Figure 3 It is a schematic structural diagram of the apparatus for generating customized products provided by an embodiment of this application;
[0059] Figure 4 It is a schematic structural diagram of the electronic device provided by an embodiment of this application.
[0060] Through the above drawings, the clear embodiments of this application have been shown, and there will be more detailed descriptions later. These drawings and text descriptions are not intended to limit the scope of the concept of this application in any way, but to explain the concept of this application to those skilled in the art by referring to specific embodiments. Detailed Description of the Embodiments
[0061] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. On the contrary, they are merely examples of the devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0062] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards, and corresponding operation entrances are provided for users to choose to authorize or reject.
[0063] In the related art, the business model of using provincial self-configured products to achieve the goal of customized products needs to regard different products, different provinces, different tariffs, different services, etc. as different business scenarios, and the front-end page has different page displays for different business scenarios. In this case, if a new business scenario is added to the page, a new piece of code needs to be written to adapt to the newly added scenario. As the number of business scenarios increases, the amount of code becomes larger and larger, the code is difficult to understand and maintain, and the defects and vulnerabilities (bugs) of the program will also increase.
[0064] To address the above pain points, this application cancels the form data structure of JavaScript, and at the same time increases the database parameterized configuration of page components and the writing of JavaScript page scenario tools. In other words, through the page component parameterization method, that is, the database configuration method, this application can effectively solve the problem of different display forms for different scenario identifiers. And the page code completes operations such as element display, element filling, element verification, and element submission of the page by referencing parameterized components, which can effectively reduce the amount of page code and make the page code lightweight, easy to understand, and easy to maintain.
[0065] Exemplarily, the method for generating a customized product provided by this application can be used in various scenarios, such as tariff scenarios, service scenarios, etc.
[0066] The following uses specific embodiments to describe in detail the technical solution of this application and how the technical solution of this application solves the above technical problems. These several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following will describe the embodiments of this application in conjunction with the accompanying drawings.
[0067] Figure 1 It is a schematic flowchart of the method for generating a customized product provided by an embodiment of this application. A method for generating a customized product provided by an embodiment of this application can be executed by a computing device such as a server or a server cluster. As Figure 1 shown, the method for generating a customized product includes:
[0068] S101. Obtain the product identifier selected by the target customer, and determine the target scenario identifier corresponding to the product identifier.
[0069] Before obtaining the product identifier selected by the target customer, it is necessary to determine the target customer and their corresponding customer information. Determining the target customer and their corresponding customer information can be achieved through various methods.
[0070] In one example, enter the identity identifier of the target customer on the front-end page, and the corresponding customer information will be output. In this example, the output customer information is unique and is the customer information of the target customer. Further, confirm the customer information of the output target customer to ensure that the customer information of the target customer is accurate.
[0071] In another example, enter the field containing the target customer information on the front-end page, and the corresponding customer information will be output. For example, enter the Harbin field on the front-end, and the customer information containing the Harbin field will be output. At this time, it is necessary to judge and confirm the target customer and their corresponding customer information from the output customer information.
[0072] After determining the target customer, it is also necessary to obtain the product identifier selected by the target customer, and determine the corresponding target scenario identifier through the product identifier. Among them, the target scenario identifier is composed of a fixed letter plus the product identifier selected by the target customer.
[0073] In one example, the target customer selects a product on the front-end page, assume it is an IVPN product, the product identifier is 89001942, and the target scenario identifier is GROUP_USER_INFO_89001942.
[0074] S102. Query the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier.
[0075] Among them, different scenario identifiers correspond to different page component parameter configurations. Therefore, this application can query the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier.
[0076] S103. Create page components according to the scenario configuration information.
[0077] After obtaining the scenario configuration information corresponding to the target scenario identifier, use a scenario tool, such as a dynamic scenario FORM form, to parse the scenario configuration information, and then create each page component according to the parsed scenario configuration information.
[0078] Among them, the scenario configuration information includes two nodes: interfaceElement scenario element information and selectInitialData enumeration information. The interfaceElement scenario element information includes necessary information required for the front-end page, such as component type (text box or drop-down box), label, component identifier, whether it is required, whether it is hidden, initial value, whether it is grayed out, etc. The selectInitialData enumeration information corresponds to the enumeration information required for the drop-down box in the scenario and is stored in the component enumeration information configuration table.
[0079] S104. Display the page components to complete the page information corresponding to the page components, where the page information includes scenario elements.
[0080] After displaying the page components created in S103, it is necessary to complete the page information corresponding to the page components, such as filling in the page information corresponding to the page components and / or supplementing other relevant content of the page information.
[0081] After completing the page information corresponding to the page components, it is necessary to submit an order, that is, submit the completed page components. For example, click the submit button to submit the completed page components. Then, verify the scenario elements in the page components. If the scenario elements pass the verification, execute S105; otherwise, it is necessary to continue to complete the page information corresponding to the page components until the scenario elements pass the verification. Among them, the scenario elements refer to the page information corresponding to the page components that need to be completed in the page components.
[0082] S105. If the verification of the scenario elements in the page information passes, the page information will be passed to the order service to generate a customized product corresponding to the product identifier.
[0083] The verification of the scenario elements needs to verify the required items of the scenario elements and perform simple data verification on the scenario elements, such as regularization, etc. After the verification of the scenario elements passes, the scenario component returns an output parameter in a fixed format to the back-end order submission service, which includes information such as component identifier and value. For example, after the verification of the scenario elements passes, the front-end will return an output parameter in a fixed format in the form of a message to the back-end order submission service through the scenario component. Further, it is also necessary to pass information such as the employee number information of the salesperson, city information, and province information to the back-end order submission service in the form of a message.
[0084] After the back-end order submission service receives the page information, it will pass it to the order service, and the order service will generate a corresponding customized product according to the obtained page information. Among them, the page information also includes the page information of the fixed components in the page components, and the back-end can directly obtain this page information.
[0085] In other words, after the back-end order submission service receives the page information passed from the front-end, it will call the order service to organize the landing of order data, that is, generate a customized product corresponding to the product identifier.
[0086] In the embodiment of the present application, operations such as page component creation and display are completed through reference parameter-configured page components, which can effectively reduce the amount of page code in the customized product generation method, making the page code lightweight, easy to understand, and easy to maintain.
[0087] Based on the above embodiment, in S102, query the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier, including: according to the target scenario identifier, call the microservice to query the page component parameter configuration corresponding to the target scenario identifier from the database to obtain the scenario configuration information corresponding to the target scenario identifier. In one example, according to the target scenario identifier of GROUP_USER_INFO_89001942 and information such as the employee number of the salesperson, the city information, and the province information as input parameters, call the microservice, and the microservice queries the corresponding scenario configuration information from the database.
[0088] Optionally, the scenario configuration information includes the quantity configuration and type configuration of the page components. Specifically, the microservice is used to: according to the target scenario identifier, query the quantity configuration of the target page component associated with the target scenario identifier in the scenario information configuration table in the database. The scenario information configuration table contains the quantity configuration of the page components associated with different scenario identifiers; query the target type configuration of the target page component in the scenario component type configuration table. The scenario component type configuration table contains the component types of different page components; organize the scenario configuration information corresponding to the target scenario identifier obtained by the query based on the set data structure.
[0089] Exemplarily, the scenario information configuration table, such as the td_s_light-item table, may have the following main fields:
[0090] INTF_CONTEXT_CODE: Scenario identifier;
[0091] SHOW_ORDER: Component arrangement order, from small to large;
[0092] ELEMENT_CODE: Component ID;
[0093] AREA_CODE: City or county code;
[0094] INTF_ELEMENT_ID: Foreign key associated with the scenario table;
[0095] ELEMENT_TYPE: When business is required, it can be used as a distinction. For example, for different values, different
[0096] Backend table.
[0097] Another example, the scenario component type configuration table, such as the td_s_light_itemvalue table, is a supplement to the scenario information configuration table. Its main fields can be as follows:
[0098] INTF_ELEMENT_ID: The primary key of this table;
[0099] INTF_ELEMENT_TYPE_CODE: Component type. 0 represents a normal input box, 1, 4, 5, 6 represent dropdown boxes, 2 represents a date component, 3 represents a date component with time selection, P represents a password input box, 9 represents the JavaScript binding script of this scenario component, 10 represents an input box component with a button, 11 represents a checkbox component, 12 represents a checkbox group component, 13 represents a multi-group checkbox group component. It can be freely extended.
[0100] INTF_ELEMENT_PARAM: Component parameter configuration. If the component is a dropdown box, this configuration can be used to configure the enumeration identifier and populate the dropdown menu; when the component is a text box, this field can be used to configure the bound method, etc.;
[0101] INTF_ELEMENT_LABEL: The label content of this component displayed on the page;
[0102] INTF_ELEMENT_INIT_VALUE: Initial value assignment for the component;
[0103] INTF_ELEMENT_CAN_NULL: 0 represents required, 1 represents non-required;
[0104] MODIFY_RIGHT_CODE: Filling in false makes the content of this component unmodifiable;
[0105] END_DATE: This configuration takes effect when END_DATE is greater than the current time.
[0106] Furthermore, the scenario configuration information also includes the enumeration information configuration of page components. Specifically, the microservice is used to: If the target type configuration includes a dropdown component, query the enumeration information configuration of the dropdown component in the component enumeration information configuration table. The enumeration information configuration includes the dropdown component identifier, the value of the dropdown element, the content displayed by the dropdown element, and the configuration effective time.
[0107] For example, when the INTF_ELEMENT_TYPE_CODE field in the scenario component type configuration table is 1, 4, 5, or 6, that is, the component type is a dropdown box, it is necessary to query the enumeration information configuration of the dropdown component in the component enumeration information configuration table.
[0108] For example, the component enumeration information configuration table, such as the td_s_light_enum table, has the table name TD_S_ENUMERATE in Oracle. As an example, the main fields of the component enumeration information configuration table are as follows:
[0109] ENUM_CODE: Drop-down component identifier;
[0110] ENUM_FIELD_CODE: Value of the drop-down element;
[0111] ENUM_FIELD_NAME: Content displayed by the drop-down element;
[0112] END_DATE: Configuration effective time. When END_DATE is greater than the current time, this configuration becomes effective.
[0113] The fields of the above component enumeration information configuration table are used in the embodiments of this application. The fields not mentioned are not used.
[0114] In one example, when the scenario identifier is GROUP_USER_INFO_89001942 and the component type is a drop-down box, the method for generating a customized product provided by the embodiments of this application needs to associate the scenario information configuration table, the scenario component type configuration table, and the component enumeration information configuration table from the database. The main statements of the SQL for associating the above three databases are as follows:
[0115] select a.intf_context_code, a.ELEMENT_CODE, a.ELEMENT_TYPE, a.SHOW_ORDER, a.PROVINCE_CODE t, b.*FROM td_s_light_item a, td_s_light_item value bwhere a.INTF_ELEMENT_ID = b.INTF_ELEMENT_ID and intf_context_code = 'GROUP_USER_INFO_89001942'.
[0116] Furthermore, after calling the microservice to query the scenario configuration information corresponding to the target scenario identifier, it is necessary to organize a standardized data structure for front-end display.
[0117] The embodiments of this application can improve the generation efficiency of customized products by querying the page component parameter configuration corresponding to the target scenario identifier from the database to obtain the scenario configuration information corresponding to the target scenario identifier.
[0118] Based on the above embodiments, in one implementation, in S104, the page component is displayed to improve the page information corresponding to the page component. The page information includes scene elements, including: storing the page component in a target object and returning it to JavaScript; determining whether to call a scene component according to the target scene identifier to perform change processing on the page component. The change processing includes resetting the text, graying out, and hiding. If so, the scene component is called for the page component, and the changed page component is displayed to improve the page information corresponding to the page component. If not, the page component is displayed to improve the page information corresponding to the page component.
[0119] In this embodiment, it can be understood that the created page component needs to be stored in a unified object and returned to JavaScript. Then, according to the target scene identifier, it is determined whether it is necessary to call the scene component.
[0120] If it is determined that it is necessary to call the scene component to change the page component, the unified application programming interface API provided by the scene component needs to be used. This application programming interface is used to operate the generated page component. For users, the page component is an invisible and non-native component. However, the page component in the target scene can be changed according to the application programming interface, such as basic operations like resetting the text, graying out, and hiding.
[0121] The changed page component is displayed, and the page information corresponding to the page component and / or other relevant content of the supplementary page information is filled in to improve the page information corresponding to the page component. For example, the salesperson fills in the page information and supplements other relevant information of the page to improve the page information corresponding to the page component.
[0122] If it is determined that it is not necessary to call the scene component to change the page component, the page component needs to be displayed, and the page information corresponding to the page component and / or other relevant content of the supplementary page information is filled in to improve the page information corresponding to the page component.
[0123] By improving the page information corresponding to the page component in the embodiments of the present application, the accuracy of the generation method of customized products can be improved.
[0124] Further, after determining the target scene identifier corresponding to the product identifier, it further includes: clearing the container, where the container is used to hold existing page elements; storing the target scene identifier in the container. Clearing the container is to clear the target scene identifier corresponding to the previously selected product identifier contained in the container, such as clearing the DIV container of the previous target scene identifier. After clearing the container, the current target scene identifier needs to be stored in the container to facilitate the subsequent generation of customized products.
[0125] In the embodiments of the present application, emptying the container is mainly to avoid some unnecessary errors and is beneficial to improving the accuracy of the generation method of customized products.
[0126] Based on the above embodiments, in another implementation, the page information is verified for scene elements. If the verification of the scene elements for the page information fails, the step of returning to execute the display page component to improve the page information corresponding to the page component is performed, that is, if the verification of the scene elements for the page information fails, S104 needs to be executed until the verification of the scene elements passes. Among them, the verification of the scene elements needs to verify the required items of the scene elements and perform simple data verification on the scene elements, such as regularization, etc.
[0127] By verifying the page information in the embodiments of the present application, it is possible to avoid the occurrence of non-standard and / or incorrect page information, provide standard and / or correct page information for the generation method of customized products, and improve the accuracy of the generation method.
[0128] Below, taking the new installation business of the group as an example, it is explained how to use the generation method of the customized product provided by the embodiments of the present application. The implementation steps are shown in Figure 2 , Figure 2 is a schematic flowchart of the generation method of the customized product provided by another embodiment of the present application. As Figure 2 shown, the implementation steps are as follows:
[0129] 1. Select customer information: Retrieve customer information and select a customer;
[0130] 2. Select group products and organize scene identifiers;
[0131] 3. Query parameter configurations according to the scene identifier and return detailed information;
[0132] 4. The front-end scene component parses and displays page elements according to the returned scene configuration information;
[0133] 5. Fill in page element information and submit page information;
[0134] 6. Submit the order and verify the page elements.
[0135] In summary, the embodiments of the present application provide a generation scheme for customized products. This scheme involves a solution for parameterizing the basic components of a page. This method can at least solve the following problems:
[0136] In terms of code writing: Solve the problems of increased business scenarios, increased code volume, increased logical branches, and difficulty in maintenance;
[0137] In terms of business scenarios: Extract scene components. Make them applicable to various business scenarios that need to display different page elements according to different identifiers.
[0138] The following is an embodiment of the device of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.
[0139] Figure 3 It is a schematic structural diagram of a device for generating a customized product provided in an embodiment of the present application. As Figure 3 shown, the device 300 for generating a customized product includes:
[0140] An acquisition module 301, configured to acquire a product identifier selected by a target customer and determine a target scenario identifier corresponding to the product identifier;
[0141] A query module 302, configured to query page component parameter configurations corresponding to the target scenario identifier to obtain scenario configuration information corresponding to the target scenario identifier;
[0142] A creation module 303, configured to create page components according to the scenario configuration information;
[0143] A display module 304, configured to display the page components to complete the page information corresponding to the page components, where the page information includes scenario elements;
[0144] A processing module 305, configured to, when the verification of the scenario elements in the page information passes, transmit the page information to an order service to generate a customized product corresponding to the product identifier.
[0145] In a possible implementation manner, the query module 302 is specifically configured to: call a microservice according to the target scenario identifier to query page component parameter configurations corresponding to the target scenario identifier from a database to obtain scenario configuration information corresponding to the target scenario identifier.
[0146] In a possible implementation manner, the scenario configuration information includes a quantity configuration and a type configuration of page components, and the microservice is specifically configured to:
[0147] According to the target scenario identifier, query the quantity configuration of the target page component associated with the target scenario identifier in the scenario information configuration table in the database, where the scenario information configuration table includes the quantity configurations of page components associated with different scenario identifiers;
[0148] Query the target type configuration of the target page component in the scenario component type configuration table, where the scenario component type configuration table includes component types of different page components;
[0149] Organize the scenario configuration information corresponding to the target scenario identifier obtained by querying based on a set data structure.
[0150] In a possible implementation, the scenario configuration information further includes the enumeration information configuration of the page components. The microservice is further configured to: when the target type configuration includes a dropdown component, query the enumeration information configuration of the dropdown component in the component enumeration information configuration table. The enumeration information configuration includes the dropdown component identifier, the values of the dropdown elements, the content displayed by the dropdown elements, and the configuration effective time.
[0151] In a possible implementation, the display module 304 is specifically configured to: store the page components in a target object and return JavaScript; determine whether to call a scenario component according to the target scenario identifier to perform change processing on the page components. The change processing includes resetting the text, graying out, and hiding; if so, call the scenario component for the page components and display the changed page components to improve the page information corresponding to the page components; if not, display the page components to improve the page information corresponding to the page components.
[0152] In a possible implementation, the acquisition module is further configured to: after determining the target scenario identifier corresponding to the product identifier, clear the container, where the container is used to hold existing page elements; store the target scenario identifier in the container.
[0153] In a possible implementation, the processing module 305 is configured to: when the verification of the scenario elements in the page information fails, return to execute the step of displaying the page components to improve the page information corresponding to the page components.
[0154] The generation device of the customized product provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments. The implementation principles and beneficial effects are similar and will not be elaborated here.
[0155] It should be noted that it should be understood that the division of each module of the above device is only a logical function division. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by a processing element; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a certain processing element of the above device to perform the functions of the above processing module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together or independently implemented. Here, the processing element can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the processor element or the instructions in software form.
[0156] For example, the above modules can be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or, one or more Digital Signal Processors (DSPs), or, one or more Field Programmable Gate Arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. Again, these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
[0157] Figure 4 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. As Figure 4 shown, the electronic device 400 provided by the embodiment of the present application may include: a processor 401, and a memory 402 communicatively connected to the processor, wherein:
[0158] The memory stores computer-executable instructions;
[0159] The processor executes the computer-executable instructions stored in the memory to implement the method for generating a customized product described in the foregoing method embodiments.
[0160] It should be understood that the processor 401 can be a Central Processing Unit (CPU), and can also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly embodied as being executed and completed by a hardware processor, or can be executed and completed by a combination of hardware and software modules in the processor. The memory 502 may include high-speed random access memory (Random Access Memory, RAM), and may also include non-volatile storage NVM (non-volatile memory), such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disc, etc.
[0161] Optionally, the electronic device 400 may further include a communication interface 403. In a specific implementation, if the communication interface 403, the memory 402, and the processor 401 are implemented independently, the communication interface 403, the memory 402, and the processor 401 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0162] Optionally, in a specific implementation, if the communication interface 403, the memory 402, and the processor 401 are integrated on a single chip, the communication interface 403, the memory 402, and the processor 401 may communicate through an internal interface.
[0163] The embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed, they are used to implement the method for generating a customized product described in any one of the foregoing embodiments.
[0164] It can be understood that the computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read Only Memory (EEPROM), an Erasable Programmable Read Only Memory (EPROM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0165] An exemplary computer-readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can be located in an ASIC. Of course, the processor and the computer-readable storage medium can also exist as discrete components in an electronic device.
[0166] The integrated modules implemented in the form of software functional modules as described above can be stored in a computer-readable storage medium. The software functional modules stored in a computer-readable storage medium include several instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods described in various embodiments of the present application.
[0167] The embodiments of the present application also provide a computer program product, including a computer program which, when executed, implements the method for generating a customized product described in any one of the foregoing embodiments.
[0168] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0169] Furthermore, it should be noted that although the steps in the flowchart are sequentially shown according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart can include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0170] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combinations of these technical features do not conflict, they should all be considered as the scope described in this specification.
[0171] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0172] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A method for generating a customized product, characterized in that, Including: Obtain the product identifier selected by the target customer and determine the target scenario identifier corresponding to the product identifier; Query the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier; Create a page component according to the scenario configuration information; Display the page component to complete the page information corresponding to the page component, where the page information includes scenario elements; If the scenario element verification of the page information passes, then pass the page information to the order service to generate a customized product corresponding to the product identifier.
2. The method for generating a customized product according to claim 1, characterized in that, The querying the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier includes: According to the target scenario identifier, call a microservice to query the page component parameter configuration corresponding to the target scenario identifier from the database to obtain the scenario configuration information corresponding to the target scenario identifier.
3. The method for generating a customized product according to claim 2, characterized in that, The scenario configuration information includes the quantity configuration and type configuration of page components, and the microservice is specifically used for: According to the target scenario identifier, query the quantity configuration of the target page component associated with the target scenario identifier in the scenario information configuration table in the database, where the scenario information configuration table includes the quantity configurations of page components associated with different scenario identifiers; In the scenario component type configuration table, query the target type configuration of the target page component, where the scenario component type configuration table includes the component types of different page components; Organize the scenario configuration information corresponding to the target scenario identifier obtained by querying based on a set data structure.
4. The method for generating a customized product according to claim 3, wherein The scenario configuration information further includes the enumeration information configuration of page components, and the microservice is specifically used for: If the target type configuration includes a dropdown component, then query the enumeration information configuration of the dropdown component in the component enumeration information configuration table, where the enumeration information configuration includes the dropdown component identifier, the value of the dropdown element, the content displayed by the dropdown element, and the configuration effective time.
5. The method for generating a customized product according to any one of claims 1 to 4, characterized in that The displaying the page component to complete the page information corresponding to the page component includes: Store the page component in a target object and return it to JavaScript; According to the target scenario identifier, determine whether to call a scenario component to perform a change process on the page component, where the change process includes resetting the text, graying out, and hiding; If so, then call the scenario component for the page component and display the changed page component to complete the page information corresponding to the page component; If not, then display the page component to complete the page information corresponding to the page component.
6. The method for generating a customized product according to any one of claims 1 to 4, characterized in that After determining the target scenario identifier corresponding to the product identifier, it further includes: Empty the container, where the container is used to hold existing page elements; Store the target scenario identifier in the container.
7. The method for generating a customized product according to any one of claims 1 to 4, characterized in that It further includes: If the scenario element verification of the page information fails, then return to execute the step of displaying the page component to complete the page information corresponding to the page component.
8. An apparatus for generating customized products, characterized in that, Including: An acquisition module for acquiring the product identifier selected by the target customer and determining the target scenario identifier corresponding to the product identifier; A query module for querying the page component parameter configuration corresponding to the target scenario identifier to obtain the scenario configuration information corresponding to the target scenario identifier; A creation module for creating a page component according to the scenario configuration information; A display module for displaying the page component to complete the page information corresponding to the page component, where the page information includes scenario elements; A processing module for, when the verification of the scenario elements in the page information passes, passing the page information to an order service to generate a customized product corresponding to the product identifier.
9. An electronic device, characterized in that, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 7.