Product page interface configuration method based on state machine and computer equipment
Through the product page interface configuration method based on the state machine, the configuration and management interface logic are automated, and the development cost and maintenance difficulty problems when accessing multiple upstream systems in the prior art are solved, and an efficient and maintainable interface configuration is achieved.
Patent Information
- Application Number
- CN202411569697.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-06
AI Technical Summary
When the prior art connects multiple upstream systems, it requires a lot of manpower and material resources to develop access logic through hard code, resulting in the same logic being implemented multiple times, and the naming is inconsistent, which increases the development cost and maintenance difficulty.
The product page interface configuration method based on state machine is adopted, and the interface logic is automatically configured and managed through the connector service system, template processing service system, rule engine service system and state machine service system to reduce duplicate code and human errors.
It saves a lot of development costs, improves the maintainability of interface logic, reduces docking cycles, and improves production efficiency.
Smart Images

Figure CN119449598A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of interface configuration, and specifically to a product page interface configuration method and computer device based on a state machine. Background Art
[0002] In the process of developing Internet product business, with the rapid development of business, the platform usually needs to connect to multiple upstream (insurance companies or intermediary companies) systems. The interface of each upstream system has the same logic and different logic. In the existing practice, it is often necessary to spend a lot of manpower and material resources to develop the access logic of each upstream system separately through hard coding, resulting in multiple implementations of the same logic with different names. As a result, a lot of development costs need to be invested, and subsequent maintenance and expansion are difficult to start. Summary of the invention
[0003] The content of this application is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this application is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0004] Some embodiments of the present application propose a state machine-based product page interface configuration method, a computer device, and a computer-readable storage medium to solve one or more of the technical problems mentioned in the above background technology section.
[0005] In the first aspect, some embodiments of the present application provide a state machine-based product page interface configuration method, which is applied to a product page interface configuration system, wherein the product page interface configuration system includes: a connector service system, a template processing service system, a rule engine service system, and a state machine service system. The method includes: the connector service system determines connector configuration information in response to receiving an upstream service identifier sent by a management terminal, and stores the connector configuration information in a server, wherein the connector configuration information includes: an upstream interface request message and an upstream interface response message; the template processing service system obtains an upstream interface request message and an upstream interface response message from the server; the template processing service system configures request parameter template information based on the upstream interface request message to perform Format conversion processing; the template processing service system configures the response parameter template information based on the upstream interface response message to perform format conversion processing on the upstream interface response message; the template processing service system determines the request parameter template information and the response parameter template information as template configuration information, and stores the template configuration information in the server; the rule engine service system configures the rule set configuration information, and stores the rule set configuration information in the server; the state machine service system obtains the connector configuration information, the template configuration information and the rule set configuration information from the server; the state machine service system configures the state machine definition configuration information based on the connector configuration information, the template configuration information and the rule set configuration information, and stores the state machine definition configuration information in the server.
[0006] In a second aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the method described in any implementation of the first aspect is implemented.
[0007] In a third aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the method described in any implementation of the first aspect is implemented.
[0008] The above-mentioned embodiments of the present application have the following beneficial effects: through the product page interface configuration method based on the state machine of some embodiments of the present application, a large amount of development costs can be saved, the maintainability of the interface logic can be improved, the docking cycle can be reduced, and the production efficiency can be improved. Specifically, the reason why a large amount of cost needs to be invested and the subsequent maintenance and expansion are difficult to start is that it takes a lot of manpower and material resources to develop the access logic of each upstream system separately by hard coding, resulting in multiple implementations of the same logic, and the names are different. Based on this, the product page interface configuration method based on the state machine of some embodiments of the present application, first, the connector service system responds to the upstream service identifier sent by the management terminal, determines the connector configuration information, and stores the above connector configuration information in the server. Among them, the above connector configuration information includes: upstream interface request message, upstream interface response message. Thus, different upstream services can be connected through the connector service system. Secondly, the template processing service system obtains the upstream interface request message and the upstream interface response message from the above server. Then, the template processing service system configures the request parameter template information based on the above upstream interface request message to perform format conversion processing on the above upstream interface request message. Then, the template processing service system configures the response parameter template information based on the upstream interface response message to perform format conversion processing on the upstream interface response message. Then, the template processing service system determines the request parameter template information and the response parameter template information as template configuration information, and stores the template configuration information in the server. Thus, the data structure of the upstream interface request message and the upstream interface response message can be converted into a system-built-in data structure through the template processing service system, without the need for maintenance within the system, thereby reducing external code intrusion. Afterwards, the rule engine service system configures the rule set configuration information, and stores the rule set configuration information in the server. Thus, business rules can be defined in a declarative manner through the rule engine service system without modifying the core code of the application. Afterwards, the state machine service system obtains the connector configuration information, the template configuration information, and the rule set configuration information from the server. Finally, the state machine service system configures the state machine definition configuration information based on the connector configuration information, the template configuration information, and the rule set configuration information, and stores the state machine definition configuration information in the server. Therefore, the upstream service and the connector can be associated through the state machine service system so that the upstream service can be executed in the order of the linked list and the rule set configuration information can be associated to achieve automated completion of the business process.Therefore, by establishing an interface docking adaptation layer (i.e., connector service system), the common logic in interface access can be encapsulated into components, and the calling sequence of different interfaces can be configured into a state machine. Then, when connecting to a new upstream system, it is only necessary to implement components that do not exist in the system, and configure message templates and interface call state machines according to the upstream docking requirements. This can save a lot of development costs, improve the maintainability of interface logic, reduce docking cycles, and improve production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0010] Figure 1 is a flowchart of some embodiments of a state machine-based product page interface configuration method according to the present application; Figure 2 It is a schematic diagram of the structure of some embodiments of the product page interface configuration system according to the present application; Figure 3 It is a schematic diagram of the structure of a computer device suitable for implementing some embodiments of the present application. DETAILED DESCRIPTION
[0011] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0012] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0013] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0014] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0015] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0016] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0017] Figure 1 The process 100 of some embodiments of the state machine-based product page interface configuration method according to the present application is shown. The state machine-based product page interface configuration method is applied to a product page interface configuration system, which includes: a connector service system, a template processing service system, a rule engine service system, and a state machine service system, including the following steps: Step 101: the connector service system determines connector configuration information in response to receiving an upstream service identifier sent by a management terminal, and stores the connector configuration information in a server.
[0018] In some embodiments, the connector service system determines the connector configuration information in response to receiving the upstream service identifier sent by the management terminal, and stores the connector configuration information in the server. The connector configuration information may include: an upstream interface request message and an upstream interface response message. Here, the upstream service identifier can uniquely identify an upstream service (for example, the upstream service can be an insurance service). The server can be used to store connector configuration information. The upstream interface request message can be a request message representing at least one user information (for example, user name, user age, user attribute value (user assets), user flow attribute value (user insurance amount required)) that is desired to be obtained from the upstream service. The upstream interface response message can be a response message representing the receipt of a response request message sent by the upstream service.
[0019] Here, the product page interface configuration system can refer to Figure 2 . Figure 2 The following is a schematic diagram showing the structure of some embodiments of the product page interface configuration system according to the present application. Figure 2As mentioned above, the product page interface configuration system 200 may include a connector service system 201, a template processing service system 202, a rule engine service system 203, and a state machine service system 204. The connector service system 201 may be used to configure connector configuration information to connect to upstream services, and store the connector configuration information in a server. The template processing service system 202 may be used to obtain an upstream interface request message, an upstream interface response message from a server, configure request parameter template information and response parameter template information to perform format conversion processing on the upstream interface request message and the upstream interface response message, and store the request parameter template information and the response parameter template in a server. The rule engine service system 203 may be used to configure rule set configuration information, and store the rule set configuration information in a server. The state machine service system 204 may be used to obtain connector configuration information, template configuration information, and rule set configuration information from a server, configure state machine definition configuration information, and store the state machine definition configuration information in a server.
[0020] In practice, in response to receiving the upstream service identifier sent by the management terminal, the connector service system may determine the connector configuration information through the following steps: The first step is to determine the upstream service connection information in response to receiving the upstream service identifier sent by the management terminal. In practice, in response to receiving the upstream service identifier sent by the management terminal, the above connector service system can determine the preset protocol, upstream path, upstream domain name, and upstream request method as the upstream service connection information. Here, the preset protocol can be the HTTP (hypertext transport protocol) protocol. The upstream path can be the path of the upstream service. The upstream domain name can be the domain name of the upstream service. The upstream request method can be the GET (query request) method.
[0021] The second step is to configure the connector parameter information corresponding to the upstream service connection information. In practice, the connector service system can determine the connector identifier, public parameter information, and request header information as the connector parameter information corresponding to the upstream service connection information. Here, the connector identifier can uniquely identify a connector. The connector can be used to connect to upstream services. The public parameter information may include, but is not limited to, at least one of the following: number of connections, connection duration. The number of connections can represent the number of upstream services that the connector has connected to. The connection duration can represent the length of time the connector is connected to the upstream service. The request header information may include, but is not limited to, at least one of the following: request path, request domain name. The request path can represent the path between the connector and the upstream service to be connected. The request domain name can represent the domain name of the connector and the upstream service to be connected.
[0022] The third step is to perform binding processing on the upstream service connection information and the connector parameter information to generate connector binding information. In practice, in response to determining that the upstream service connection information and the connector parameter information meet the preset binding conditions, the connector service system may determine the upstream service connection information and the connector parameter information as connector binding information. Here, the preset binding conditions may be: the upstream path and upstream domain name included in the upstream service connection information are the same as the request path and request domain name included in the request header information included in the upstream connector parameter information, and the number of connections included in the public parameter information included in the upstream connector parameter information is less than or equal to the preset number of connections. For example, the preset number of connections may be 5.
[0023] The fourth step is to encrypt the above connector binding information to generate connector configuration information.
[0024] In practice, the connector service system may encrypt the connector binding information to generate connector configuration information by the following steps: The first step is to determine the first prime number and the second prime number. In practice, the connector service system can randomly determine the first prime number and the second prime number. The first prime number and the second prime number can be prime numbers that are not equal to each other.
[0025] In the second step, the product of the first prime number and the second prime number is determined as the modulus.
[0026] The third step is to determine the Euler parameter based on the first prime number and the second prime number. In practice, the connector service system can determine the Euler parameter by the following steps: First, the difference between the first prime number and the preset value is determined as the first prime number difference. Secondly, the difference between the second prime number and the preset value is determined as the second prime number difference. Then, the product of the first prime number difference and the second prime number difference is determined as the Euler parameter. For example, the preset value can be 1.
[0027] The fourth step is to determine the first public key based on the Euler parameter. In practice, in response to determining that the first public key is coprime with the Euler parameter and the first public key is smaller than the Euler parameter, the connector service system may randomly generate the first public key.
[0028] The fifth step is to perform a first encryption process on the connector binding information based on the first public key and the modulus to generate the first connector encryption information. In practice, the connector service system can perform a first encryption process on the connector binding information to generate the first connector encryption information through the following steps: First, the connector binding information is vectorized by a preset vectorization algorithm to generate a connector binding vector. Secondly, the first public key power of the connector binding vector is determined as the initial connector encryption information. Next, the remainder obtained by performing a modulus process on the initial connector encryption information with respect to the modulus is determined as the first connector encryption information.
[0029] Step 6: Determine the second key. In practice, the connector service system may randomly determine the second key of a preset length. For example, the preset length may be 128 bits.
[0030] In the seventh step, the first connector encrypted information is padded to generate connector padding information. In practice, the connector service system may padded the first connector encrypted information using a preset padding algorithm to generate connector padding information. For example, the preset padding algorithm may be a PKCS7 (syntax standard for encrypted messages) padding algorithm. The length of the connector padding information may be an integer multiple of a preset length. For example, the preset length may be 128 bits.
[0031] Step 8: Group the connector filling information to generate a connector grouping information set. In practice, the connector service system may group the connector filling information to generate a connector grouping information set using a preset grouping algorithm. For example, the preset grouping algorithm may be: determine each preset length of the connector filling information as connector grouping information to obtain a connector grouping information set.
[0032] In step 9, based on the second key, each connector group information in the connector group information set is subjected to a second encryption process to generate second connector encryption information and obtain a second connector encryption information set. In practice, the connector service system may perform a second encryption process on each connector group information in the connector group information set based on the second key using a preset encryption algorithm to generate second connector encryption information and obtain a second connector encryption information set. For example, the preset encryption algorithm may be an AES (Advanced Encryption Standard, symmetric encryption) algorithm.
[0033] In the tenth step, each second connector encryption information in the second connector encryption information set is concatenated to generate connector configuration information. In practice, the connector service system can concatenate each second connector encryption information in the second connector encryption information set in a sequence from left to right to generate connector configuration information.
[0034] The relevant content of step 101, as an inventive point of the embodiment of the present application, solves the following technical problem "causing the security of the product page interface configuration to be reduced". Among them, the factors that lead to the reduced security of the product page interface configuration are often as follows: when the connector service system configures the connector configuration information to connect to the upstream service, when the configured but unencrypted connector configuration information is directly stored in the server, when the server is attacked, the connector configuration information will be leaked. If the above factors are solved, the effect of improving the security of the product page interface configuration can be achieved. In order to achieve this effect, the present application can first perform a first encryption process on the connector binding information by determining the first public key based on the first prime number and the second prime number. Thus, the security of the connector binding information can be improved. Then, the second key can be used to perform a second encryption process on each connector group information in the connector group information set, and the second encrypted second connector encrypted information set can be processed by means of the second encryption to obtain the connector configuration information. Thus, the first encrypted first connector encrypted information can be encrypted in blocks, which can further improve the security of the connector binding information. Therefore, the connector binding information can be encrypted twice by the first public key and the second key, thereby increasing the security of the connector configuration information. Furthermore, the security of the product page interface configuration can be improved.
[0035] Step 102: the template processing service system obtains an upstream interface request message and an upstream interface response message from the server.
[0036] In some embodiments, the template processing service system obtains the upstream interface request message and the upstream interface response message from the server. In practice, the template processing service system can obtain the upstream interface request message and the upstream interface response message from the server via a wired connection or a wireless connection.
[0037] It should be noted that the above wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0038] Step 103: the template processing service system configures request parameter template information based on the upstream interface request message to perform format conversion processing on the upstream interface request message.
[0039] In some embodiments, the template processing service system configures request parameter template information based on the upstream interface request message to perform format conversion processing on the upstream interface request message.
[0040] In practice, based on the upstream interface request, the template processing service system may configure the request parameter template information through the following steps: The first step is to split the upstream interface request message to generate upstream interface request message header information and upstream interface request message body information. In practice, the template processing service system can split the upstream interface request message into upstream interface request message header information and upstream interface request message body information. Among them, the upstream interface request message header information can represent the message header of the upstream interface request message. The upstream interface request message body information can represent the message body of the upstream interface request message. Here, the upstream interface request message can represent the information you want to obtain from the upstream service. The upstream interface request message header information can represent the path of the upstream service. The upstream interface request message body information can represent at least one user information you want to obtain (for example, user name, user age, user address, etc.).
[0041] The second step is to perform data partitioning processing on the upstream interface request message body information to generate an upstream interface request message partitioning information set. In practice, the template processing service system can perform data partitioning processing on the upstream interface request message body information through a preset data partitioning algorithm to generate an upstream interface request message partitioning information set. For example, the preset data partitioning algorithm can be: determining each user information represented in the upstream interface request message body information as upstream interface request message partitioning information.
[0042] The third step is to obtain an upstream interface data set corresponding to the upstream interface request message division information set from a storage terminal corresponding to the upstream interface request message header information. The upstream interface data in the upstream interface data set corresponds to the upstream interface request message division information in the upstream interface request message division information set. Here, the storage terminal may be a terminal for storing the upstream interface data set. The upstream interface data in the upstream interface data set may represent the data that the upstream interface request message division information wants to obtain.
[0043] In the fourth step, each upstream interface data in the upstream interface data set is encrypted to generate upstream interface encrypted data, thereby obtaining an upstream interface encrypted data set. In practice, the specific implementation method of encrypting each upstream interface data in the upstream interface data set to generate upstream interface encrypted data and the technical effect thereof can be referred to step 101 in the above embodiment, which will not be described in detail here.
[0044] The fifth step is to fuse the upstream interface request message division information set and the upstream interface encryption data set to generate an upstream interface mapping information set.
[0045] Step 6: Determine the upstream interface mapping information set as request parameter template information.
[0046] Step 104: the template processing service system configures response parameter template information based on the upstream interface response message to perform format conversion processing on the upstream interface response message.
[0047] In some embodiments, the template processing service system configures the response parameter template information based on the upstream interface response message to perform format conversion processing on the upstream interface response message. In practice, the specific implementation method and technical effect of the configuration of the response parameter template information by the template processing service system based on the upstream interface response message can refer to step 103 in the above embodiment, which will not be repeated here.
[0048] Step 105: the template processing service system determines the request parameter template information and the response parameter template information as template configuration information, and stores the template configuration information in the server.
[0049] In some embodiments, the template processing service system determines the request parameter template information and the response parameter template information as template configuration information, and stores the template configuration information in the server.
[0050] Step 106: the rule engine service system configures rule set configuration information, and stores the rule set configuration information in the server.
[0051] In some embodiments, the rule engine service system configures rule set configuration information, and stores the rule set configuration information in the server.
[0052] In practice, the above rule engine service system can configure the rule set configuration information through the following steps: In the first step, in response to receiving a rule definition identifier sent by a management terminal, a preset rule filling list is sent to the management terminal to receive the filled rule filling information sent by the management terminal. The rule definition identifier may represent the business rules that the management terminal wants to formulate for the upstream service. The preset rule filling list may be a list of business rules to be filled in. The rule filling information may represent at least one business rule filled in by the management terminal.
[0053] The second step is to perform data cleaning on the rule filling information to generate rule cleaning information. In practice, the rule engine service system can delete the information representing the empty space from the rule filling information to obtain the rule cleaning information.
[0054] The third step is to standardize the rule cleaning information to generate rule standardization information. In practice, the rule engine service system can standardize the rule cleaning information by using a preset standardization algorithm to generate rule standardization information. For example, the preset standardization algorithm can be: JsonPath (query language) algorithm. Thus, the rule cleaning information representing the first data format can be converted into rule standardization information representing the second data format by using a preset standardization algorithm. For example, the first data format can be: JSON (JavaScript Object Notation, a lightweight data exchange format). The second data format can be: Context.
[0055] The fourth step is to classify the above-mentioned rule standardization information to generate a rule classification information group set. In practice, the above-mentioned rule engine service system can classify the above-mentioned rule standardization information through a preset classification algorithm to generate a rule classification information group set. For example, the preset classification algorithm can be: first, the information representing each business rule included in the rule standardization information is determined as rule division information to obtain a rule division information set. Secondly, each rule division information corresponding to the same upstream rule in the rule division information set is determined as a rule classification information group to obtain a rule classification information group set. Among them, the rule classification information in the rule classification information group set may include but is not limited to: rule category. The rule category may be but is not limited to: the first rule category and the second rule category. For example, the first rule category can represent native (fields existing in the rule standardization information, for example, the user age is greater than or equal to 18). The second rule category can represent variables (fields not present in the rule standardization information, for example, the ratio of the user attribute value to the user flow attribute value is greater than or equal to 10). Here, each rule classification information in the rule classification information group in the rule classification information group set has a connection relationship. The connection relationship between each piece of rule classification information may be: the rule classification information representing the first rule category is the parent node of the rule classification information representing the second rule category.
[0056] Step 5: construct a rule information forest based on the rule classification information set. In practice, the rule engine service system can construct a rule information forest based on the rule classification information set by using a preset forest construction algorithm. For example, the preset forest construction algorithm can be: construct a rule information tree with rule classification information as a node and the connection relationship between rule classification information as an edge for each rule classification information set in the rule classification information set to generate a rule information forest.
[0057] The sixth step is to determine the above rule information forest as rule set configuration information.
[0058] Optionally, the rule engine service system may further perform the following steps: In the first step, in response to receiving a rule update identifier sent by a management terminal, a preset rule update list is sent to the management terminal to receive the filled rule update information sent by the management terminal. The rule update identifier may indicate that the management terminal wants to update the rule set configuration information. The preset rule update list may be a list of business rules to be filled in. The rule update information may indicate at least one business rule that the management terminal wants to update.
[0059] The second step is to perform data cleaning on the rule update information to generate target rule cleaning information. In practice, the rule engine service system can delete the information representing the null from the rule update information to obtain the target rule cleaning information.
[0060] The third step is to perform standardization processing on the target rule cleaning information to generate target rule standardized information. In practice, the rule engine service system can perform standardization processing on the target rule cleaning information through the preset standardization algorithm to generate target rule standardized information.
[0061] The fourth step is to classify the target rule standardization information to generate a target rule classification information set. In practice, the rule engine service system can classify the target rule standardization information to generate a target rule classification information set by using the preset classification algorithm.
[0062] Step 5: construct a target rule information forest based on the target rule classification information set. In practice, the rule engine service system may construct a target rule information forest based on the target rule classification information set by using the preset forest construction algorithm. The target rule information forest may include at least one target rule information tree. The target rule information tree included in the target rule information forest may correspond to the rule information tree included in the rule information forest.
[0063] Step 6: Based on the target rule information forest, update the rule information forest. In practice, for each rule information tree included in the rule information forest, in response to determining that there is a target rule information tree corresponding to the rule information tree in the target rule information forest, the rule engine service system can update the rule information tree to the target rule information tree corresponding to the rule information tree, so as to update the rule information forest.
[0064] In the seventh step, the updated rule information forest is determined as the rule set configuration information to update the rule set configuration information.
[0065] Step 107: the state machine service system obtains connector configuration information, template configuration information and rule set configuration information from the server.
[0066] In some embodiments, the state machine service system obtains connector configuration information, template configuration information and rule set configuration information from the server. In practice, the state machine service system can obtain connector configuration information, template configuration information and rule set configuration information from the server via a wired connection or a wireless connection.
[0067] Step 108: the state machine service system configures the state machine definition configuration information based on the connector configuration information, the template configuration information and the rule set configuration information, and stores the state machine definition configuration information in the server.
[0068] In some embodiments, the state machine service system configures the state machine definition configuration information based on the connector configuration information, the template configuration information and the rule set configuration information, and stores the state machine definition configuration information in a server.
[0069] In practice, based on the connector configuration information, the template configuration information, and the rule set configuration information, the state machine service system may configure the state machine definition configuration information through the following steps: The first step is to configure the state machine information corresponding to the connector configuration information. In practice, the state machine service system can determine the state machine identifier as the state machine information corresponding to the connector configuration information. Here, the state machine identifier can uniquely identify a state machine.
[0070] The second step is to configure the state machine chain relationship information corresponding to the state machine information, the template configuration information and the rule set configuration information. In practice, the state machine service system can determine the state machine information, the template configuration information and the rule set configuration information that meet the preset corresponding conditions as the state machine chain relationship information. Among them, the preset corresponding condition can be: the upstream services corresponding to the template configuration information and the rule set configuration information are the same.
[0071] The third step is to perform binding processing on the above-mentioned state machine information, the above-mentioned state machine chain relationship information and the preset product information to generate state machine binding information. In practice, the above-mentioned state machine service system determines the above-mentioned state machine information, the above-mentioned state machine chain relationship information and the preset product information as state machine binding information in response to determining that the above-mentioned state machine information, the above-mentioned state machine chain relationship information and the preset product information meet the preset state machine binding condition. Among them, the preset state machine binding condition can be: the state machine identifier included in the state machine information is the same as the state machine identifier included in the state machine chain relationship information, and the product identifier included in the state machine chain relationship information is the same as the product identifier included in the preset product information. The preset product information may include but is not limited to at least one of the following: product identification, product information. The product identification can uniquely identify a product (such as an insurance product). The product information may include but is not limited to at least one of the following: product attribute value (insurance amount), product term (insurance start time to insurance end time).
[0072] The fourth step is to encrypt the state machine binding information to generate the state machine definition configuration information. In practice, the specific implementation method of encrypting the state machine binding information to generate the state machine definition configuration information and the technical effect brought by it can refer to step 101 in the above embodiment, which will not be repeated here.
[0073] The above-mentioned embodiments of the present application have the following beneficial effects: through the product page interface configuration method based on the state machine of some embodiments of the present application, a large amount of development costs can be saved, the maintainability of the interface logic can be improved, the docking cycle can be reduced, and the production efficiency can be improved. Specifically, the reason why a large amount of cost needs to be invested and the subsequent maintenance and expansion are difficult to start is that it takes a lot of manpower and material resources to develop the access logic of each upstream system separately by hard coding, resulting in multiple implementations of the same logic, and the names are different. Based on this, the product page interface configuration method based on the state machine of some embodiments of the present application, first, the connector service system responds to the upstream service identifier sent by the management terminal, determines the connector configuration information, and stores the above connector configuration information in the server. Among them, the above connector configuration information includes: upstream interface request message, upstream interface response message. Thus, different upstream services can be connected through the connector service system. Secondly, the template processing service system obtains the upstream interface request message and the upstream interface response message from the above server. Then, the template processing service system configures the request parameter template information based on the above upstream interface request message to perform format conversion processing on the above upstream interface request message. Then, the template processing service system configures the response parameter template information based on the upstream interface response message to perform format conversion processing on the upstream interface response message. Then, the template processing service system determines the request parameter template information and the response parameter template information as template configuration information, and stores the template configuration information in the server. Thus, the data structure of the upstream interface request message and the upstream interface response message can be converted into a system-built-in data structure through the template processing service system, without the need for maintenance within the system, thereby reducing external code intrusion. Afterwards, the rule engine service system configures the rule set configuration information, and stores the rule set configuration information in the server. Thus, business rules can be defined in a declarative manner through the rule engine service system without modifying the core code of the application. Afterwards, the state machine service system obtains the connector configuration information, the template configuration information, and the rule set configuration information from the server. Finally, the state machine service system configures the state machine definition configuration information based on the connector configuration information, the template configuration information, and the rule set configuration information, and stores the state machine definition configuration information in the server. Therefore, the upstream service and the connector can be associated through the state machine service system so that the upstream service can be executed in the order of the linked list and the rule set configuration information can be associated to achieve automated completion of the business process.Therefore, by establishing an interface docking adaptation layer (i.e., connector service system), the common logic in interface access can be encapsulated into components, and the calling sequence of different interfaces can be configured into a state machine. Then, when connecting to a new upstream system, it is only necessary to implement components that do not exist in the system, and configure message templates and interface call state machines according to the upstream docking requirements. This can save a lot of development costs, improve the maintainability of interface logic, reduce docking cycles, and improve production efficiency. The present application also provides a computer device 300. Figure 3 As shown, the computer device 300 includes: a bus 301, a processor 302, a memory 303 and a communication interface 304. The processor 302, the memory 303 and the communication interface 304 communicate with each other through the bus 301. The computer device 300 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computer device 300.
[0074] The bus 301 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus 301 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 301 may include a path for transmitting information between various components of the computer device 300 (for example, the memory 303, the processor 302, and the communication interface 304).
[0075] The processor 302 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0076] The memory 303 may include a volatile memory, such as a random access memory (RAM). The memory 303 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0077] The memory 303 stores executable program codes, and the processor 302 executes the executable program codes to respectively implement the functions of the acquisition module, sampling module, determination module, and mixing module, thereby implementing the above-mentioned product page interface configuration method based on the state machine. That is, the memory 303 stores instructions for executing the above-mentioned product page interface configuration based on the state machine.
[0078] The communication interface 304 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computer device 300 and other devices or a communication network.
[0079] An embodiment of the present application also provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned product page interface configuration method based on the state machine.
[0080] The embodiment of the present application also provides a computer-readable storage medium. The above-mentioned computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The above-mentioned available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk). The computer-readable storage medium includes instructions, and the above-mentioned instructions instruct the computing device to execute the above-mentioned product page interface configuration method based on the state machine.
[0081] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0082] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A product page interface configuration method based on a state machine, applied to a product page interface configuration system, the product page interface configuration system comprising: Connector service system, template processing service system, rule engine service system, state machine service system, including: The connector service system determines connector configuration information in response to receiving the upstream service identifier sent by the management terminal, and stores the connector configuration information in the server, wherein the connector configuration information includes: an upstream interface request message and an upstream interface response message; The template processing service system obtains an upstream interface request message and an upstream interface response message from the server; The template processing service system configures request parameter template information based on the upstream interface request message to perform format conversion processing on the upstream interface request message; The template processing service system configures response parameter template information based on the upstream interface response message to perform format conversion processing on the upstream interface response message; The template processing service system determines the request parameter template information and the response parameter template information as template configuration information, and stores the template configuration information in the server; The rule engine service system configures rule set configuration information, and stores the rule set configuration information in the server; The state machine service system obtains connector configuration information, template configuration information and rule set configuration information from the server; The state machine service system configures state machine definition configuration information based on the connector configuration information, the template configuration information and the rule set configuration information, and stores the state machine definition configuration information in a server.
2. The method for configuring a product page interface based on a state machine according to claim 1, wherein: The step of determining the connector configuration information in response to receiving the upstream service identifier sent by the management terminal includes: In response to receiving the upstream service identifier sent by the management terminal, determining the upstream service connection information; Configuring connector parameter information corresponding to the upstream service connection information; Binding the upstream service connection information and the connector parameter information to generate connector binding information; The connector binding information is encrypted to generate connector configuration information.
3. The method for configuring a product page interface based on a state machine according to claim 1, wherein: The configuring request parameter template information based on the upstream interface request message includes: The upstream interface request message is split to generate upstream interface request message header information and upstream interface request message body information; Performing data division processing on the upstream interface request message main body information to generate an upstream interface request message division information set; Acquire an upstream interface data set corresponding to the upstream interface request message division information set from a storage terminal corresponding to the upstream interface request message header information, wherein the upstream interface data in the upstream interface data set corresponds to the upstream interface request message division information in the upstream interface request message division information set; Encrypting each upstream interface data in the upstream interface data set to generate upstream interface encrypted data, thereby obtaining an upstream interface encrypted data set; fusing the upstream interface request message division information set and the upstream interface encryption data set to generate an upstream interface mapping information set; The upstream interface mapping information set is determined as request parameter template information.
4. The method for configuring a product page interface based on a state machine according to claim 1, wherein: The configuring state machine definition configuration information based on the connector configuration information, the template configuration information and the rule set configuration information includes: Configuring state machine information corresponding to the connector configuration information; Configure state machine chain relationship information corresponding to the state machine information, the template configuration information, and the rule set configuration information; Binding the state machine information, the state machine chain relationship information and the preset product information to generate state machine binding information; The state machine binding information is encrypted to generate state machine definition configuration information.
5. The method for configuring a product page interface based on a state machine according to claim 1, wherein: The configuration rule set configuration information includes: In response to receiving the rule definition identifier sent by the management terminal, sending the preset rule filling list to the management terminal to receive the filled rule filling information sent by the management terminal; Performing data cleaning processing on the rule filling information to generate rule cleaning information; Performing standardization processing on the rule cleaning information to generate rule standardization information; Classifying the rule standardization information to generate a rule classification information set; Based on the rule classification information set, construct a rule information forest; The rule information forest is determined as rule set configuration information.
6. A computer device, wherein: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Service data processing method, server and storage medium
CN111026797A
Interface message conversion configuration method, interface message conversion method and equipment
CN111787097A
Business data processing method for block chain and digital finance and big data platform
CN112765434A
Connector extension method and system of business application integration platform
CN113821271A
SAAS system interface cloud debugging method, system, device and medium
CN114637682A