CN114445189A - Method and device for checking product parameters, server and storage medium - Google Patents

Method and device for checking product parameters, server and storage medium Download PDF

Info

Publication number
CN114445189A
CN114445189A CN202210112893.3A CN202210112893A CN114445189A CN 114445189 A CN114445189 A CN 114445189A CN 202210112893 A CN202210112893 A CN 202210112893A CN 114445189 A CN114445189 A CN 114445189A
Authority
CN
China
Prior art keywords
parameter
product
verification
logic
checking
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.)
Pending
Application number
CN202210112893.3A
Other languages
Chinese (zh)
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202210112893.3A priority Critical patent/CN114445189A/en
Publication of CN114445189A publication Critical patent/CN114445189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0621Item configuration or customization
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • G06Q30/0625Directed, with specific intent or strategy
    • G06Q30/0629Directed, with specific intent or strategy for generating comparisons
    • 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
    • G06Q40/06Asset management; Financial planning or analysis

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Operations Research (AREA)
  • Technology Law (AREA)
  • Human Resources & Organizations (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method and a device for checking product parameters, wherein the method comprises the following steps: acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the check logic expression represents the dependency relationship among the product parameters; acquiring parameter checking components respectively matched with the product parameters, and checking the current parameter values of the product parameters through the parameter checking components to acquire parameter checking results; and acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression. According to the technical scheme disclosed by the embodiment of the invention, the matching degree verification of the product is realized, the verification efficiency of the product parameter is improved, the parameter verification component in the embodiment of the invention has better expansibility and flexibility of a verification mode, and meanwhile, the parameter verification component has a multiplexing basis due to the modularized verification mode.

Description

Product parameter checking method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the field of electronic commerce, in particular to a method and a device for checking product parameters, a server and a storage medium.
Background
With the popularization of electronization and informatization, a large number of novel products (including virtual products and entity products) appear in the sight of people, and product parameters describe the attribute information of the products from different dimensions, so that the product parameter verification of the degree of engagement between the products and users becomes the focus of attention of various enterprises.
Taking financial products in the financial field as an example, each financial product is configured with a plurality of product parameters, such as occupation limit of a buyer, account type limit of the buyer and the like, and after relevant information of a user is obtained, the degree of fit between the user and the product can be determined by comparing the user information with the parameter requirements of the product.
However, such a verification method is usually implemented by a hard coding method, when parameter information of a product is changed, a corresponding verification program needs to be rewritten to adapt to the changed parameter, and the verification method lacks necessary extensibility and flexibility, and meanwhile, due to differences of product parameters between products, even if the product is another product in a similar field, the verification program cannot be reused, and a large amount of labor cost and time cost are required to be re-developed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for verifying product parameters, a server and a storage medium, which are used for realizing the logical verification of the product parameters.
In a first aspect, an embodiment of the present invention provides a method for checking a product parameter, including:
acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters;
acquiring parameter checking components respectively matched with the product parameters, and checking the current parameter values of the product parameters through the parameter checking components to acquire parameter checking results;
and acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
In a second aspect, an embodiment of the present invention provides an apparatus for verifying a product parameter, including:
the product parameter list acquisition module is used for acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters;
a parameter verification result acquisition module, configured to acquire parameter verification components respectively matched with the product parameters, and verify the current parameter values of the product parameters through the parameter verification components to acquire parameter verification results;
and the logic verification result acquisition module is used for acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for verifying the product parameter according to any embodiment of the present invention.
In a fourth aspect, the embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor implement the method for verifying the product parameter according to any embodiment of the present invention.
According to the technical scheme disclosed by the embodiment of the invention, the current parameter value of each product parameter is verified through the parameter verification component according to the product parameter list of the current product so as to obtain the parameter verification result, and the logic verification result of the current product under the current parameter value is obtained according to the parameter verification result of each product parameter and the verification logic expression, so that the matching degree verification of the product is realized, the verification efficiency of the product parameter is improved, the parameter verification component in the embodiment of the invention has better expansibility and the flexibility of a verification mode, and meanwhile, the parameter verification component has a multiplexing basis and can be transplanted to the development of products of the same type by a componentized verification mode.
Drawings
Fig. 1 is a flowchart of a method for verifying a product parameter according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for verifying a product parameter according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for verifying a product parameter according to a third embodiment of the present invention;
fig. 4 is a block diagram of a product parameter verifying apparatus according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a server according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for verifying product parameters according to an embodiment of the present invention, where the embodiment is applicable to obtain a logic verification result of a current product according to a parameter verification result of each product parameter and a verification logic expression, and the method may be executed by a device for verifying product parameters in the embodiment of the present invention, where the device may be implemented by software and/or hardware and is integrated in a server, and may typically be integrated in a business server of a bank, and is used to verify a user purchase right of each financial product or recommend a matched financial product to a user, where the method specifically includes the following steps:
s110, acquiring a product parameter list and a verification logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the check logic expression represents check dependency relationship among the product parameters.
The current product can be a financial virtual product, such as a financial product, or a physical commodity; all product parameters of the product are described in the product parameter list; the product parameters are basic elements for configuring the product and describe attribute information of the product, each product corresponds to a plurality of product parameters, different product parameters describe the application range of one product from different dimensions, and the product parameters can be used for describing the saleable product after instantiation; for example, a financial product based on regular interest rate floating is provided, the interest rate floating is set, audiences are screened according to client types, distribution channels and account types, and volume price balance is realized by setting limit, and the elements such as the interest rate, the client types, the distribution channels and the account types are product parameters of the product; in the embodiment of the present invention, optionally, the type of the product and the type of the product parameter are not specifically limited.
The checking logic expression reflects the dependency relationship among the product parameters during checking, for example, each product parameter of a product needs to be checked to pass, the product is only checked to pass, and the dependency relationship among the parameters is AND, which is represented by "&" in the checking logic expression; if any product parameter passes the verification, the product passes the verification, the dependency relationship among the parameters is 'OR', and the 'I' is expressed in the verification logic expression; taking the above technical solution as an example, the product parameters of a financial product include a distribution channel parameter a, a customer group restriction parameter B and an account type parameter C, and if the product parameters pass verification at the same time, it can be determined that the product passes verification, and then the dependency relationship among the product parameters is a, B and C, which are stored in the database in a form of a & B & C.
S120, acquiring parameter verification components respectively matched with the product parameters, and verifying the current parameter values of the product parameters through the parameter verification components to acquire parameter verification results.
The parameter checking component is a pre-written code file and is used for checking the current parameter value of a product parameter to determine whether the current parameter value of the product parameter meets the preset standard product parameter; for example, the distribution channel parameter a specifically includes internet banking distribution and APP (Application program) distribution, and when the current distribution channel is verified, if the current distribution channel is internet banking distribution or APP distribution, it indicates that the distribution channel parameter a is successfully verified, and the parameter verification result is set to 1; if the current distribution channel is not distributed by the internet bank or APP (for example, distributed by a physical counter), the verification of the distribution channel parameter A is failed, and the parameter verification result is set to 0.
Optionally, in this embodiment of the present invention, the product parameter list further includes class names respectively matched with the product parameters; the obtaining of the parameter verification component respectively matched with the product parameters comprises: and acquiring a verification class based on a reflection mechanism according to the class name respectively matched with each product parameter, and calling a matched parameter verification component according to the verification class. The reflection mechanism under Java language is a mechanism for indirectly operating a target object, and because a Java Virtual Machine (JVM) has the characteristic of dynamically loading classes, all attributes and methods of the class can be obtained for any class, the target object does not need to be obtained in advance before compiling, namely, the class is dynamically created and the attributes of the class are called in a running period; the product parameter list records not only each product parameter under the product, but also the class name corresponding to each product parameter, so that the class method used in verification can be directly obtained based on the reflection mechanism under Java language, and the corresponding parameter verification component is called according to the class method, thereby avoiding the predefinition of the class method and providing the obtaining efficiency of the parameter verification component.
Optionally, in the embodiment of the present invention, after the current parameter value of the product parameter is verified by the parameter verification component to obtain a parameter verification result, the method further includes: and storing the parameter verification result of each product parameter through Hash mapping. HashMap is realized based on a Map interface of a HashTable (HashTable), a parameter check result of each product parameter is stored through a Key Value pair (namely Key-Value), a Key name (namely Key) is a product parameter, and a Key Value (namely Value) is a corresponding parameter check result.
S130, acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
After the parameter verification result of each product parameter is obtained, the parameter verification result is substituted into the verification logic expression, and the logic verification result of the evaluated verification logic expression can be obtained.
Optionally, in this embodiment of the present invention, the obtaining, according to the parameter verification result of each product parameter and the verification logic expression, the logic verification result of the current product under the current parameter value includes: and acquiring a logic verification result of the current product under the current parameter value through an MVEL rule engine according to the parameter verification result of each product parameter and the verification logic expression. The MVEL is an expression language based on a Java application program, has the characteristic of high analysis speed, firstly converts a check logic expression into a readable expression, and then compiles an execution expression according to an obtained parameter check result to further obtain an expression result; if the returned result of the expression is true, the product parameter with the dependency relationship is verified to be passed, and if the returned result is false, the product parameter with the dependency relationship is verified to be failed; through the MVEL rule engine, the obtaining efficiency of the logic verification result of the current product under the current parameter value is improved.
Optionally, in an embodiment of the present invention, the method for verifying the product parameter further includes: and in response to the acquisition of the product parameter newly-increased instruction of the current product, adding the newly-increased product parameters into the product parameter list, and acquiring a matched newly-increased parameter verification component and an updated verification logic expression. When the product parameters of the product are changed, the new product parameters are added into the product parameter list, the application range of the product can be adjusted, the parameter value verification of the product parameters completed through the parameter verification component has better expansion performance compared with a hard-coded verification mode, the new product parameters can be verified by obtaining the new parameter verification component, and then the update of the product logic verification can be completed according to the obtained updated verification logic expression.
According to the technical scheme disclosed by the embodiment of the invention, the current parameter value of each product parameter is verified through the parameter verification component according to the product parameter list of the current product so as to obtain the parameter verification result, and the logic verification result of the current product under the current parameter value is obtained according to the parameter verification result of each product parameter and the verification logic expression, so that the matching degree verification of the product is realized, the verification efficiency of the product parameter is improved, the parameter verification component in the embodiment of the invention has better expansibility and the flexibility of a verification mode, and meanwhile, the parameter verification component has a multiplexing basis and can be transplanted to the development of products of the same type by a componentized verification mode.
Example two
Fig. 2 is a flowchart of a method for checking product parameters according to a second embodiment of the present invention, which is embodied on the basis of the foregoing technical solution, and in the embodiment of the present invention, items to be checked are sorted in an increasing order according to the number of product parameters included in the items to be checked, specifically, the method includes the following steps:
s210, obtaining a product parameter list and a verification logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the check logic expression represents check dependency relationship among the product parameters.
S220, acquiring a parameter verification component matched with each product parameter respectively, and verifying the current parameter value of the product parameter through the parameter verification component to acquire a parameter verification result.
S230, obtaining an outer layer logic relationship of the check logic expression, and splitting the check logic expression according to the outer layer logic relationship to obtain a plurality of items to be checked.
The check logic expression may include a single level of logical relationship, e.g., a & B & C, where the dependency between A, B, C is an and; a | | B | | C, wherein the dependency between A, B, C is or; it is also possible to include a multi-level nested logical relationship, e.g., (A & B) | C, where an AND relationship exists between A and B and an OR relationship exists between (A & B) and C; a & (B | | C), wherein B and C are in an OR relationship, and A and (B | | C) are in an AND relationship; taking the above technical solution as an example, the outer layer logical relationship of a & B & C is an and, the outer layer logical relationship of a | | | B | | | C is an or, (a & B) | | C is an or, and the outer layer logical relationship of a & (B | | | C) is an and. Meanwhile, according to the outer layer logic relationship, the check logic expression is split to obtain a plurality of items to be checked, and after the A & B & C are split, the items to be checked A, B, C are obtained; obtaining an item to be checked A, B, C after A | | B | | C is split; after the (A & B) | C is split, obtaining items (A & B) and C to be checked; and after the A and the (B | C) are split, acquiring the items A and the (B | C) to be checked.
S240, according to the number of product parameters contained in each item to be checked, the items to be checked are subjected to increasing sequencing.
Each item to be verified comprises one or more product parameters, the items are sequentially arranged in an increasing order from least to most according to the number of the contained product parameters, and the items are sequentially arranged according to the appearance order in the verification logic expression when the numbers are the same; for example, the ordering of each item to be checked in a & B & C and a | | B | | C is A, B, C; the sequence of each item to be checked in the (A & B) | C is (A & B) and C; the sequence of each item to be checked in A & (B | | C) is A, (B | | C).
S250, sequentially verifying each item to be verified according to the parameter verification result of each product parameter; if the outer layer logic relationship of the check logic expression is yes, judging whether an item to be checked with a check result of 1 exists; and if the outer layer logic relationship of the check logic expression is AND, judging whether the item to be checked with the check result of 0 exists.
When the outer layer logic relationship of the check logic expression is yes, the check result of any item to be checked is 1, and the logic check result of the check logic expression is 1, so that the items to be checked with the least product parameters are sequentially checked, the logic check result of the check logic expression can be determined to be 1 as long as the items to be checked with the check result of 1 are obtained, the subsequent items to be checked do not need to be judged, and if the items to be checked with the check result of 1 are not obtained, the logic check result is obviously 0; when the outer layer logic relationship of the check logic expression is AND, the check result of any item to be checked is 0, and the logic check result of the check logic expression is 0, so that the items to be checked with the least product parameters are sequentially checked, the logic check result of the check logic expression can be determined to be 0 as long as the items to be checked with the check result of 0 are obtained, the subsequent items to be checked do not need to be judged, and if the items to be checked with the check result of 0 are not obtained, the logic check result is obviously 1; therefore, the verification efficiency of the verification logic expression is further improved; particularly, for an item to be verified containing a plurality of product parameters, in the same manner as above, according to the outer layer logical relationship of the item to be verified, the item is continuously split, and if the outer layer logical relationship of the item to be verified is yes, whether a sub item to be verified with a verification result of 1 exists is also judged; if the outer layer logic relationship of the item to be checked is OR, judging whether the sub item to be checked with the checking result of 0 exists or not until the checking of the item to be checked is finished.
According to the technical scheme disclosed by the embodiment of the invention, after the outer layer logic relationship of the check logic expression is obtained, the check logic expression is split according to the outer layer logic relationship, a plurality of items to be checked are obtained, the items to be checked are subjected to incremental sequencing according to the number of product parameters contained in each item to be checked, and finally, each item to be checked is checked in sequence according to the parameter check result of each product parameter, so that the check efficiency of the check logic expression is further improved.
EXAMPLE III
Fig. 3 is a flowchart of a method for verifying a product parameter according to a third embodiment of the present invention, which is embodied on the basis of the foregoing technical solution, and in the embodiment of the present invention, each item to be verified is sequentially verified according to the number of items to be verified that include a first target product parameter or a second target product parameter, specifically, the method includes the following steps:
s310, acquiring a product parameter list and a verification logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the check logic expression represents check dependency relationship among the product parameters.
S320, obtaining parameter verification components respectively matched with the product parameters, and verifying the current parameter values of the product parameters through the parameter verification components to obtain parameter verification results.
S330, obtaining an outer layer logic relationship of the check logic expression, and splitting the check logic expression according to the outer layer logic relationship to obtain a plurality of items to be checked.
S340, if the outer layer logic relationship of the verification logic expression is OR, acquiring a first target product parameter with a parameter verification result of 1 in each product parameter, and sequentially verifying each item to be verified according to the quantity ratio of the first target product parameter in each item to be verified.
If the outer layer logic relationship of the check logic expression is OR, the check result of any item to be checked is 1, and the logic check result of the check logic expression is 1; the more the number of the first target product parameters in the items to be verified is, the greater the probability that the verification result of the items to be verified is 1 is, so that the items to be verified are sequentially verified according to the sequence of the number of the first target product parameters in the items to be verified from more to less, the logic verification result of the verification logic expression can be determined to be 1 as long as the items to be verified with the verification result of 1 are obtained, and the subsequent items to be verified do not need to be judged again, so that the verification efficiency of the verification logic expression is improved.
And S350, if the outer layer logic relationship of the verification logic expression is AND, acquiring a second target product parameter with a parameter verification result of 0 in each product parameter, and sequentially verifying each item to be verified according to the quantity ratio of the second target product parameter in each item to be verified.
If the outer layer logic relationship of the check logic expression is AND and the check result of any item to be checked is 0, the logic check result of the check logic expression is 0; the more the number of the second target product parameters in the items to be verified is, the greater the probability that the verification result of the items to be verified is 0 is, so that the items to be verified are sequentially verified according to the sequence of the number of the second target product parameters in the items to be verified from more to less, the logic verification result of the verification logic expression can be determined to be 0 as long as the items to be verified with the verification result of 0 are obtained, and the subsequent items to be verified do not need to be judged again, so that the verification efficiency of the verification logic expression is improved.
According to the technical scheme disclosed by the embodiment of the invention, if the outer layer logic relationship of the verification logic expression is OR, the first target product parameter with the parameter verification result of 1 in each product parameter is obtained, and if the outer layer logic relationship of the verification logic expression is AND, the second target product parameter with the parameter verification result of 0 in each product parameter is obtained, so that each item to be verified is verified in sequence according to the number proportion of the first target product parameter or the number proportion of the second target product parameter in each item to be verified, and the verification efficiency of the verification logic expression is further improved.
Example four
Fig. 4 is a block diagram of a structure of a product parameter verification apparatus according to a fourth embodiment of the present invention, where the apparatus specifically includes: a product parameter list obtaining module 410, a parameter verification result obtaining module 420 and a logic verification result obtaining module 430;
a product parameter list obtaining module 410, configured to obtain a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters;
a parameter verification result obtaining module 420, configured to obtain parameter verification components respectively matched with the product parameters, and verify the current parameter values of the product parameters through the parameter verification components to obtain parameter verification results;
a logic check result obtaining module 430, configured to obtain a logic check result of the current product under the current parameter value according to the parameter check result of each product parameter and the check logic expression.
According to the technical scheme disclosed by the embodiment of the invention, the current parameter value of each product parameter is verified through the parameter verification component according to the product parameter list of the current product so as to obtain the parameter verification result, and the logic verification result of the current product under the current parameter value is obtained according to the parameter verification result of each product parameter and the verification logic expression, so that the matching degree verification of the product is realized, the verification efficiency of the product parameter is improved, the parameter verification component in the embodiment of the invention has better expansibility and the flexibility of a verification mode, and meanwhile, the parameter verification component has a multiplexing basis and can be transplanted to the development of products of the same type by a componentized verification mode.
Optionally, on the basis of the above technical solution, the product parameter list further includes class names respectively matched with the product parameters;
the parameter verification result obtaining module 420 is specifically configured to obtain a verification class based on a reflection mechanism according to the class name respectively matched with each product parameter, and call a matched parameter verification component according to the verification class.
Optionally, on the basis of the above technical solution, the device for checking product parameters further includes:
and the parameter verification result execution module is used for storing the parameter verification result of each product parameter through Hash mapping.
Optionally, on the basis of the foregoing technical solution, the logic verification result obtaining module 430 is specifically configured to obtain, according to the parameter verification result of each product parameter and the verification logic expression, the logic verification result of the current product under the current parameter value through an MVEL rule engine.
Optionally, on the basis of the above technical solution, the device for checking product parameters further includes:
and the product parameter newly-increased instruction acquisition module is used for responding to the product parameter newly-increased instruction of the current product, adding the newly-increased product parameters into the product parameter list, and acquiring the matched newly-increased parameter verification component and the updated verification logic expression.
Optionally, on the basis of the above technical solution, the logic verification result obtaining module 430 specifically includes:
the to-be-verified item acquisition unit is used for acquiring the outer layer logical relationship of the verification logical expression and splitting the verification logical expression according to the outer layer logical relationship so as to acquire a plurality of to-be-verified items;
the sorting execution unit is used for carrying out increasing sorting on the items to be checked according to the quantity of the product parameters contained in the items to be checked;
the verification execution unit is used for sequentially verifying the items to be verified according to the parameter verification result of each product parameter; if the outer layer logic relationship of the check logic expression is yes, judging whether an item to be checked with a check result of 1 exists; and if the outer layer logic relationship of the check logic expression is AND, judging whether the item to be checked with the check result of 0 exists.
Optionally, on the basis of the above technical solution, the logic verification result obtaining module 430 specifically further includes:
a first target product parameter obtaining module, configured to, if an outer layer logic relationship of the verification logic expression is "or", obtain a first target product parameter whose parameter verification result is 1 in each product parameter, and sequentially verify each item to be verified according to a quantity ratio of the first target product parameter in each item to be verified;
and the second target product parameter obtaining module is used for obtaining a second target product parameter with a parameter verification result of 0 in each product parameter if the outer layer logic relationship of the verification logic expression is AND, and sequentially verifying each item to be verified according to the quantity ratio of the second target product parameters in each item to be verified.
The device can execute the product parameter verification method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to a method for verifying product parameters provided in any embodiment of the present invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a server according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary server 12 suitable for use in implementing embodiments of the present invention. The server 12 shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the server 12 is in the form of a general purpose computer device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples various system components including the memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by server 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The server 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The server 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the server 12, and/or with any devices (e.g., network card, modem, etc.) that enable the server 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the server 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the server 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the server 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the memory 28, for example, to implement the method for verifying the product parameters provided by the embodiment of the present invention. Namely: acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters; acquiring parameter checking components respectively matched with the product parameters, and checking the current parameter values of the product parameters through the parameter checking components to acquire parameter checking results; and acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
Example six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for verifying the product parameter according to any embodiment of the present invention; the method comprises the following steps:
acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters;
acquiring parameter checking components respectively matched with the product parameters, and checking the current parameter values of the product parameters through the parameter checking components to acquire parameter checking results;
and acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for verifying a product parameter, comprising:
acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters;
acquiring parameter checking components respectively matched with the product parameters, and checking the current parameter values of the product parameters through the parameter checking components to acquire parameter checking results;
and acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
2. The method of claim 1, wherein the product parameter list further comprises class names that match each of the product parameters;
the obtaining of the parameter verification component respectively matched with the product parameters comprises:
and acquiring a verification class based on a reflection mechanism according to the class name respectively matched with each product parameter, and calling a matched parameter verification component according to the verification class.
3. The method of claim 1, wherein after the checking the current parameter value of the product parameter by the parameter checking component to obtain a parameter checking result, further comprising:
and storing the parameter verification result of each product parameter through Hash mapping.
4. The method according to claim 1 or 3, wherein the obtaining a logic check result of the current product under the current parameter value according to the parameter check result of each product parameter and the check logic expression comprises:
and acquiring a logic verification result of the current product under the current parameter value through an MVEL rule engine according to the parameter verification result of each product parameter and the verification logic expression.
5. The method of claim 1, wherein the method of verifying the product parameter further comprises:
and in response to the acquisition of the product parameter newly-increased instruction of the current product, adding the newly-increased product parameters into the product parameter list, and acquiring a matched newly-increased parameter verification component and an updated verification logic expression.
6. The method of claim 1, wherein the obtaining a logic check result of the current product under the current parameter value according to the parameter check result of each product parameter and the check logic expression comprises:
acquiring an outer layer logic relationship of the check logic expression, and splitting the check logic expression according to the outer layer logic relationship to acquire a plurality of items to be checked;
according to the number of product parameters contained in each item to be checked, carrying out increasing sequencing on each item to be checked;
according to the parameter checking result of each product parameter, checking each item to be checked in sequence; if the outer layer logic relationship of the check logic expression is yes, judging whether an item to be checked with a check result of 1 exists; if the outer layer logic relationship of the check logic expression is AND, judging whether to store the item to be checked with the check result of 0.
7. The method according to claim 6, wherein after obtaining an outer layer logical relationship of the check logical expression and splitting the check logical expression according to the outer layer logical relationship to obtain a plurality of items to be checked, the method includes:
if the outer layer logic relationship of the checking logic expression is yes, acquiring a first target product parameter with a parameter checking result of 1 in each product parameter, and checking each item to be checked in sequence according to the quantity ratio of the first target product parameter in each item to be checked;
and if the outer layer logic relationship of the verification logic expression is yes, acquiring a second target product parameter with a parameter verification result of 0 in each product parameter, and sequentially verifying each item to be verified according to the quantity ratio of the second target product parameter in each item to be verified.
8. A device for verifying product parameters, comprising:
the product parameter list acquisition module is used for acquiring a product parameter list and a check logic expression of a current product; the product parameter list comprises a plurality of product parameters, and the checking logic expression represents checking dependency relationship among the product parameters;
a parameter verification result acquisition module, configured to acquire parameter verification components respectively matched with the product parameters, and verify the current parameter values of the product parameters through the parameter verification components to acquire parameter verification results;
and the logic verification result acquisition module is used for acquiring a logic verification result of the current product under the current parameter value according to the parameter verification result of each product parameter and the verification logic expression.
9. A server, characterized in that the server comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of verifying product parameters as claimed in any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the method of verifying a product parameter of any of claims 1-7 when executed by a computer processor.
CN202210112893.3A 2022-01-29 2022-01-29 Method and device for checking product parameters, server and storage medium Pending CN114445189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210112893.3A CN114445189A (en) 2022-01-29 2022-01-29 Method and device for checking product parameters, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210112893.3A CN114445189A (en) 2022-01-29 2022-01-29 Method and device for checking product parameters, server and storage medium

Publications (1)

Publication Number Publication Date
CN114445189A true CN114445189A (en) 2022-05-06

Family

ID=81372496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210112893.3A Pending CN114445189A (en) 2022-01-29 2022-01-29 Method and device for checking product parameters, server and storage medium

Country Status (1)

Country Link
CN (1) CN114445189A (en)

Similar Documents

Publication Publication Date Title
US10540383B2 (en) Automatic ontology generation
US20190272261A1 (en) Performing logical validation on loaded data in a database
CN110750654A (en) Knowledge graph acquisition method, device, equipment and medium
CN111427971B (en) Business modeling method, device, system and medium for computer system
CN109783346B (en) Keyword-driven automatic testing method and device and terminal equipment
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN115964646A (en) Heterogeneous graph generation for application microservices
CN111241180A (en) Information processing method, device, equipment and storage medium
CN111861757A (en) Financing matching method, system, equipment and storage medium
WO2023098462A1 (en) Improving performance of sql execution sequence in production database instance
CN111639903A (en) Review processing method for architecture change and related equipment
CN111681050A (en) Advertisement pushing method, device, equipment and storage medium
CN114445189A (en) Method and device for checking product parameters, server and storage medium
US11481212B2 (en) Automatic identification of reference data
CN114217790A (en) Interface scheduling method and device, electronic equipment and medium
CN111447268B (en) File structure conversion method, device, equipment and storage medium
CN112115316B (en) Box separation method and device, electronic equipment and storage medium
CN111857883A (en) Page data checking method and device, electronic equipment and storage medium
CN111382178A (en) Network task allocation method, system, equipment and storage medium
CN113515332B (en) Data generation method, device, equipment and storage medium
CN110134691B (en) Data verification method, device, equipment and medium
US11630849B2 (en) Optimizing insight generation in heterogeneous datasets
US11748304B1 (en) Insert performance improvement
US20230010147A1 (en) Automated determination of accurate data schema
US20230222107A1 (en) Database record bit

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Jiao Mengying

Inventor before: Jiao Meng