CN114997111B - Service processing method, device, computer equipment and storage medium - Google Patents

Service processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN114997111B
CN114997111B CN202210942338.3A CN202210942338A CN114997111B CN 114997111 B CN114997111 B CN 114997111B CN 202210942338 A CN202210942338 A CN 202210942338A CN 114997111 B CN114997111 B CN 114997111B
Authority
CN
China
Prior art keywords
parameter
service request
parameters
service
object model
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.)
Active
Application number
CN202210942338.3A
Other languages
Chinese (zh)
Other versions
CN114997111A (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.)
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Original Assignee
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
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 Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch filed Critical Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Priority to CN202210942338.3A priority Critical patent/CN114997111B/en
Publication of CN114997111A publication Critical patent/CN114997111A/en
Application granted granted Critical
Publication of CN114997111B publication Critical patent/CN114997111B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The application relates to a service processing method, a service processing device, computer equipment and a storage medium. The method comprises the following steps: sending a service request to a management platform; the service request comprises a request corresponding to at least one preset service type; performing data conversion on parameters in the service request through a browser object model to generate converted parameters; and acquiring a service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule. By adopting the method, the quick butt joint of the service system and the management platform can be realized, and the resource waste caused by frequently developing a new version of the service system is avoided.

Description

Service processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a service processing method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, a front-end service system can complete a service processing process by calling a service processing rule in a management platform in a background. Different service systems have different parameters, and when the parameters of the service system change or a new service system needs to call the management platform, a new version needs to be developed for the service system based on the new parameters, so that the service system and the management platform can be connected.
However, as the parameters of the business system change frequently or new business systems interfacing with the management platform increase, new versions need to be developed for the business systems to implement interfacing with the management platform. However, the frequent development of new versions of business systems inevitably results in waste of resources.
Disclosure of Invention
Therefore, it is necessary to provide a service processing method, an apparatus, a computer device, a computer readable storage medium, and a computer program product, which can implement quick docking between a service system and a management platform and avoid resource waste caused by frequently developing a new version of the service system, for solving the above technical problems.
In a first aspect, the present application provides a service processing method. The method comprises the following steps:
sending a service request to a management platform; the service request comprises a request corresponding to at least one preset service type; performing data conversion on the parameters in the service request through a browser object model to generate converted parameters; and acquiring a service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule.
In one embodiment, the data conversion of the parameters in the service request by the browser object model to generate the converted parameters includes:
acquiring a data transmission object model corresponding to a preset service type based on the service request; and performing data conversion on the parameters in the data transmission object model through the browser object model to generate converted parameters.
In one embodiment, the data conversion of the parameters in the service request by the browser object model to generate the converted parameters includes:
searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter according to the service request; the database stores the corresponding relation between the parameters in the service request and the target parameters in advance.
In one embodiment, the parameter in the service request includes a parameter name; according to the service request, searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter, wherein the target parameter comprises:
acquiring a first parameter mapping configuration table from a database according to the service request; the first parameter mapping configuration table pre-stores the corresponding relation between the parameter name of the parameter in the service request and the parameter name of the target parameter; and searching the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
In one embodiment, the parameters in the service request include a parameter structure; according to the service request, searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter, wherein the method comprises the following steps:
acquiring a second parameter mapping configuration table from a database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relation between the parameter structure of the parameter in the service request and the parameter structure of the target parameter; and searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
In one embodiment, according to the service request, searching a target parameter corresponding to a parameter in the service request from a database as a converted parameter, including:
judging the assignment type of the parameters in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type; and according to the service request, searching a target parameter corresponding to the parameter in the service request in the database according to the assignment type of the parameter, and taking the target parameter as the converted parameter.
In one embodiment, the data conversion of the parameters in the service request is performed through the browser object model to generate the converted parameters, and the method further includes:
judging whether the version of the browser object model is the latest version; if not, updating the version of the browser object model to generate an updated browser object model; and performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters.
In a second aspect, the present application further provides a service processing apparatus. The device comprises:
the sending module is used for sending a service request to the management platform; the service request comprises a request corresponding to at least one preset service type;
the conversion module is used for performing data conversion on the parameters in the service request through the browser object model to generate converted parameters;
and the acquisition module is used for acquiring the service rule corresponding to the service request from the management platform based on the converted parameters and executing the service based on the service rule.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the method steps in any of the embodiments of the first aspect when the computer program is executed.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the method steps of any of the embodiments of the first aspect described above.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program that when executed by a processor performs the method steps of any of the embodiments of the first aspect described above.
The service processing method, the service processing device, the computer equipment and the storage medium send the service request to the management platform, perform data conversion on the parameters in the service request through the browser object model to generate the converted parameters, acquire the service rule corresponding to the service request from the management platform based on the converted parameters, and execute the service based on the service rule. In the technical solution provided in the embodiment of the present application, since data conversion can be performed on parameters in a service request sent by a service system, the service system can be docked with a management platform based on the parameters after data conversion. Therefore, when the parameters of the service system change or new service systems to be connected continuously increase, the service system can be connected with the management platform without developing new versions aiming at the service system, so that the resource waste caused by frequently developing the service system with the new versions is avoided, and the quick configuration of the parameters of the service system can be realized by providing a flexible and dynamic parameter connection scheme.
Drawings
FIG. 1 is a diagram illustrating an internal structure of a computer device according to an embodiment;
FIG. 2 is a flow diagram of a method for service processing in one embodiment;
FIG. 3 is a block diagram of an overall framework of a business process in one embodiment;
FIG. 4 is a schematic flow chart illustrating the generation of transformed parameters in one embodiment;
FIG. 5 is a flow diagram that illustrates a lookup in a database, according to one embodiment;
FIG. 6 is a flow diagram that illustrates the conversion of parameter names in one embodiment;
FIG. 7 is a schematic diagram of a process for converting a parameter structure according to one embodiment;
FIG. 8 is a diagram illustrating relationships between parameter names in one embodiment;
FIG. 9 is a schematic diagram illustrating a process for updating a version of a browser object model in one embodiment;
FIG. 10 is a diagram illustrating an exemplary calling BOM model architecture;
FIG. 11 is a diagram of a call relationship architecture for different systems in one embodiment;
fig. 12 is a block diagram showing a configuration of a service processing apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The service processing method provided by the application can be applied to computer equipment, the computer equipment can be a server or a terminal, wherein the server can be one server or a server cluster consisting of a plurality of servers.
Taking a computer device as an example of a terminal, fig. 1 shows a block diagram of a terminal, which, as shown in fig. 1, includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a business process method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the terminal to which the present application is applied, and that the terminal may alternatively include more or fewer components than shown, or combine certain components, or have a different arrangement of components.
It should be noted that the execution subject of the embodiment of the present application may be a computer device, or may be a service processing apparatus, and the following method embodiment is described with reference to a computer device as an execution subject.
In an embodiment, as shown in fig. 2, a flowchart of a service processing method provided in an embodiment of the present application is shown, where the method may include the following steps:
step 220, sending a service request to a management platform; the service request includes a request corresponding to at least one preset service type.
The management platform is a background application, and the management platform can be different types of rule engines or business systems. The service association system at the front end can call the service processing rule in the management platform at the background by sending the corresponding service request, thereby completing the process of service processing. The preset service types are service types corresponding to different service association systems of the front end, the service association systems of the front end can be a single-out system, a vehicle/non-vehicle quotation system, a mobile client APP, a claim settlement investigation system, an underwriting system and the like, and the management platform can be a single rule engine, a quotation rule engine, a wind control rule engine, an underwriting rule engine, other service systems and the like. The rule engine is a basic common rule engine component, can provide common rule application service, and can provide docking service support for a front-end business association system, so that rule sharing is realized.
And 240, performing data conversion on the parameters in the service request through the browser object model to generate converted parameters.
The browser object model is also called a BOM model, the BOM model is a built-in object management model of the browser, data conversion can be performed on parameters in the service request based on the BOM model, converted parameters are generated, and the converted parameters can be in butt joint with a management platform. The parameters in the service request may include service parameters and interface parameters, the service parameters are model parameters corresponding to a specific service, for example, a policy object model, and performing data conversion on the parameters may include performing data conversion on parameter names, parameter structures, or other parameter-related data, which is not specifically limited in this embodiment. In the process of data conversion of the parameters in the service request, the dynamic parameter mapping configuration table can be loaded from the database when the data conversion is started for the first time, so as to realize the initialization of the parameters, and after the initialization, the dynamic parameter mapping configuration table can be reloaded and updated from the database every preset time, so that the latest parameter mapping relationship can be obtained after the parameters are changed.
And step 260, acquiring the service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule.
After the parameters are subjected to data conversion, the front-end service association system can be in butt joint with the management platform, so that the service rule corresponding to the service request can be acquired from the management platform based on the converted parameters, and the service is executed based on the service rule. For example, after data conversion is performed on parameters in a service request of an order issuing system, a corresponding order issuing rule may be obtained from an order issuing rule engine, so that the order issuing rule may be executed and an order may be issued, and an overall framework of a service processing process is shown in fig. 3.
In this embodiment, a service request is sent to the management platform, data conversion is performed on parameters in the service request through the browser object model, converted parameters are generated, a service rule corresponding to the service request is acquired from the management platform based on the converted parameters, and a service is executed based on the service rule. Because data conversion can be carried out on the parameters in the service request sent by the service system, the service system can be in butt joint with the management platform based on the parameters after the data conversion. Therefore, when the parameters of the service system change or the number of the butted new service systems increases continuously, the service system can be butted with the management platform without developing a new version aiming at the service system, so that the resource waste caused by frequently developing the service system with the new version is avoided, and the rapid configuration of the parameters of the service system can be realized by providing a flexible and dynamic parameter butting scheme. In addition, because the reconfiguration of the parameters is realized without modifying the bottom layer codes, the operation of restarting hot loading is not needed, and the parameters are converted, so that the rapid butt joint among different services can be realized.
In an embodiment, as shown in fig. 4, which shows a flowchart of a service processing method provided in an embodiment of the present application, specifically, related to a possible process of generating converted parameters, the method may include the following steps:
and step 420, acquiring a data transmission object model corresponding to the preset service type based on the service request.
Step 440, converting the data of the parameters in the data transmission object model through the browser object model to generate converted parameters.
The data transmission object model is also called a DTO model, and is an expression form of parameters in the service request, and the DTO model can be obtained by converting according to an incoming parameter JSON of the service association system. The parameter names, the parameter structures and the like of the parameters in the data transmission object model can be subjected to data conversion through the browser object model, so that the converted parameters are generated. Optionally, performing data conversion on the parameter in the service request through a browser object model, and generating a converted parameter, including: according to the service request, searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter; the database stores the corresponding relation between the parameters in the service request and the target parameters in advance. The target parameters corresponding to the parameters in the service request can be searched from the database according to the preset search rules and the corresponding relation, so that the process of data conversion of the parameters in the service request is realized.
In this embodiment, the data transmission object model corresponding to the preset service type is obtained based on the service request, the target parameter corresponding to the parameter in the service request is searched from the database as the converted parameter according to the service request, and the rapid conversion of the parameter in the service request can be realized based on the BOM model.
In an embodiment, as shown in fig. 5, a flowchart of a business processing method provided in an embodiment of the present application is shown, and specifically relates to a possible process of performing a lookup in a database, where the method may include the following steps:
step 520, judging the assignment type of the parameters in the service request; the assignment type comprises any one of a transmission parameter assignment type, a loop type parameter and a new type.
And 540, searching a target parameter corresponding to the parameter in the service request in the database according to the assignment type of the parameter as the converted parameter according to the service request.
The assignment types of the parameters in the service request can be divided into a transmission parameter assignment type, a circulation type parameter, a newly added type and the like according to the conversion requirements of the transmission-in parameter and the transmission-out parameter format. According to a service request, in the implementation process of searching a target parameter corresponding to a parameter in the service request as a converted parameter in a database according to an assignment type of the parameter, a DTO model after conversion of an incoming parameter JSON of a service association system and a dynamic parameter mapping configuration table obtained from a cache can be stored in a pre-constructed data storage space, data in the data storage space can be arranged in a tree structure, the data storage space is traversed from a root node of the tree structure, a parameter extraction mark is carried out after a parameter object of the root node is found, whether a sub-tree module exists or not is checked, if yes, a parent tree is hung to execute sub-tree search, and the steps are iterated until the conversion of the parameter is completed after the assignment formulas corresponding to all the sub-trees are executed.
When data conversion is performed, conversion can be performed according to assignment types of parameters, for example, if the assignment types of the parameters in the service request are parameter transmission assignment types, parameters can be directly transmitted according to a preset calculation formula, and natural language conversion of the assignment can be specifically completed by adopting a point-and-place mode, for example, "the previous odds ratio is the odds ratio of H5 to the liability insurance of the external parameter employer" can be completed by the formula "car insurance BOM liability insurance". The previous odds ratio = H5 to enter the reference, the odds ratio "completes parameter conversion; if the assignment type of the parameters in the service request is a circular parameter, that is, there are multiple groups of parameters and the data needs to be taken out circularly, a preset circular value-taking formula can be used to complete parameter conversion, for example, a circular H5 parameter-entering dangerous type scheme, a circular value-taking formula "H5 parameter-entering, dangerous type scheme List ()" can be used to complete parameter conversion; if the assignment type of the parameter in the service request is a new addition type, the corresponding parameter cannot be searched, so that parameter conversion can be realized by adding an array List or an object DTO.
In the embodiment, by judging the assignment type of the parameter in the service request, the target parameter corresponding to the parameter in the service request is searched in the database according to the assignment type of the parameter according to the service request and is used as the converted parameter, and the parameter can be searched according to the assignment type of the parameter, so that data conversion is realized, and the efficiency and the accuracy of parameter conversion are improved.
In an embodiment, the parameter in the service request may include a parameter name and a parameter structure, as shown in fig. 6, which shows a flowchart of a service processing method provided in this embodiment, and specifically relates to a possible process of converting a parameter name, the method may include the following steps:
step 620, acquiring a first parameter mapping configuration table from a database according to the service request; the first parameter mapping configuration table pre-stores the corresponding relationship between the parameter name of the parameter in the service request and the parameter name of the target parameter.
Step 640, looking up the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
As shown in fig. 7, which shows a flowchart of a service processing method provided in an embodiment of the present application, specifically, related to a possible process of converting a parameter structure, the method may include the following steps:
step 720, acquiring a second parameter mapping configuration table from the database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relationship between the parameter structure of the parameter in the service request and the parameter structure of the target parameter.
Step 740, searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
The data conversion is performed on the parameter names of the parameters in the service request, and the english names of the parameters are converted into the chinese names according to the first parameter mapping configuration table, as shown in fig. 8, and fig. 8 is a schematic diagram illustrating a correspondence relationship between parameter names provided in the embodiment of the present application. By querying the first parameter mapping configuration table in the database, the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request can be obtained according to the corresponding relationship. The data conversion is performed on the parameter structure in the service request, the parameter in the service request of the service system is converted into the parameter structure capable of being in butt joint with the management platform, and specifically, the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request can be obtained according to the corresponding relation by querying a second parameter mapping configuration table in the database.
In this embodiment, the first parameter mapping configuration table and the second parameter mapping configuration table in the database are searched for performing data conversion on the parameter name and the parameter structure, so that not only can the data conversion be performed quickly, but also the data conversion performed on the parameter name and the parameter structure can be more accurate, and thus the quick and efficient docking of services is realized. And moreover, the data conversion is carried out on the parameter names, so that the independent adjustment of the parameters can be conveniently carried out by service personnel.
In an embodiment, as shown in fig. 9, which shows a flowchart of a business processing method provided in an embodiment of the present application, specifically, related to a possible process for updating a browser object model version, the method may include the following steps:
and 920, judging whether the version of the browser object model is the latest version.
And 940, if not, updating the version of the browser object model to generate an updated browser object model.
And step 960, performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters.
After the BOM model is constructed and imported into effect, the BOM model can be maintained according to the ID and the version number of the primary key associated with the BOM, and particularly, the ID, the version number and the class information of the BOM can be loaded into a system memory. The parameters can be converted under the framework used by the BOM model shown in fig. 10, after the parameter JSON is transmitted into the business system, the BOM model in the system memory can be obtained, and then whether the version of the BOM model is the latest version can be judged, if so, the transmitted parameter JSON is mapped into the BOM model to perform the data conversion of the parameters; and if the version of the browser object model is not the latest version, updating the version of the browser object model to generate an updated browser object model, and performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters. After the version of the BOM model is updated, class can be reloaded and the memory can be updated by unloading class, so that the update of the version of the BOM model is realized.
In this embodiment, whether the version of the browser object model is the latest version is judged, if not, the version of the browser object model is updated to generate an updated browser object model, and the parameters in the service request are subjected to data conversion through the updated browser object model to generate converted parameters.
In an embodiment, the whole service processing process is described based on the call relationship architecture diagrams of different systems as shown in fig. 11, when a service system at a front end requests a reference, the structure of data used by incoming parameters is a compact and efficient json data structure, and is more suitable for performing a resume interface transmission at a web end, and a RestController implementation class of a dynamic parameter manager DecisionExecuteController, spring, may obtain an object DTO model of the service system through @ PostMapping (value = "nonAutoDecisionEngin"). When a system is started for the first time, a dynamic parameter mapping configuration table t _ config _ mapping is loaded from a database, the data of the dynamic parameter mapping configuration table t _ config _ mapping realizes the whole data initialization of the system during starting through @ PostConstruct, the data is placed in ConcurrentHashMap < String, descissionExecutorVo >, and after the system is started and initialized, the parameters are reloaded and updated every 10 minutes, so that the latest dynamic parameter configuration is analyzed in the system after the parameters are changed. Then, dynamic parameter configuration reading is carried out, and for each type of service request, a unique parameter group key is provided, for example, the group finance inquiry and quotation employer liability risk parameter group key is liabityEval 001, the enterprise finance risk parameter group key is qcx001, and according to the parameter group key value, a parameter configuration group decisionExecutionVoList can be extracted from ConcurrentHashMap < String, decisionExecutionVol >. In the t _ config _ mapping table, data are arranged in a tree structure, and due to the conversion requirements of the formats of the incoming parameters and the outgoing parameters, the system divides the parameters into three types, namely transmission parameter assignment type, circulation type parameters and newly-added parameters, and the analysis and assignment steps of the dynamic parameters are as follows: the DTO model object after the JSON parameter is transformed and the data t _ config _ mapping obtained from the cache are stored into the CtxMap context; traversing the parameter context CtxMap from the root node as a starting point, finding a root node parameter object, and performing parameter alias extraction marking; checking whether a sub-tree module exists, if so, suspending to carry out parent tree execution sub-tree search; and when the parameter type check is executed, executing according to different assignment types so as to complete parameter conversion.
In the natural language parameter configurator, the natural language parameter configurator realizes transmission of JSON parameters, parameter mapping logic configuration and parameter natural language conversion configuration through a web graphical interface, and is convenient for insurance mechanism services to realize differentiated parameter conversion configuration through natural language description, thereby satisfying independent control of rule sets of three-level mechanism branches. The definition process of the BOM model may be: the engineering self-defines comments @ interface Box and @ interface BomField, and marks the meanings of an object and a field through comments, wherein the @ Box comment comprises a name and a primary attribute, the $ name attribute represents object description, and the $ primary attribute represents whether the object description is Bom or not, and defaults to be false; the @ BomField notation works on fields, which represent fields that need to be used by the business process. The uploading analysis process of the BOM model can comprise the following steps: in engineering, a custom class loader scans uploaded beans containing @ Bom annotation in an jar package, loads the beans into a custom class loader bomchalsasLoader, traverses class when analyzing Bom, obtains classes from the bomchalsasLoader through class names, obtains Fields and annotations related to the classes through a java reflection mechanism, obtains all field sets Fields in objects through object. In the using process of the BOM model, the field mapping relation is returned to the front end through the BomFieldModel model analyzed by the BOM, and the BOM does not need to be loaded repeatedly. The path of the field is saved during analysis, the hierarchical relationship is clear, and the fields can be assembled into a tree structure according to the hierarchy of the BOM and returned. Such as: in the policy object model, in a context dto, base info dto, addressinfo dto, city (main BOM- > basic information- > address information- > city) field, a BomField model is parsed, wherein the BomField model includes attributes field = city, classPath = com 8230, \ 8230, addressinfo dto, type = java. After the BOM model is imported into effect, the system maintains the primary key id and the version number associated with the BOM, loads the primary key id, the version number and the class information of the BOM into a system memory when the system is started, and maintains the key id, the version number and the class information through ConcurrentHashMap. And finally, calling a BOM model to realize parameter conversion.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a service processing apparatus for implementing the service processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the method, so the specific limitations in one or more service processing device embodiments provided below may refer to the limitations on the service processing method in the foregoing, and details are not described here.
In one embodiment, as shown in fig. 12, there is provided a service processing apparatus including: a sending module 1202, a converting module 1204, and an obtaining module 1206, wherein:
a sending module 1202, configured to send a service request to a management platform; the service request includes a request corresponding to at least one preset service type.
A conversion module 1204, configured to perform data conversion on the parameters in the service request through the browser object model, and generate converted parameters.
An obtaining module 1206, configured to obtain, based on the converted parameter, a service rule corresponding to the service request from the management platform, and execute the service based on the service rule.
In an embodiment, the conversion module 1204 is specifically configured to obtain, based on a service request, a data transmission object model corresponding to a preset service type; and performing data conversion on the parameters in the data transmission object model through the browser object model to generate converted parameters.
In an embodiment, the converting module 1204 is further configured to search, according to the service request, a target parameter corresponding to a parameter in the service request from a database as a converted parameter; the database stores the corresponding relation between the parameters in the service request and the target parameters in advance.
In one embodiment, the parameters in the service request include a parameter name; the conversion module 1204 is further configured to obtain a first parameter mapping configuration table from the database according to the service request; the first parameter mapping configuration table pre-stores the corresponding relation between the parameter name of the parameter in the service request and the parameter name of the target parameter; and searching the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
In one embodiment, the parameters in the service request include a parameter structure; the conversion module 1204 is further configured to obtain a second parameter mapping configuration table from the database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relation between the parameter structure of the parameter in the service request and the parameter structure of the target parameter; and searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
In an embodiment, the converting module 1204 is further configured to determine an assignment type of a parameter in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type; and according to the service request, searching a target parameter corresponding to the parameter in the service request in the database according to the assignment type of the parameter, and taking the target parameter as the converted parameter.
In an embodiment, the converting module 1204 is further configured to determine whether the version of the browser object model is the latest version; if not, updating the version of the browser object model to generate an updated browser object model; and performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters.
The modules in the service processing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
sending a service request to a management platform; the service request comprises a request corresponding to at least one preset service type; performing data conversion on parameters in the service request through a browser object model to generate converted parameters; and acquiring a service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a data transmission object model corresponding to a preset service type based on the service request; and performing data conversion on the parameters in the data transmission object model through the browser object model to generate the converted parameters.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter according to the service request; the database stores the corresponding relation between the parameters in the service request and the target parameters in advance.
In one embodiment, the parameters in the service request include parameter names;
the processor, when executing the computer program, further performs the steps of:
acquiring a first parameter mapping configuration table from a database according to the service request; the first parameter mapping configuration table pre-stores the corresponding relation between the parameter name of the parameter in the service request and the parameter name of the target parameter; and searching the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
In one embodiment, the parameters in the service request include a parameter structure;
the processor, when executing the computer program, further performs the steps of:
acquiring a second parameter mapping configuration table from a database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relation between the parameter structure of the parameter in the service request and the parameter structure of the target parameter; and searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
In one embodiment, the processor when executing the computer program further performs the steps of:
judging the assignment type of the parameters in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type; and according to the service request, searching a target parameter corresponding to the parameter in the service request in a database according to the assignment type of the parameter as the converted parameter.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
judging whether the version of the browser object model is the latest version; if not, updating the version of the browser object model to generate an updated browser object model; and performing data conversion on the parameters in the service request through the updated browser object model to generate the converted parameters.
The implementation principle and technical effect of the computer device provided by the embodiment of the present application are similar to those of the method embodiment described above, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
sending a service request to a management platform; the service request comprises a request corresponding to at least one preset service type; performing data conversion on the parameters in the service request through a browser object model to generate converted parameters; and acquiring a service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a data transmission object model corresponding to a preset service type based on the service request; and performing data conversion on the parameters in the data transmission object model through the browser object model to generate the converted parameters.
In one embodiment, the computer program when executed by the processor further performs the steps of:
according to the service request, searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter; the database stores the corresponding relation between the parameters in the service request and the target parameters in advance.
In one embodiment, the parameters in the service request include a parameter name;
the computer program when executed by the processor further realizes the steps of:
acquiring a first parameter mapping configuration table from a database according to the service request; the first parameter mapping configuration table pre-stores the corresponding relation between the parameter name of the parameter in the service request and the parameter name of the target parameter; and searching the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
In one embodiment, the parameters in the service request include a parameter structure;
the computer program when executed by the processor further realizes the steps of:
acquiring a second parameter mapping configuration table from a database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relation between the parameter structure of the parameter in the service request and the parameter structure of the target parameter; and searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging the assignment type of the parameters in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type; and according to the service request, searching a target parameter corresponding to the parameter in the service request in the database according to the assignment type of the parameter, and taking the target parameter as the converted parameter.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the version of the browser object model is the latest version; if not, updating the version of the browser object model to generate an updated browser object model; and performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters.
The implementation principle and technical effect of the computer-readable storage medium provided in this embodiment are similar to those of the above method embodiments, and are not described herein again.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
sending a service request to a management platform; the service request comprises a request corresponding to at least one preset service type; performing data conversion on parameters in the service request through a browser object model to generate converted parameters; and acquiring a service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a data transmission object model corresponding to a preset service type based on the service request; and performing data conversion on the parameters in the data transmission object model through the browser object model to generate the converted parameters.
In one embodiment, the computer program when executed by the processor further performs the steps of:
searching a target parameter corresponding to the parameter in the service request from a database as a converted parameter according to the service request; the database stores the corresponding relation between the parameters in the service request and the target parameters in advance.
In one embodiment, the parameters in the service request include a parameter name;
the computer program when executed by the processor further realizes the steps of:
acquiring a first parameter mapping configuration table from a database according to the service request; the first parameter mapping configuration table pre-stores the corresponding relation between the parameter name of the parameter in the service request and the parameter name of the target parameter; and searching the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
In one embodiment, the parameters in the service request include a parameter structure;
the computer program when executed by the processor further realizes the steps of:
acquiring a second parameter mapping configuration table from the database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relation between the parameter structure of the parameter in the service request and the parameter structure of the target parameter; and searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging the assignment type of the parameters in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type; and according to the service request, searching a target parameter corresponding to the parameter in the service request in the database according to the assignment type of the parameter, and taking the target parameter as the converted parameter.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the version of the browser object model is the latest version or not; if not, updating the version of the browser object model to generate an updated browser object model; and performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters.
The implementation principle and technical effects of the computer program product provided in this embodiment are similar to those of the method embodiments described above, and are not described herein again.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include a Read-Only Memory (ROM), a magnetic tape, a floppy disk, a flash Memory, an optical Memory, a high-density embedded nonvolatile Memory, a resistive Random Access Memory (ReRAM), a Magnetic Random Access Memory (MRAM), a Ferroelectric Random Access Memory (FRAM), a Phase Change Memory (PCM), a graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims (9)

1. A method for processing a service, the method comprising:
sending a service request to a management platform; the service request comprises a request corresponding to at least one preset service type;
performing data conversion on the parameters in the service request through a browser object model to generate converted parameters;
acquiring a service rule corresponding to the service request from the management platform based on the converted parameters, and executing the service based on the service rule;
the data conversion of the parameters in the service request through the browser object model to generate the converted parameters includes:
judging the assignment type of the parameters in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type;
according to the service request, searching a target parameter corresponding to the parameter in the service request in a database according to the assignment type of the parameter to be used as a converted parameter; wherein, the database stores the corresponding relation between the parameters in the service request and the target parameters in advance;
when data conversion is carried out, if the assignment type is the parameter transmission assignment type, parameter transmission is carried out according to a preset calculation formula;
if the assignment type is the circulation type parameter, performing parameter conversion according to a preset circulation value-taking formula;
and if the assignment type is the newly added type, performing parameter conversion through a newly added array or object.
2. The method of claim 1, wherein the converting parameters in the service request by the browser object model to generate converted parameters comprises:
acquiring a data transmission object model corresponding to the preset service type based on the service request;
and performing data conversion on the parameters in the data transmission object model through the browser object model to generate the converted parameters.
3. The method of claim 1, wherein the parameter in the service request comprises a parameter name; the searching, according to the service request, a target parameter corresponding to a parameter in the service request from a database as the converted parameter includes:
acquiring a first parameter mapping configuration table from the database according to the service request; the first parameter mapping configuration table prestores the corresponding relation between the parameter name of the parameter in the service request and the parameter name of the target parameter;
and searching the parameter name of the target parameter corresponding to the parameter name of the parameter in the service request from the first parameter mapping configuration table.
4. The method of claim 1, wherein the parameters in the service request comprise a parameter structure; the searching, according to the service request, a target parameter corresponding to a parameter in the service request from a database as the converted parameter includes:
acquiring a second parameter mapping configuration table from the database according to the service request; the second parameter mapping configuration table pre-stores the corresponding relationship between the parameter structure of the parameter in the service request and the parameter structure of the target parameter;
and searching the parameter structure of the target parameter corresponding to the parameter structure of the parameter in the service request from the second parameter mapping configuration table.
5. The method according to claim 1 or 2, wherein the converting parameters in the service request by the browser object model to generate converted parameters further comprises:
judging whether the version of the browser object model is the latest version or not;
if not, updating the version of the browser object model to generate an updated browser object model;
and performing data conversion on the parameters in the service request through the updated browser object model to generate converted parameters.
6. A traffic processing apparatus, characterized in that the apparatus comprises:
the sending module is used for sending a service request to the management platform; the service request comprises a request corresponding to at least one preset service type;
the conversion module is used for performing data conversion on the parameters in the service request through a browser object model to generate converted parameters;
an obtaining module, configured to obtain, based on the converted parameter, a service rule corresponding to the service request from the management platform, and execute the service based on the service rule;
the conversion module is also used for judging the assignment type of the parameter in the service request; the assignment type comprises any one of a transmission parameter assignment type, a circulation type parameter and a newly added type; according to the service request, searching a target parameter corresponding to the parameter in the service request in a database according to the assignment type of the parameter to be used as a converted parameter; wherein, the database stores the corresponding relation between the parameters in the service request and the target parameters in advance;
when the conversion module performs data conversion, if the assignment type is the parameter transmission assignment type, performing parameter transmission according to a preset calculation formula;
if the assignment type is the cycle type parameter, performing parameter conversion according to a preset cycle value formula;
and if the assignment type is the newly added type, performing parameter conversion through a newly added array or object.
7. The apparatus according to claim 6, wherein the conversion module is configured to obtain a data transmission object model corresponding to the preset service type based on the service request; and performing data conversion on the parameters in the data transmission object model through the browser object model to generate the converted parameters.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202210942338.3A 2022-08-08 2022-08-08 Service processing method, device, computer equipment and storage medium Active CN114997111B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210942338.3A CN114997111B (en) 2022-08-08 2022-08-08 Service processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210942338.3A CN114997111B (en) 2022-08-08 2022-08-08 Service processing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114997111A CN114997111A (en) 2022-09-02
CN114997111B true CN114997111B (en) 2023-01-10

Family

ID=83023110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210942338.3A Active CN114997111B (en) 2022-08-08 2022-08-08 Service processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114997111B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108492195B (en) * 2018-03-08 2020-11-27 中国平安人寿保险股份有限公司 Rule engine package parameter generalization method, equipment and storage medium
CN109597825B (en) * 2018-11-30 2022-12-27 深圳前海微众银行股份有限公司 Rule engine calling method, device, equipment and computer readable storage medium
CN111143404B (en) * 2019-12-04 2023-08-11 北京城市网邻信息技术有限公司 Service processing method and device
CN112540923B (en) * 2020-12-15 2022-03-25 平安科技(深圳)有限公司 Interface parameter checking and converting method, device, equipment and storage medium
CN114328682A (en) * 2021-12-21 2022-04-12 中国农业银行股份有限公司 Data processing method, device, equipment and medium based on rule engine

Also Published As

Publication number Publication date
CN114997111A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US8271935B2 (en) Methods and tools for data-driven application engineering
US8583701B2 (en) Uniform data model and API for representation and processing of semantic data
US20150205847A1 (en) Database generation from a spreadsheet
US9720656B2 (en) Method and apparatus for enabling agile development of services in cloud computing and traditional environments
US9898502B2 (en) System and method for executing a SPARQL query
Kim Development of Mobile Cloud Applications using UML.
US8868597B2 (en) Directory server processing requests based on hierarchical models while using backend servers operating based on relational models
CN110825395B (en) Multi-plug-in layered deployment system, device and medium
US20220376991A1 (en) System and method for visualizing and navigating network data
WO2020142300A1 (en) Automatic resource management for build systems
US20180081638A1 (en) Collaborative development of a web-based service
CN116560683A (en) Software updating method, device, equipment and storage medium
US8666951B2 (en) Managing multiple versions of enterprise meta-models using semantic based indexing
US11409724B2 (en) Hashed balanced tree data structure
CN114997111B (en) Service processing method, device, computer equipment and storage medium
US11016830B2 (en) Entity-based service operation for object-based persistence
WO2022220982A1 (en) Database query execution on multiple databases
CN113704120A (en) Data transmission method, device, equipment and storage medium
Eels et al. Aligning patterns to the Wikibase model
CN115017185A (en) Data processing method, device and storage medium
CN115390912B (en) Resource discovery method, device, computer equipment and storage medium
Lehmann et al. The geoknow handbook
CN116301878A (en) Method, device, equipment and medium for inquiring inverse dependency relationship of software module
CN117234523A (en) Method, device, computer equipment and storage medium for configuring reactor platform functions
CN117389859A (en) Method, device, computer equipment and storage medium for determining influence range

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