CN112559644A - Method, device, equipment and storage medium for dynamically assembling product parts - Google Patents

Method, device, equipment and storage medium for dynamically assembling product parts Download PDF

Info

Publication number
CN112559644A
CN112559644A CN202011551621.0A CN202011551621A CN112559644A CN 112559644 A CN112559644 A CN 112559644A CN 202011551621 A CN202011551621 A CN 202011551621A CN 112559644 A CN112559644 A CN 112559644A
Authority
CN
China
Prior art keywords
product
assembled
components
processing
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011551621.0A
Other languages
Chinese (zh)
Other versions
CN112559644B (en
Inventor
古毅伟
吴德柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202011551621.0A priority Critical patent/CN112559644B/en
Publication of CN112559644A publication Critical patent/CN112559644A/en
Application granted granted Critical
Publication of CN112559644B publication Critical patent/CN112559644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Provided are a method, a device, equipment and a storage medium for dynamically assembling product parts, wherein a product part processing method is written in a code source file of a product part, the product part processing method specifies the processing type of target product attributes in a target product part, and the method comprises the following steps: acquiring a product part to be assembled according to a demand list configured by a product configuration personnel; analyzing a code source file of a product component to be assembled, and determining a product attribute processing information set, wherein each piece of product attribute processing information in the product attribute processing information set comprises: source product components, target product attributes and processing types thereof; processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled; and realizing dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled. The method can enable the product obtained after dynamic assembly to be directly on line, reduces the capability requirement on product developers and improves the stability of a product system.

Description

Method, device, equipment and storage medium for dynamically assembling product parts
Technical Field
The present disclosure relates to the field of product assembly, and in particular, to a method, an apparatus, a device, and a storage medium for dynamically assembling product components.
Background
Financial product factory thinking stems from the inspirations of successful transformation of world-level manufacturing. In the early manufacturing industry, consumer products are produced in a large-batch, unified and assembly line way, but since the end of the last century, in order to meet the increasing difference requirements of customers, manufacturers standardize main parts of final products, each part is provided with a plurality of models, and different types of products can be produced by assembling parts of different models, so that the market can be quickly responded, and the difference requirements of customers can be met.
The product factory model in the financial product system just refers to the factory thought, and a product classification structure, product components and product attributes are formed from the overall view of the financial enterprise through product modeling. The product classification structure (including product lines, product groups, product templates and product catalogs including saleable products) is beneficial to positioning and initially classifying product requirements, and product components, product attributes and attribute values are beneficial to displaying and discriminating specific differences of different products. For the innovative needs and differentiated needs of customers, the financial product factory allows a product configurator (or product analyst) to assemble a new product by combining product components, defining product attribute values.
At present, technical schemes of financial product factories are all realized based on a product component static assembly mode, but actually, processing of product components not only needs product attribute information of the product components, but also can need to acquire/modify attribute information of other product components related to the product components, the product components are not in a static relationship, and a business logic dependency relationship actually exists, so that the existing static assembly mode often needs to modify codes to complete business logic processing after the product components are configured, the product can be put on production and put on line, and the product is difficult to be put on line quickly after the product configuration is completed. In the process, due to the complexity of logic dependence among product components, the difficulty of writing correct logic processing codes is high, and developers who have thorough knowledge of the products are usually required to complete the process, so that the development cost is high. In addition, each time the product attribute or the product component is increased or decreased, it almost inevitably means the modification of the program corresponding to the processing logic, and the purpose of quickly getting online based on the configuration cannot be achieved.
Disclosure of Invention
The method is used for solving the problems that in the prior art, when product components with business logic relationships are assembled, increased and decreased, product configuration and production operation can be realized only by depending on the manually written business logic dependencies, the requirements on the capability of developers are high, and the products cannot be quickly on-line based on configuration.
In order to solve the above technical problem, a first aspect of the present disclosure provides a method for dynamically assembling product parts, where a code source file of a product part has product part processing method logic codes written therein, and the product part processing method specifies a processing type for a target product attribute in a target product part, and the method includes:
acquiring a product part to be assembled according to a demand list configured by a product configuration personnel;
analyzing a code source file of the product component to be assembled, and determining a product attribute processing information set, wherein each piece of product attribute processing information in the product attribute processing information set comprises: source product components, target product attributes and processing types thereof;
processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled;
and realizing the dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled.
In a further embodiment of the product component dynamic assembly method herein, the product component processing method comprises:
obtaining target product attributes of source product components;
modifying the target product attributes of the source product components;
obtaining target product attributes of other product components except for the source product component;
target product attributes of product parts other than the source product part are modified.
In a further embodiment of the dynamic product component assembly method herein, analyzing the code source file of the product component to be assembled to determine a product property processing information set includes:
capturing codes related to product attribute processing from the code source file of the product component to be assembled by using an abstract syntax tree;
identifying a plurality of pieces of product attribute processing information from the captured code by using a finite automaton;
and processing the information according to the identified product attribute to obtain a product attribute processing information set.
In a further embodiment of the method for dynamically assembling product parts herein, the determining the dependency relationship of the product parts to be assembled according to the product attribute processing information set includes:
and processing the information set according to the product attributes, and matching the dependency relationship of the product components to be assembled according to a preset dependency relationship criterion.
In a further embodiment of the dynamic assembly method of product components herein, the dynamic assembly of the product components to be assembled is realized according to the dependency relationship of the product components to be assembled, and includes:
constructing a dependency directed graph according to the dependency relationship of the product components to be assembled;
determining the execution sequence of the product components to be assembled according to the dependency directed graph;
and dynamically assembling the product components to be assembled according to the execution sequence of the product components to be assembled.
In a further embodiment of the dynamic assembly method of product components herein, determining the execution order of the product components to be assembled according to the dependency directed graph further includes:
and detecting whether a dependence ring exists in the dependence directed graph or not, if so, sending alarm information to developers, and if not, determining the execution sequence of the product components to be assembled according to the dependence directed graph.
In a further embodiment of the dynamic assembly method of product components herein, determining an execution order of the product components to be assembled according to the dependency directed graph includes:
and determining the execution sequence of the product components to be assembled by utilizing a topological sorting method according to the dependency directed graph.
A second aspect of the present disclosure provides a product part dynamic assembly apparatus, in which a code source file of a product part is written with a product part processing method logic code, the product part processing method specifying a processing type for a target product attribute in a target product part, the apparatus including:
the acquisition module is used for acquiring a product part to be assembled according to a demand list configured by a product configuration personnel;
an analysis module, configured to analyze the code source file of the product component to be assembled, and determine a product attribute processing information set, where each piece of product attribute processing information in the product attribute processing information set includes: source product components, target product attributes and processing types thereof;
the dependency relationship determining module is used for determining the dependency relationship of the product components to be assembled according to the product attribute processing information set;
and the dynamic assembly module is used for realizing the dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled.
A third aspect of the present disclosure provides a computer apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for dynamic assembly of product components as described in any of the preceding embodiments when executing the computer program.
A fourth aspect herein provides a computer-readable storage medium storing an executable computer program which, when executed by a processor, implements the method of dynamic assembly of product components as described in any one of the preceding embodiments.
The product component dynamic assembly method, device, equipment and storage medium provided herein are that, by writing product component processing method logic codes in a code source file of a product component, the product component processing method specifies a processing type of a target product attribute in a target product component, and when a product component to be assembled is dynamically assembled, the code source file of the product component to be assembled is analyzed to determine a product attribute processing information set, where each piece of product attribute processing information in the product attribute processing information set includes: source product components, target product attributes and processing types thereof; processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled; according to the dependency relationship of the product parts to be assembled, the dynamic assembly of the product parts to be assembled is realized, the problem that the configurable production operation of the product cannot be really realized due to the actual business logic dependency relationship between the product parts is solved, the product obtained after the dynamic assembly can be directly on-line, the capability requirement on product developers is reduced, and the stability of a product system is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 illustrates a flow diagram of a method for dynamic assembly of product parts according to embodiments herein;
FIG. 2 illustrates a flow diagram of a product attribute processing information set analysis process according to an embodiment herein;
FIG. 3 illustrates a first flowchart of a dynamic assembly process of product parts to be assembled according to an embodiment herein;
FIG. 4 illustrates a second flowchart of a dynamic assembly process of product parts to be assembled according to embodiments herein;
FIG. 5 shows a schematic diagram of a dependency directed graph of embodiments herein;
FIG. 6 is a schematic diagram illustrating a product execution sequence according to an embodiment herein;
FIG. 7 illustrates a first configuration diagram of a dynamic assembly apparatus of product components according to embodiments herein;
FIG. 8 illustrates a first configuration diagram of a dynamic assembly apparatus of product components according to embodiments herein;
FIG. 9 shows a block diagram of a computer device according to an embodiment of the present disclosure.
Description of the symbols of the drawings:
710. an acquisition module;
720. an analysis module;
730. a dependency determination module;
740. dynamically assembling the modules;
750. a detection module;
902. a computer device;
904. a processor;
906. a memory;
908. a drive mechanism;
910. an input/output module;
912. an input device;
914. an output device;
916. a presentation device;
918. a graphical user interface;
920. a network interface;
922. a communication link;
924. a communication bus.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments herein without making any creative effort, shall fall within the scope of protection.
In the prior art, when product components with business logic relationships are assembled, increased and decreased, product configuration and production operation can be realized only by depending on the manually written business logic dependencies, and the problems that the requirements on the capability of developers are high, and the products cannot be quickly on-line based on configuration exist.
Based on the technical problems in the prior art, the present disclosure provides a method for dynamically assembling product components, which enables a product obtained after dynamic assembly to be directly on-line, reduces the capability requirement on product developers, facilitates adding product components or product attributes, improves the stability of a product system, and also reduces the development cycle of new products and increases the generation speed of new products.
Specifically, before the product component dynamic assembly method provided herein is implemented, a product component processing method logic code is written in a code source file of a product component, and the product component processing method is used for implementing business logic, where the product component is composed of a plurality of product attributes, where the product attributes may be default values, and may also include value ranges, and the product component establishing process includes: based on analyzing the existing product, clustering, grouping and the like are performed on the product attributes, and each clustering or grouping result is used as a product component, for example, an interest rate component is a product component, and the included product attributes include an interest rate calculation mode and an interest rate floating value.
The product part processing method at least specifies the processing type of the target product attribute in the target product part, wherein the target product part can be a source product part, namely the target product part is the same as the source product part, and can also be other product parts except the source product part. The processing type comprises parameter acquisition and parameter modification. Specifically, the product part processing method is a program code, and includes: obtaining a target product attribute of a source product component (GetSelf); modifying (SetSelf) the target product property of the source product component; obtaining target product attributes of other product parts except the source product part (GetOther); the target product attributes of the product parts other than the source product part are modified (SetOther). The product part processing method also provides for other processing of product attributes, such as verification and the like, and is not limited herein.
As shown in fig. 1, the dynamic assembly method of product parts (which may be abbreviated as SmartCompLinker dynamic assembly analysis method) includes:
and step 110, acquiring a product component to be assembled according to a demand list configured by a product configuration personnel.
In this step, the requirement list records brief information of the product components to be assembled, such as product component names and product attribute values.
The product configurator is a business person who interfaces directly with the customer or a business person associated with the product.
The product parts to be assembled are part of the product parts in the product part database, each product part is composed of a plurality of product attributes, and the product parts can be flexibly shared in different products.
Step 120, analyzing a code source file of a product component to be assembled, and determining a product attribute processing information set, wherein each piece of product attribute processing information in the product attribute processing information set comprises: source product components, target product attributes, and process types thereof.
In this step, the product attribute processing information set is shown in table one,
watch 1
Source product component Target product component Target productProperties Type of treatment
Product part A Product part B Target product attribute attrB1 GetOther
Product part B Product part A Target product vertical attrA1 SetOther
Product part B Product part B Target product attribute attrB1 SetSelf
Product part A Product part A Target product attribute attrA1 GetSelf
…… …… …… ……
The source product component is determined by the product component being analyzed, e.g., product component A is being analyzed, then the source product component is A. The target product part is set in the code of the source product part processing method. Each product attribute contained in the source product component is configured with what type of processing is performed on each product attribute by which product component (i.e., the target product component), as shown in table two. The target product components and the processing types corresponding to the product attributes may be the same or different, and are not limited herein.
Watch two
Target product component Target product attributes Type of treatment
Product part B Target product attribute attrA1 GetOther
Product part A Target product vertical attrA2 SetOther
Product part B Target product attribute attrA3 SetSelf
Product part A Target product attribute attrA4 GetSelf
…… …… ……
And step 130, processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled.
In this step, the specific implementation process includes:
(1) grouping the information in the product attribute processing information set according to the target product attribute of the target product component;
(2) and determining the dependency relationship among the products to be assembled according to the processing types of the source product components and the target product attributes in each group of information. When the step is implemented, the dependency relationship between the products to be assembled is determined according to the processing types of the source product components and the target product attributes in each group of information and the pre-configured dependency relationship criteria.
The implementation method can avoid omission and repeated confirmation of the dependency relationship and improve the accuracy and efficiency of the determination of the dependency relationship.
In detail, the dependency relationship of a product component depends on the processing type of the product attribute, and three types of dependency relationships are defined in the dependency relationship criterion: Get/Get, Get/Set, Set/Set. In the three dependency relationships, Get/Get means that two product components perform acquisition operation on the same product attribute, and modification is not involved, so that the Get/Get dependency relationship does not affect product component assembly. The Get/Set dependency relationship and the Set/Set dependency relationship affect the assembly of product parts.
The Get/Set dependency relationship means that a certain product component (for example, product component a, denoted as comp a) acquires a certain attribute (for example, attrB1 attribute) of one product component (for example, product component B, denoted as comp B, comp a and comp B may be the same product component), and another product component (for example, product component C, denoted as comp C, comp C and comp B may be the same product component) modifies attrB1 attribute, so that the dependency of comp a on comp C can be determined, and denoted as comp- > comp a.
Set/Set dependency refers to two product parts modifying a product property of another product part at the same time, and there is a dependency between the two product parts, for example, if comp b and comp c modify the same product property of comp a at the same time, the dependency between comp b and comp c is either comp- > comp c or comp c- > comp b.
The step is implemented by determining the dependency relationship among the product components meeting the preset dependency relationship criterion in each group of information. For example, in one embodiment, the dependency relationship between the product components determined in this step is: CompB- > CompA, CompB- > ComPC, CompA- > ComPF, ComPC- > ComPF, and ComPE- > ComPD.
And 140, realizing dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled.
In this step, according to the dependency relationship of the product components to be assembled, the execution sequence of the product components to be assembled can be determined, and then the product components to be assembled are dynamically assembled according to the determined execution sequence.
The dynamic assembly method for the product components can be operated in an intelligent terminal, including a smart phone, a tablet computer, a desktop computer, a server, and the like, and can also be a separate application program, an applet embedded in other programs, and the like, or can also be in a webpage form, and the specific implementation manner is not limited herein.
The dynamic assembly method for product components is mainly applied to the generation of financial products, wherein the financial products include, but are not limited to, financing products such as loans, securities, funds and the like released by banks, securities companies, internet finance companies and the like, and the corresponding product attributes include product names, interest rates and the like. The method is applicable to the generation of other modular service products besides financial products, and the specific application field is not limited in the method.
In this embodiment, a product component processing method logic code is written in a code source file of a product component, the product component processing method specifies a processing type of a target product attribute in a target product component, and when a product component to be assembled is dynamically assembled, the code source file of the product component to be assembled is analyzed to determine a product attribute processing information set, where each piece of product attribute processing information in the product attribute processing information set includes: source product components, target product attributes and processing types thereof; processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled; according to the dependency relationship of the product parts to be assembled, the dynamic assembly of the product parts to be assembled is realized, the problem that the configurable production operation of the product cannot be really realized due to the actual business logic dependency relationship between the product parts is solved, the product obtained after the dynamic assembly can be directly on-line, the capability requirement on product developers is reduced, and the stability of a product system is improved.
In one embodiment, as shown in fig. 2, the analyzing 120 of the code source file of the product component to be assembled to determine the product property processing information set includes:
at step 210, code related to processing of product properties, such as arr, getattributevalue ('comp', 'PropB 3'), is captured from a code source file of a product component to be assembled using an abstract syntax tree.
In detail, the abstract syntax tree is a tree representation of the syntax structure of the source code, and each node on the tree represents a structure in the source code. The abstract syntax tree does not show every detail that the real syntax presents, for example, nesting brackets are implicit in the structure of the tree and are not presented in the form of nodes. The abstract syntax tree does not depend on the syntax of the source language. The execution process of the step comprises the following steps:
firstly, lexical analysis, also called scanning, is performed on code source files of product parts to be assembled, and the code source files are combined into an identification tokens list (or array) according to a predetermined rule.
And a second step, syntax analysis, also called parser, for converting the lexical analyzed numbers into an abstract syntax tree and, at the same time, verifying syntax errors.
At step 220, a plurality of product attribute processing information is identified from the captured code using a finite automaton.
In detail, finite automata, also known as a sequencer, is an abstract mathematical model of a finite discrete digital system, used to extract four elements from captured code: source product part id (source compad), such as CompA; target part id (targetcompid), e.g., CompB; product Attrid, e.g., PropB 3; type of processing (ProcessType), such as GetOther. The finite automata can be implemented by referring to the prior art, and the detailed description is omitted here.
The extracted four elements constitute one piece of product attribute processing information.
Step 230, obtaining a product attribute processing information set according to the identified multiple pieces of product attribute processing information.
In this step, a product attribute processing information set is obtained by storing a plurality of pieces of product attribute processing information in a data table, specifically, as shown in the above table one.
In the embodiment, the abstract syntax tree and the finite automata are used, so that the product attribute processing information set can be rapidly and accurately acquired.
In an embodiment of this document, as shown in fig. 3, the step 140 implements dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled, including:
step 310, constructing a dependency directed graph according to the dependency relationship of the product components to be assembled, as shown in fig. 5, nodes in the dependency directed graph represent the product components to be assembled, edges of the dependency directed graph represent the dependency relationship executed in sequence, for example, an arrow line pointing to a from B represents that a has a dependency on B.
And step 320, determining the execution sequence of the product components to be assembled according to the dependency directed graph.
In the step, the execution sequence of the product components to be assembled can be determined by using a topological sorting algorithm, the topological sequence obtained by the topological sorting algorithm is not unique, and when a plurality of topological sorts exist, any topological sequence can be taken as the execution sequence of the product components to be assembled.
And 330, dynamically assembling the product components to be assembled according to the execution sequence of the product components to be assembled.
In the step, the product component processing method for binding the product components to be assembled is executed once according to the determined execution sequence of the product components to be assembled, and then a complete product operation flow can be obtained. As shown in fig. 6, for a certain product operation (e.g., an account opening operation), the determined execution sequence of the product components to be assembled is as follows: the method for opening the account of the product to be assembled is carried out only by executing the account opening method for binding the product components to be assembled according to the sequence.
In one embodiment, as shown in fig. 4, in order to ensure that the assembled product components can produce effective results after being assembled, before the step 320 is performed, the method further includes:
and 320', detecting whether a dependency loop exists in the dependency directed graph, if so, sending alarm information to a developer, and if not, executing the step 320 to determine the execution sequence of the product components to be assembled according to the dependency directed graph.
In this step, the dependency ring refers to that the dependency relationship between some products to be assembled is ring-shaped, and includes a direct dependency ring, for example, the product a to be assembled depends on the product B to be assembled, the product B to be assembled depends on the product C to be assembled, the product C to be assembled depends on the product a to be assembled, and also includes an indirect dependency ring. The existence of the dependency loop can prevent the program execution from ending, and a final result cannot be obtained.
The alarm information includes: the ID of the product to be assembled related to the dependency ring, the product attribute ID according to which the dependency ring is formed, and the like, so that developers can safely check the product parts according to the alarm information. The alarm information may be provided to the developer through information such as voice broadcast, screen display, short message distribution, and mail distribution, and the specific implementation is not limited herein.
The embodiment can improve the effectiveness of the product by the judgment depending on the ring.
In an embodiment herein, in order to ensure the speed of determining the execution sequence, in step 320, the execution sequence of the product components to be assembled is determined by using a topological sorting method according to the dependency directed graph.
In this case, a sorting result is selected as an execution sequence of the product components to be assembled.
One of the topology ranking methods can be summarized as:
1) finding out a vertex without predecessor (i.e. without dependency) from the dependency directed graph, in specific implementation, determining the vertex without predecessor in a traversal manner, taking fig. 5 as an example, and determining the vertices to be comp b and comp e.
2) Any vertex and the edge starting from the vertex are deleted.
3) Repeating the steps of the step 1) and the step 2) until the last vertex is output, and if the vertices are not output all the time, indicating that a dependency loop exists. Still taking fig. 5 as an example, the determined execution sequence of the product components to be assembled is: CompB, CompA, ComPC, ComPE, ComPF, ComPD, as shown in FIG. 6. Specifically, the execution sequence of the product components to be assembled determined in fig. 5 may also be: CompB, ComPC, ComPA, ComPE, ComF, ComPD, and also ComPE, CompB, ComPC, ComPA, ComPF, ComPD, etc.
In order to more clearly illustrate the technical solution herein, in the following, taking the automatic generation of financial products as an example, to be described in detail, before the dynamic assembly of product parts is implemented, financial product parts are determined, each financial product part is composed of multiple financial product attributes of the same type, such as interest financial product parts, and each financial product attribute is implemented by program codes, and a financial product part processing method logic code is written in a code source file of a financial product part, that is, a processing type of a target product attribute in a target financial product part is specified, specifically, the financial product part processing method includes: obtaining target product attributes of a source financial product component; modifying a target product attribute of a source financial product component; obtaining target product attributes of financial product components other than the source financial product component; the target product attributes of the financial product components other than the source financial product component are modified.
Specifically, the method for dynamically assembling financial product parts comprises the following steps:
1) and acquiring the financial product components to be assembled according to the demand list configured by the product configuration personnel.
2) Analyzing a code source file of the financial product component to be assembled, and determining a product attribute processing information set.
(1) Capturing codes related to product attribute processing from a code source file of a product component to be assembled by using an abstract syntax tree;
(2) identifying a plurality of pieces of product attribute processing information from the captured code by using a finite automaton, each piece of product attribute processing information including four elements, namely a source financial product component, a target financial product component, a product attribute, and a processing type of the product attribute;
(3) and processing the information according to the identified product attribute to obtain a product attribute processing information set.
3) And processing the information set according to the product attributes to determine the dependency relationship of the financial product components to be assembled.
Specifically, the information Set is processed according to the product attributes, and the dependency relationship of the financial product components to be assembled is matched according to the preset Get/Get, Get/Set and Set/Set dependency relationships.
4) And realizing the dynamic assembly of the financial product components to be assembled according to the dependency relationship of the financial product components to be assembled.
(1) Constructing a dependency directed graph according to the dependency relationship of the financial product components to be assembled;
(2) determining an execution sequence of the financial product components to be assembled according to the dependency directed graph;
(3) and sequentially executing the financial product component processing methods in the financial product components to be assembled according to the execution sequence of the financial product components to be assembled, thereby obtaining the financial product capable of being directly on-line.
The method can enable the products obtained after dynamic assembly to be directly on-line, does not need to compile business logic dependency relationship for each new product manually, reduces the capability requirement on product developers, and improves the system stability of the products. The aim that the financial product system can be quickly online only by configuring new products is really achieved. In addition, hot plug of product components can be realized, increase and decrease of the product components are facilitated, and influence on the existing product components is avoided.
Based on the same inventive concept, a device for dynamically assembling product parts is also provided herein, as described in the following embodiments. Because the principle of the dynamic assembly device for product components to solve the problems is similar to the dynamic assembly method for product components, the implementation of the dynamic assembly device for product components can refer to the dynamic assembly method for product components, and repeated parts are not described again. The dynamic product component assembling apparatus provided in this embodiment includes a plurality of functional modules, which may be implemented by dedicated or general chips, and may also be implemented by software programs, which is not limited herein.
Specifically, a product component processing method logic code is written in a code source file of a product component, the product component processing method specifies a processing type of a target product attribute in a target product component, as shown in fig. 7, the product component dynamic assembly apparatus includes:
the obtaining module 710 is configured to obtain a product component to be assembled according to a requirement list configured by a product configuration staff. The demand list records brief information of product components to be assembled, such as product component names.
An analyzing module 720, configured to analyze the code source file of the product component to be assembled, and determine a product attribute processing information set, where each piece of product attribute processing information in the product attribute processing information set includes: source product components, target product attributes, and process types thereof.
A dependency relationship determining module 730, configured to determine a dependency relationship of the product component to be assembled according to the product attribute processing information set.
And a dynamic assembly module 740, configured to implement dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled.
In this embodiment, a product component processing method logic code is written in a code source file of a product component, the product component processing method specifies a processing type of a target product attribute in a target product component, and when a product component to be assembled is dynamically assembled, the code source file of the product component to be assembled is analyzed to determine a product attribute processing information set, where each piece of product attribute processing information in the product attribute processing information set includes: source product components, target product attributes and processing types thereof; processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled; according to the dependency relationship of the product parts to be assembled, the dynamic assembly of the product parts to be assembled is realized, the problem that the configurable production operation of the product cannot be really realized due to the actual business logic dependency relationship between the product parts is solved, the product obtained after the dynamic assembly can be directly on-line, the capability requirement on product developers is reduced, and the stability of a product system is improved.
In one embodiment, the analyzing module 720 analyzes the code source file of the product component to be assembled and determines a product property processing information set, including: capturing codes related to product attribute processing from a code source file of a product component to be assembled by using an abstract syntax tree; identifying a plurality of pieces of product attribute processing information from the captured code by using a finite automaton; and obtaining a product attribute processing information set according to the identified multiple pieces of product attribute processing information.
In the embodiment, the abstract syntax tree and the finite automata are used, so that the product attribute processing information set can be rapidly and accurately acquired.
In an embodiment of this document, the dependency relationship determining module 730 processes the information set according to the product attribute, and the process of determining the dependency relationship of the product components to be assembled includes: grouping the information in the product attribute processing information set according to the target product attribute; and determining the dependency relationship among the products to be assembled according to the target product components in each group of information and the processing type of the target product attributes.
In an embodiment of this document, the dynamic assembly module 740 implements dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled, including: constructing a dependency directed graph according to the dependency relationship of the product components to be assembled; determining the execution sequence of the product components to be assembled according to the dependency directed graph; and executing the product component processing method bound by the product components to be assembled once according to the determined execution sequence of the product components to be assembled, so as to obtain a complete product operation flow. The embodiment can quickly and accurately determine the dependency relationship of the product components and quickly finish the online of the new product based on the dependency relationship.
In one embodiment herein, as shown in fig. 8, the dynamic assembly apparatus for product components comprises: the obtaining module 710, the analyzing module 720, the dependency determining module 730, and the dynamic assembling module 740 further include: the detection module 750 is connected to the dynamic assembly module 740, and is configured to detect whether a dependency ring exists in the dependency directed graph determined by the dynamic assembly module 740, if so, send alarm information to a developer, and if not, the dynamic assembly module 740 determines an execution sequence of the product components to be assembled according to the dependency directed graph. The embodiment can improve the effectiveness of the product by the judgment depending on the ring.
The dynamic assembly method and the device for the product parts can achieve the following technical effects:
the capacity of a product factory is expanded from static assembly to dynamic assembly of product components, and the aim that a financial product system is quickly online to prepare a new product is really achieved. In addition, hot plugging of product components may also be implemented herein.
In an embodiment herein, as shown in fig. 9, there is also provided a computer device 902, the computer device 902 may include one or more processors 904, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. The computer device 902 may also include any memory 906 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, memory 906 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 902. In one case, when the processor 904 executes the associated instructions, which are stored in any memory or combination of memories, the computer device 902 can perform any of the operations of the associated instructions. The computer device 902 also includes one or more drive mechanisms 908, such as a hard disk drive mechanism, an optical disk drive mechanism, etc., for interacting with any memory.
Computer device 902 may also include an input/output module 910(I/O) for receiving various inputs (via input device 912) and for providing various outputs (via output device 914)). One particular output mechanism may include a presentation device 916 and an associated graphical user interface 918 (GUI). In other embodiments, input/output module 910(I/O), input device 912, and output device 914 may also be excluded, acting as only one computer device in a network. Computer device 902 may also include one or more network interfaces 920 for exchanging data with other devices via one or more communication links 922. One or more communication buses 924 couple the above-described components together.
Communication link 922 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communication link 922 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
In an embodiment of the present disclosure, a computer-readable storage medium is further provided, which stores a computer program, and the computer program is executed by a processor to perform the steps of the above method for dynamically assembling product parts.
In an embodiment herein, there is also provided computer readable instructions, wherein the program, when executed by a processor, causes the processor to perform the steps of the above-described method for dynamic assembly of product parts.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for the general technical personnel in the field, according to the idea of this document, there may be changes in the concrete implementation and the application scope, in summary, this description should not be understood as the limitation of this document.

Claims (10)

1. A method for dynamically assembling product parts, wherein a code source file of a product part has a product part processing method logic code written therein, the product part processing method specifies a processing type for a target product attribute in a target product part, and the method for dynamically assembling product parts comprises:
acquiring a product part to be assembled according to a demand list configured by a product configuration personnel;
analyzing a code source file of the product component to be assembled, and determining a product attribute processing information set, wherein each piece of product attribute processing information in the product attribute processing information set comprises: source product components, target product attributes and processing types thereof;
processing the information set according to the product attributes, and determining the dependency relationship of the product components to be assembled;
and realizing the dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled.
2. The method of claim 1, wherein the product component handling method comprises:
obtaining target product attributes of source product components;
modifying the target product attributes of the source product components;
obtaining target product attributes of other product components except for the source product component;
target product attributes of product parts other than the source product part are modified.
3. The method of claim 1, wherein analyzing code source files of the product parts to be assembled to determine a set of product property handling information comprises:
capturing codes related to product attribute processing from the code source file of the product component to be assembled by using an abstract syntax tree;
identifying a plurality of pieces of product attribute processing information from the captured code by using a finite automaton;
and processing the information according to the identified product attribute to obtain a product attribute processing information set.
4. The method of claim 1, wherein determining the dependency of the product components to be assembled based on the set of product attribute processing information comprises:
and processing the information set according to the product attributes, and matching the dependency relationship of the product components to be assembled according to a preset dependency relationship criterion.
5. The method for dynamically assembling product components according to claim 1, wherein the dynamic assembly of the product components to be assembled is realized according to the dependency relationship of the product components to be assembled, and comprises the following steps:
constructing a dependency directed graph according to the dependency relationship of the product components to be assembled;
determining the execution sequence of the product components to be assembled according to the dependency directed graph;
and dynamically assembling the product components to be assembled according to the execution sequence of the product components to be assembled.
6. The method of claim 5, wherein determining the order of execution of the product components to be assembled is preceded by determining the order of execution of the product components to be assembled from the dependency directed graph further comprises:
and detecting whether a dependence ring exists in the dependence directed graph or not, if so, sending alarm information to developers, and if not, determining the execution sequence of the product components to be assembled according to the dependence directed graph.
7. The method for dynamically assembling product components according to claim 5, wherein determining the execution order of the product components to be assembled according to the dependency directed graph comprises:
and determining the execution sequence of the product components to be assembled by utilizing a topological sorting method according to the dependency directed graph.
8. A product component dynamic assembly apparatus, wherein a code source file of a product component is written with a product component processing method logic code, the product component processing method specifies a processing type of a target product attribute in a target product component, the apparatus comprising:
the acquisition module is used for acquiring a product part to be assembled according to a demand list configured by a product configuration personnel;
an analysis module, configured to analyze the code source file of the product component to be assembled, and determine a product attribute processing information set, where each piece of product attribute processing information in the product attribute processing information set includes: source product components, target product attributes and processing types thereof;
the dependency relationship determining module is used for determining the dependency relationship of the product components to be assembled according to the product attribute processing information set;
and the dynamic assembly module is used for realizing the dynamic assembly of the product components to be assembled according to the dependency relationship of the product components to be assembled.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method for dynamic assembly of product components according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores an executable computer program, which when executed by a processor implements the method for dynamic assembly of product components according to any one of claims 1 to 7.
CN202011551621.0A 2020-12-24 2020-12-24 Method, device, equipment and storage medium for dynamically assembling product parts Active CN112559644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011551621.0A CN112559644B (en) 2020-12-24 2020-12-24 Method, device, equipment and storage medium for dynamically assembling product parts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011551621.0A CN112559644B (en) 2020-12-24 2020-12-24 Method, device, equipment and storage medium for dynamically assembling product parts

Publications (2)

Publication Number Publication Date
CN112559644A true CN112559644A (en) 2021-03-26
CN112559644B CN112559644B (en) 2022-11-15

Family

ID=75033575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011551621.0A Active CN112559644B (en) 2020-12-24 2020-12-24 Method, device, equipment and storage medium for dynamically assembling product parts

Country Status (1)

Country Link
CN (1) CN112559644B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004583A (en) * 2021-10-18 2022-02-01 苏州浪潮智能科技有限公司 Part information processing method, device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056102A1 (en) * 2001-09-20 2003-03-20 International Business Machines Corporation Method and apparatus for protecting ongoing system integrity of a software product using digital signatures
WO2009072818A2 (en) * 2007-12-04 2009-06-11 Tmaxsoft. Co., Ltd. Total product development and management system and product modeling method for the same
US20120054095A1 (en) * 2010-05-21 2012-03-01 Hsbc Technologies Inc. Account opening computer system architecture and process for implementing same
CN104156854A (en) * 2014-07-15 2014-11-19 神州数码融信软件有限公司 Method and system for realizing financial products based on product plant design concept
CN107832059A (en) * 2017-11-21 2018-03-23 广州视源电子科技股份有限公司 Code static analysis method and device based on Makefile
CN110796544A (en) * 2019-10-10 2020-02-14 中国建设银行股份有限公司 Asset management wind control engine configuration method and device
CN111221855A (en) * 2020-01-08 2020-06-02 中国建设银行股份有限公司 Data processing method and device
CN111737258A (en) * 2020-06-16 2020-10-02 北京华脉世纪科技有限公司 Method and device for representing, recording and automatically generating product design scheme

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056102A1 (en) * 2001-09-20 2003-03-20 International Business Machines Corporation Method and apparatus for protecting ongoing system integrity of a software product using digital signatures
WO2009072818A2 (en) * 2007-12-04 2009-06-11 Tmaxsoft. Co., Ltd. Total product development and management system and product modeling method for the same
US20120054095A1 (en) * 2010-05-21 2012-03-01 Hsbc Technologies Inc. Account opening computer system architecture and process for implementing same
CN104156854A (en) * 2014-07-15 2014-11-19 神州数码融信软件有限公司 Method and system for realizing financial products based on product plant design concept
CN107832059A (en) * 2017-11-21 2018-03-23 广州视源电子科技股份有限公司 Code static analysis method and device based on Makefile
CN110796544A (en) * 2019-10-10 2020-02-14 中国建设银行股份有限公司 Asset management wind control engine configuration method and device
CN111221855A (en) * 2020-01-08 2020-06-02 中国建设银行股份有限公司 Data processing method and device
CN111737258A (en) * 2020-06-16 2020-10-02 北京华脉世纪科技有限公司 Method and device for representing, recording and automatically generating product design scheme

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004583A (en) * 2021-10-18 2022-02-01 苏州浪潮智能科技有限公司 Part information processing method, device, computer equipment and storage medium
CN114004583B (en) * 2021-10-18 2024-01-16 苏州浪潮智能科技有限公司 Component information processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112559644B (en) 2022-11-15

Similar Documents

Publication Publication Date Title
EP3588279B1 (en) Automated extraction of rules embedded in software application code using machine learning
US10545856B2 (en) Test case generation system
US9652513B2 (en) Generating data pattern information
US10642913B2 (en) Intent and bot based query guidance
US8799854B2 (en) Reusing software development assets
CN110554958A (en) Graph database testing method, system, device and storage medium
CA3230500A1 (en) Method and system for querying abnormal financial data on basis of knowledge map
CN112612813A (en) Test data generation method and device
CN110209643A (en) A kind of data processing method and device
CN114880240B (en) Automatic test system and method for equipment of Internet of things, storage medium and equipment
CN111752846B (en) Interface testing method and device
CN110727857A (en) Method and device for identifying key features of potential users aiming at business objects
CN109992588A (en) It is a kind of to divide folk prescription method and relevant device based on data processing
CN116090867A (en) Index rule generation method and device, electronic equipment and storage medium
CN114048129A (en) Automatic testing method, device, equipment and system for software function change
CN112559644B (en) Method, device, equipment and storage medium for dynamically assembling product parts
CN107368500A (en) Data pick-up method and system
CN113360416B (en) Test data batch generation method and device
CN114443495A (en) Interface test case generation method, device, equipment and storage medium
CN111784521A (en) Data processing method, device, equipment and system based on cash flow test
CN111754238A (en) Suspicious transaction identification method and device
CN111882294B (en) Method and device for flow approval
CN116643789A (en) Method and device for generating application system portrait, processor and electronic equipment
CN115563943A (en) Report processing method, device, equipment and storage medium
CN118761765A (en) Data processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant