CN110838071B - Policy data processing method, device and server - Google Patents

Policy data processing method, device and server Download PDF

Info

Publication number
CN110838071B
CN110838071B CN201911071970.XA CN201911071970A CN110838071B CN 110838071 B CN110838071 B CN 110838071B CN 201911071970 A CN201911071970 A CN 201911071970A CN 110838071 B CN110838071 B CN 110838071B
Authority
CN
China
Prior art keywords
policy
document
service
micro
display document
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
CN201911071970.XA
Other languages
Chinese (zh)
Other versions
CN110838071A (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.)
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd, Taikang Online Property Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201911071970.XA priority Critical patent/CN110838071B/en
Publication of CN110838071A publication Critical patent/CN110838071A/en
Application granted granted Critical
Publication of CN110838071B publication Critical patent/CN110838071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a method, a device and a server for processing policy data, wherein the method comprises the following steps: receiving a display request sent by terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed; calling a data micro-service to acquire the policy data corresponding to the policy number from the policy database; calling a conversion micro-service to generate a display document in a preset format, wherein the display document comprises policy data; and sending the display document to the terminal equipment so that the terminal equipment displays the display document. As can be seen from the above procedure, by disassembling the processing procedure of the policy data, different modules/steps are implemented by different micro services, achieving low coupling between modules/steps. Furthermore, as the processing process of the policy data is realized by calling a plurality of micro-services, the system can stably run and the stability of the system is improved even under the condition that the policy data is high and concurrent.

Description

Policy data processing method, device and server
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a server for processing policy data.
Background
In electronic application applications, there are scenarios where it is desirable to present an electronic policy to a user. Taking car insurance as an example, after the business personnel generates an electronic policy according to the user information and the vehicle information and stores the electronic policy in the policy database, the electronic policy needs to be displayed through the terminal equipment so that the user can confirm the electronic policy.
For example, when the electronic policy needs to be displayed, the server obtains policy data from the policy database and generates a display document according to the policy data. And then the terminal equipment displays the display document, so that the user can confirm the data in the electronic policy through the terminal equipment.
Then, the processing process of the policy data is completed by a single application program, wherein the processing process comprises a plurality of modules and processing steps, and the internal coupling of the system is higher; and, when a plurality of policy data are processed at the same time, unstable system operation may be caused.
Disclosure of Invention
The application provides a method, a device and a server for processing policy data, which are used for reducing system coupling and improving system operation stability.
In a first aspect, the present application provides a method for processing policy data, which is applied to a server of a micro service architecture, where a data micro service and a conversion micro service are deployed in the micro service architecture; the method comprises the following steps:
Receiving a display request sent by terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed;
invoking the data micro-service to acquire the policy data corresponding to the policy number from a policy database;
calling the conversion microservice to generate a display document in a preset format, wherein the display document comprises the policy data;
and sending the display document to the terminal equipment so that the terminal equipment displays the display document.
In a possible implementation manner, a cache system is further deployed in the micro-service architecture, and the cache system is used for storing a plurality of key value pairs, each key value pair comprises a policy number and a state, and the state is used for indicating whether an electronic policy corresponding to the policy number has generated a display document;
the calling the data micro-service to acquire the policy data corresponding to the policy number from a policy database comprises the following steps:
inquiring the cache system according to the policy number, and determining whether an electronic policy corresponding to the policy number generates a display document;
if the electronic policy corresponding to the policy number does not generate the display document, invoking the data micro-service to acquire the policy data corresponding to the policy number from a policy database;
Correspondingly, after the conversion micro-service generates the display document in the preset format, the method further comprises the following steps:
and updating the state corresponding to the policy number into a generated display document in the cache system, and storing the policy number and the display document into a document database.
In a possible implementation manner, before the sending the presentation document to the terminal device, the method further includes:
monitoring the state corresponding to the policy number stored in the cache system;
and if the state corresponding to the policy number is updated from the non-generated display document to the generated display document, acquiring the display document corresponding to the policy number from the document database.
In a possible implementation manner, the preset format is PDF format, and the invoking the conversion micro service to generate the presentation document in the preset format includes:
and calling the conversion micro service to execute the following steps:
filling the policy data into a preset template to obtain a preset template document comprising the policy data;
and converting the preset template document into a display document in a PDF format.
In a possible implementation manner, the filling the policy data into a preset template to obtain a preset template document including the policy data includes:
According to the verification rule corresponding to the preset template, verifying the policy data to obtain a verification result;
and if the verification result is that the verification is passed, filling the policy data into a preset template to obtain a preset template document comprising the policy data.
In a possible implementation manner, the micro service architecture is further provided with a template micro service; the calling the conversion micro-service to generate a display document in a preset format comprises the following steps:
invoking the template micro-service to obtain a policy type corresponding to the policy number, acquiring a preset template corresponding to the policy type, and filling the policy data into the preset template to obtain a preset template document comprising the policy data;
and calling the conversion micro-service to convert the preset template document into a display document in a preset format.
In a possible implementation manner, the method further includes:
if the electronic policy corresponding to the policy number has generated a display document, acquiring the display document corresponding to the policy number from the document database;
and sending the display document to the terminal equipment.
In a second aspect, the present application provides a policy data processing device, applied to a server of a micro service architecture, where a data micro service and a conversion micro service are deployed, the device includes:
The receiving module is used for receiving a display request sent by the terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed;
the processing module is used for calling the data micro-service to acquire the policy data corresponding to the policy number from a policy database;
the processing module is further used for calling the conversion microservice to generate a display document in a preset format, wherein the display document comprises the policy data;
and the sending module is used for sending the display document to the terminal equipment so as to enable the terminal equipment to display the display document.
In a possible implementation manner, a cache system is further deployed in the micro-service architecture, and the cache system is used for storing a plurality of key value pairs, each key value pair comprises a policy number and a state, and the state is used for indicating whether an electronic policy corresponding to the policy number has generated a display document; the processing module is specifically configured to:
inquiring the cache system according to the policy number, and determining whether an electronic policy corresponding to the policy number generates a display document;
if the electronic policy corresponding to the policy number does not generate the display document, invoking the data micro-service to acquire the policy data corresponding to the policy number from a policy database;
Correspondingly, the processing module is further configured to: and updating the state corresponding to the policy number into a generated display document in the cache system, and storing the policy number and the display document into a document database.
In a possible implementation manner, the processing module is further configured to: monitoring the state corresponding to the policy number stored in the cache system; and if the state corresponding to the policy number is updated from the non-generated display document to the generated display document, acquiring the display document corresponding to the policy number from the document database.
In a possible implementation manner, the preset format is a PDF format, and the processing module is specifically configured to: calling the conversion micro-service to fill the policy data into a preset template to obtain a preset template document comprising the policy data; and converting the preset template document into a display document in a PDF format.
In a possible implementation manner, the processing module is specifically configured to:
according to the verification rule corresponding to the preset template, verifying the policy data to obtain a verification result;
and if the verification result is that the verification is passed, filling the policy data into a preset template to obtain a preset template document comprising the policy data.
In a possible implementation manner, the micro service architecture is further provided with a template micro service; the processing module is specifically configured to:
invoking the template micro-service to obtain a policy type corresponding to the policy number, acquiring a preset template corresponding to the policy type, and filling the policy data into the preset template to obtain a preset template document comprising the policy data;
and calling the conversion micro-service to convert the preset template document into a display document in a preset format.
In a possible implementation manner, the processing module is further configured to:
if the electronic policy corresponding to the policy number has generated a display document, acquiring the display document corresponding to the policy number from the document database;
the sending module is used for sending the display document to the terminal equipment.
In a third aspect, the present application provides a server comprising: a memory, a processor and a computer program stored in the memory, the processor running the computer program to perform the method according to any one of the first aspects.
In a fourth aspect, the present application provides a computer readable storage medium comprising a computer program which, when executed by a processor, implements a method according to any of the first aspects.
The method, the device and the server for processing the policy data provided by the embodiment of the application comprise the following steps: receiving a display request sent by terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed; calling a data micro-service to acquire the policy data corresponding to the policy number from the policy database; calling a conversion micro-service to generate a display document in a preset format, wherein the display document comprises policy data; and sending the display document to the terminal equipment so that the terminal equipment displays the display document. As can be seen from the above procedure, by disassembling the processing procedure of the policy data, different modules/steps are implemented by different micro services, achieving low coupling between modules/steps. Furthermore, as the processing process of the policy data is realized by calling a plurality of micro-services, the system can stably run and the stability of the system is improved even under the condition that the policy data is high and concurrent.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic diagram of a system architecture provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for processing policy data according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a server architecture according to one embodiment of the present application;
FIG. 4 is a diagram of a micro-service architecture according to another embodiment of the present application;
FIG. 5 is a flowchart illustrating a policy data processing method according to another embodiment of the present disclosure;
FIG. 6 is an interactive schematic diagram of a policy data processing process according to another embodiment of the present application;
FIG. 7 is a schematic diagram of a micro-service architecture according to another embodiment of the present application;
fig. 8 is a flowchart illustrating a method for processing policy data according to another embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a policy data processing device according to an embodiment of the present application;
fig. 10 is a schematic hardware structure of a server according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As previously mentioned, there are some scenarios in which it is desirable to present an electronic policy to a user. Specifically, the server acquires the policy data from the policy database, and generates a presentation document according to the policy data. And then the terminal equipment displays the display document, so that the user can confirm the data in the electronic policy through the terminal equipment.
The processing of the policy data is completed by a single application program in the server. The single application program integrates all modules and steps into the same process. Moreover, for multi-version requirements, huge and bulky code engineering is often formed by means of code stacking. This means that no matter which step is changed, the whole code engineering needs to be modified, and a large number of regression tests, joint debugging tests and the like are performed on the modified code, so that not only are development and deployment efficiency and maintainability seriously affected, but also continuity and stability of application services cannot be guaranteed.
In some application scenarios, there may be a data concurrency situation, where a single application needs to process multiple policy data at the same time, and the single application has poor concurrency resistance, which often results in unstable system operation.
In order to solve at least one of the above problems, the present application provides a policy data processing method based on a micro-service architecture, which can reduce the coupling between different modules and improve the stability of system operation by adopting the micro-service architecture. Meanwhile, the processing efficiency of the policy data can be improved.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application. As shown in fig. 1, the system architecture includes: a terminal device 10 and a server 20.
Wherein the terminal 10 is operable by a client to facilitate user initiation of a policy data processing request. The terminal 10 may be a desktop computer, a notebook computer, a tablet computer, a smart phone, a personal digital assistant or a palm computer, a handheld terminal, etc., which is not limited in this embodiment.
The server 20 may be one server, or may be a server cluster formed by a plurality of servers, or even a cloud computing center formed by a plurality of servers. The server is an electronic device that provides a background service to the user, for example, a background service including, but not limited to, policy data processing services, and the like.
The server 20 is deployed with a micro-service architecture that includes data micro-services, conversion micro-services, etc. micro-services that implement different functions. According to the actual operation requirement, the micro-services realizing different functions can be deployed on different processes of the same server, or can be deployed on different processes of different servers respectively, which is not limited in this embodiment.
In addition, as the requests initiated by the clients increase or decrease, the servers 20 deployed in the micro-architecture may be expanded, contracted, or collapsed.
Further, in the micro service architecture, a micro service gateway responsible for routing between different micro services may be deployed, where the micro service gateway and the different micro services may be deployed in the same server, or may be deployed in servers independently, which is not limited in this embodiment.
A network connection is established between the terminal 10 and the server 20 by wireless or wired means, etc., so that data transmission between the terminal 10 and the server 20 is achieved through the established network connection. For example, the transmitted data includes, but is not limited to, a presentation request, a presentation document, and the like.
When the client is operated in the terminal 10, a user may initiate a presentation request to the server 20 through the operated client to inform the server 20 to process policy data. After receiving the presentation request, the server 20 performs a policy data processing process based on the data service and the conversion service deployed in the micro service architecture, obtains a presentation document, and returns to the terminal 10.
The technical scheme of the present application is described in detail below with specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 2 is a flowchart illustrating a method for processing policy data according to an embodiment of the present application. As shown in fig. 2, the method of the present embodiment includes:
s201: and receiving a display request sent by the terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed.
The method of the present embodiment may be performed by the server in fig. 1. The server adopts a micro-service architecture.
Alternatively, the micro-service architecture may employ a remote service invocation framework. For example: the micro-service architecture employs the Dubbo system. Of course, the micro service architecture may also employ other architectures besides Dubbo, which is not limited in this embodiment, and is described below by taking Dubbo as an example.
The Dubbo system is divided into five parts: a remote service runtime Container (Container), a remote service Provider (Provider), a registry (Register), a remote service caller (Consumer), a monitoring center (Monitor). Wherein a service Provider (Provider) registers its own service to be published to a Registry (Registry). A service caller (Consumer) initiates a subscription to the registry for the service it wants to invoke. The registry (registry) stores remote services registered by the service Provider (Provider) and notifies the service caller (Consumer) of the service list managed by the registry, and long connection is maintained between the registry and the Provider and the caller, so that the change condition of the service issued by the service Provider (Provider) can be obtained and the latest service list is pushed to the service caller (Consumer). A monitoring center (Monitor) monitors and counts the publication and subscription of services. The service calling party (Consumer) and the service Provider (Provider) accumulate the calling times and calling time in the memory and send statistics to the monitoring center (Monitor) at fixed time. Wherein the service invoker (Consumer) and the service Provider (Provider) may be the same or different.
Alternatively, dubbo may use a Zookeeper as a registry to store remote service information registered by a service Provider (Provider).
Fig. 3 is a schematic diagram of a server architecture according to an embodiment of the present application. As shown in fig. 3, taking the dubbo+zookeeper architecture as an example, a data micro-service and a conversion micro-service are deployed in the micro-service architecture. The data micro-service is used for providing a service for acquiring data from the policy database, and the conversion micro-service is used for providing a service for generating the policy data into a document in a preset format. The policy data processing service acts as an interface to interact with the terminal device, for example, receiving a presentation request from the terminal device, and returning a presentation document or the like to the terminal device. Meanwhile, the policy data processing service also serves as a service caller (Consumer), for example, after receiving the presentation request, processes the policy data by calling a data micro service and converting the micro service to obtain the presentation document. Wherein the data micro-service and the conversion micro-service are registered with a Zookeeper registry. And inquiring and calling the micro-service from the Zookeeper registry when the policy data processing service needs to acquire the micro-service.
Optionally, as shown in fig. 3, the micro service architecture may further include a configuration micro service, where the configuration micro service is used to provide some public services, for example: public components (beans), public tool classes, interfaces to provide configuration to other microservices, etc. Optionally, the configuration microservice can also adopt a disconf technology to perform distributed deployment on the configuration files, so that the configuration requirements of different environments are met.
When the terminal equipment needs to display a certain electronic policy, a display request is sent to a server, and the policy number of the electronic policy to be displayed is carried in the display request. In this way, after receiving the display request, the server executes subsequent S202 to S203 according to the policy number therein, generates a display document, and sends the display document to the terminal device for display.
Optionally, the policy number carried in the presentation request may be an encrypted policy number. Thus, after receiving the display request, the server decrypts the content in the display request to obtain the policy number. By encrypting the policy number, the security of the user policy data can be improved.
S202: and calling the data micro-service to acquire the policy data corresponding to the policy number from the policy database.
The policy database is a database for storing data of electronic policies. For example: the policy database stores the data of electronic policies corresponding to different policy numbers (for convenience of description, the data of electronic policies are referred to as policy data in the following). Policy data includes, but is not limited to: applicant information, insurance information, agreement content, etc.
And after the server acquires the policy number from the display request, invoking the data micro-service to acquire the policy data corresponding to the policy number from the policy database.
Optionally, after the data micro-service obtains the policy data from the policy database, the policy data may be further encapsulated to obtain policy data conforming to a preset data structure, and then the encapsulated policy data is returned to the policy data processing service.
S203: and calling the conversion micro-service to generate a display document in a preset format, wherein the display document comprises the policy data.
Wherein the preset format includes, but is not limited to: portable document format (Portable Document Format, PDF), WORD format, markup language (Extensible Markup Language, XML) format, hypertext markup language (Hyper Text Markup Language, HTML) format, etc.
Taking the preset format as a PDF format as an example, the conversion of the micro service to generate the display document in the preset format may specifically include:
filling the policy data into a preset template to obtain a preset template document comprising the policy data; and converting the preset template document into a display document in a PDF format.
For example: filling the policy data into an HTML template to obtain an HTML document comprising the policy data; the HTML document is then converted into a presentation document in PDF format.
S204: and sending the display document to the terminal equipment so that the terminal equipment displays the display document.
For example: the server sends the generated display document in the PDF format to the terminal equipment, and the terminal equipment displays the display document, so that a user can check the document content displayed in the terminal equipment, and when the check is correct, the signature confirmation is carried out on the electronic policy.
The method for processing policy data provided in this embodiment includes: receiving a display request sent by terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed; calling a data micro-service to acquire the policy data corresponding to the policy number from the policy database; calling a conversion micro-service to generate a display document in a preset format, wherein the display document comprises policy data; and sending the display document to the terminal equipment so that the terminal equipment displays the display document. As can be seen from the above procedure, by disassembling the processing procedure of the policy data, different modules/steps are implemented by different micro services, achieving low coupling between modules/steps. Furthermore, as the processing process of the policy data is realized by calling a plurality of micro-services, the system can stably run and the stability of the system is improved even under the condition that the policy data is high and concurrent.
Fig. 4 is a schematic diagram of a micro service architecture according to another embodiment of the present application. Fig. 5 is a flowchart of a policy data processing method according to another embodiment of the present application. Fig. 6 is an interactive schematic diagram of a policy data processing procedure according to another embodiment of the present application. Another embodiment provided herein is described in detail below in conjunction with fig. 4, 5 and 6.
As shown in fig. 4, on the basis of the micro service architecture shown in fig. 3, a cache system and a document database are further deployed in the micro service architecture of this embodiment.
The cache system is used for storing a plurality of key-value pairs (key-value), wherein each key-value pair comprises a policy number (key) and a state (value), and the state is used for indicating whether an electronic policy corresponding to the policy number has generated a presentation document. For example: if the electronic policy corresponding to a certain policy number x has already generated the presentation document, the key value pair < x,1> is stored in the cache system. If the electronic policy corresponding to a certain policy number y does not generate the display document, the key value pair < y,0> is stored in the cache system.
Alternatively, the cache system may employ a remote dictionary service (Remote Dictionary Server, redis) cache system. Redis is a NoSQL database based on memory and supporting persisted keys-values, where each key and value is represented using an object.
The document database is used for storing the generated display document. For example: and taking the policy numbers as key values, and storing the display documents corresponding to the policy numbers in a document database.
Taking the micro-service architecture shown in fig. 4 as an example, a policy data processing method shown in fig. 5 and 6 may be adopted, and the method includes:
s501: and receiving a display request sent by the terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed.
Illustratively, as shown in fig. 6, the policy data processing service receives a presentation request from a terminal device, carrying a policy number x.
S502: and inquiring the cache system according to the policy number, and determining whether the electronic policy corresponding to the policy number has generated the display document. If the electronic policy corresponding to the policy number does not generate the presentation document, S503 to S506 are executed, and if the electronic policy corresponding to the policy number has generated the presentation document, S506 is directly executed.
Referring to fig. 6, the policy data processing service reads a key value pair corresponding to the policy number x from the cache system, and determines whether the electronic policy corresponding to the policy number has generated a presentation document according to the read key value pair. For example: if the key value pair is < x,1>, determining that the electronic policy corresponding to the policy number x has generated the display document. If the key value pair is < x,0>, determining that the electronic policy corresponding to the policy number x does not generate the display document.
When the electronic policy corresponding to the policy number x is determined to generate the display document, the display document corresponding to the policy number x can be directly obtained from the document database and sent to the terminal equipment for display.
When the electronic policy corresponding to the policy number x is determined not to generate the display document, the display document corresponding to the policy number x is not stored in the document database. Accordingly, S503 to S506 are performed to generate a presentation document corresponding to the policy number x.
S503: and calling the data micro-service to acquire the policy data corresponding to the policy number from the policy database.
Referring to fig. 6, the policy data processing service invokes a data micro service (e.g., sends a data acquisition request to the data micro service) that acquires policy data corresponding to policy number x from querying a policy database according to policy number x. And the data micro-service returns the policy data corresponding to the policy number x to the policy data processing service.
S504: the call conversion micro service performs the following steps: filling the policy data into a preset template to obtain a preset template document comprising the policy data; converting a preset template document into a display document in a PDF format; and updating the state corresponding to the policy number into a generated display document in the cache system, and storing the policy number and the display document in a document database.
Referring to fig. 6, the policy data processing service invokes a conversion micro service (e.g., sends a conversion request to the conversion micro service), the conversion micro service populates the policy data into an HTML template to obtain an HTML document, and then converts the HTML document into a presentation document in PDF format. The conversion micro service then stores the policy number x and the generated presentation document in a document database. In addition, the conversion micro-service also updates the state corresponding to the policy number x in the cache system to the generated presentation document, i.e., modifies the key value pair < x,0> in the cache system to < x,1>.
Optionally, after receiving the conversion request, the conversion micro service may first verify the policy data, and when the verification passes, execute the above-mentioned filling and conversion process. Illustratively, the policy data is checked according to a check rule corresponding to a preset template (for example, an HTML template) to obtain a check result; if the verification result is that the verification is passed, filling the policy data into a preset template (for example, an HTML template) to obtain a preset template document (for example, an HTML document) comprising the policy data.
Optionally, after the conversion micro-service stores the display document in the document database, the HTML document and the PDF document generated locally can be deleted in time, so as to avoid affecting the subsequent conversion processing of the conversion micro-service.
S505: and monitoring whether the state corresponding to the policy number stored in the cache system is updated to the generated display document, and if so, executing S506.
S506: and acquiring a display document corresponding to the policy number from the document database, and transmitting the display document to the terminal equipment.
In this embodiment, after the conversion micro service generates the presentation document, the conversion document is not directly sent to the policy data processing service, but the presentation document is stored in the document database, and the status recorded in the Redis cache system is updated. Therefore, the policy data processing service monitors the state of the policy number x stored in the Redis cache system, and when it is monitored that the state of the policy number x is updated to a generated presentation document (i.e., it is monitored that the key value pair < x,0> is changed to < x,1 >), S506 is executed, that is, the presentation document corresponding to the policy number x is obtained from the document database, and then sent to the terminal device for presentation.
In addition, in this embodiment, after the database is used, each micro service needs to be disconnected in time (i.e., resource recovery is performed on a connection pool of the database in time), so as to avoid the problems of influence on subsequent connection or memory leakage caused by too many connections.
After the conversion micro service generates the display document, the display document is not returned to the policy data processing service in the form of a file, but whether the conversion is successful is indicated by updating the state of the policy number stored in the Redis cache system, so that the policy data processing efficiency is improved, and the message load of internal interaction is reduced. Further, when the display request is received, whether the policy number generates the display document is determined by querying the Redis cache system, and compared with the direct query of the document database, the query efficiency is improved, and the policy data processing efficiency is further improved.
In this embodiment, by disassembling the processing procedure of the policy data, different modules/steps are implemented by different micro services, so as to achieve low coupling between modules/steps. Furthermore, as the processing process of the policy data is realized by calling a plurality of micro-services, the system can stably run and the stability of the system is improved even under the condition that the policy data is high and concurrent. By adopting the policy data processing method of the embodiment, the processing efficiency of the policy data can be obviously improved, so that the time for generating the display document is obviously shortened (under the condition that the policy data is high in concurrence, the method of the embodiment can generate one display document only by 3 seconds, and in the prior art, more than 20 seconds are needed for generating one display document).
Fig. 7 is a schematic diagram of a micro service architecture according to another embodiment of the present application. Fig. 8 is a flowchart illustrating a method for processing policy data according to another embodiment of the present application. As shown in fig. 7 and 8, the method includes:
s801: and receiving a display request sent by the terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed.
S802: and calling the data micro-service to acquire the policy data corresponding to the policy number from the policy database.
S803: calling a template micro service to obtain a policy type corresponding to the policy number, obtaining a preset template corresponding to the policy type, and filling the policy data into the preset template to obtain a preset template document comprising the policy data.
S804: and calling a conversion micro-service to convert the preset template document into a display document in a preset format.
S805: and sending the display document to the terminal equipment so that the terminal equipment displays the display document.
The implementation process of this embodiment is similar to that of the embodiment shown in fig. 2 and 5, and will not be repeated here. This embodiment differs from the two embodiments described above in that: as shown in fig. 7, a template micro service may also be deployed in the micro service architecture of the present embodiment.
Wherein the template microservice may provide a customized service, i.e., employ different templates for different types of policy data. Such as: the method comprises the steps that a template 1 is adopted for insurance policy data of a vehicle insurance type; for the health risk type policy data, a template 2 is adopted; etc. Therefore, the server can meet the display requirements of different types of electronic insurance policies.
In the embodiment, after acquiring the policy data corresponding to the policy number by calling the data micro-service, acquiring the policy type corresponding to the policy number by calling the template micro-service, acquiring a preset template corresponding to the policy type, and filling the policy data into the preset template to obtain a preset template document comprising the policy data; and then, calling a conversion micro-service to convert the preset template document into a display document in a preset format.
Therefore, the embodiment further decouples the policy data processing process, and the policy data processing process is realized by utilizing the data microservice, the template microservice and the conversion microservice, so that the coupling is further reduced, and the cohesion is improved. And by deploying the template micro-service, different templates can be customized for different types of policy data, and more application scenes can be applied.
Fig. 9 is a schematic structural diagram of a policy data processing device according to an embodiment of the present application. The device is applied to a server of a micro-service architecture, wherein the micro-service architecture is provided with a data micro-service and a conversion micro-service. The apparatus may be in the form of software and/or hardware. As shown in fig. 9, the policy data processing apparatus 900 provided in this embodiment includes: a receiving module 901, a processing module 902 and a transmitting module 903.
The receiving module 901 is configured to receive a display request sent by a terminal device, where the display request includes a policy number of an electronic policy to be displayed;
the processing module 902 is configured to invoke the data microservice to obtain policy data corresponding to the policy number from a policy database;
the processing module 902 is further configured to invoke the conversion microservice to generate a display document in a preset format, where the display document includes the policy data;
and the sending module 903 is configured to send the display document to the terminal device, so that the terminal device displays the display document.
In a possible implementation manner, a cache system is further deployed in the micro-service architecture, and the cache system is used for storing a plurality of key value pairs, each key value pair comprises a policy number and a state, and the state is used for indicating whether an electronic policy corresponding to the policy number has generated a display document; the processing module 902 is specifically configured to:
Inquiring the cache system according to the policy number, and determining whether an electronic policy corresponding to the policy number generates a display document;
if the electronic policy corresponding to the policy number does not generate the display document, invoking the data micro-service to acquire the policy data corresponding to the policy number from a policy database;
correspondingly, the processing module 902 is further configured to: and updating the state corresponding to the policy number into a generated display document in the cache system, and storing the policy number and the display document into a document database.
In a possible implementation manner, the processing module 902 is further configured to: monitoring the state corresponding to the policy number stored in the cache system; and if the state corresponding to the policy number is updated from the non-generated display document to the generated display document, acquiring the display document corresponding to the policy number from the document database.
In a possible implementation manner, the preset format is a PDF format, and the processing module 902 is specifically configured to: calling the conversion micro-service to fill the policy data into a preset template to obtain a preset template document comprising the policy data; and converting the preset template document into a display document in a PDF format.
In a possible implementation manner, the processing module 902 is specifically configured to:
according to the verification rule corresponding to the preset template, verifying the policy data to obtain a verification result;
and if the verification result is that the verification is passed, filling the policy data into a preset template to obtain a preset template document comprising the policy data.
In a possible implementation manner, the micro service architecture is further provided with a template micro service; the processing module 902 is specifically configured to:
invoking the template micro-service to obtain a policy type corresponding to the policy number, acquiring a preset template corresponding to the policy type, and filling the policy data into the preset template to obtain a preset template document comprising the policy data;
and calling the conversion micro-service to convert the preset template document into a display document in a preset format.
In a possible implementation manner, the processing module 902 is further configured to:
if the electronic policy corresponding to the policy number has generated a display document, acquiring the display document corresponding to the policy number from the document database;
the sending module 903 is configured to send the display document to the terminal device.
The policy data processing device provided in this embodiment may be used to execute the technical solution of any of the above method embodiments, and its implementation principle and technical effects are similar, and will not be repeated here.
Fig. 10 is a schematic hardware structure of a server according to an embodiment of the present application. As shown in fig. 10, the server 1000 of the present embodiment includes: a processor 1001 and a memory 1002; wherein the memory 1002 is for storing a computer program; a processor 1001 for executing a computer program stored in a memory to implement the processing method of policy data in the above embodiment. Reference may be made in particular to the relevant description of the embodiments of the method described above.
Alternatively, the memory 1002 may be separate or integrated with the processor 1001.
When the memory 1002 is a device separate from the processor 1001, the server 1000 may further include: a bus 1003 connecting the memory 1002 and the processor 1001.
The server provided in this embodiment may be used to execute the technical solution in any of the above method embodiments, and its implementation principle and technical effects are similar, and this embodiment is not repeated here.
The embodiment of the application also provides a computer readable storage medium, which comprises a computer program for realizing the technical scheme in any method embodiment.
The embodiment of the application also provides a computer program, which realizes the technical scheme in any method embodiment when being executed by a processor.
The embodiment of the application also provides a chip, which comprises: the system comprises a memory, a processor and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute the technical scheme in any method embodiment.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods described in the embodiments of the present application.
It should be understood that the above processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (7)

1. The processing method of the policy data is characterized by being applied to a server of a micro-service architecture, wherein the micro-service architecture is provided with a data micro-service, a conversion micro-service, a cache system and a template micro-service; the cache system is used for storing a plurality of key value pairs, each key value pair comprises a policy number and a state, and the state is used for indicating whether an electronic policy corresponding to the policy number generates a display document or not; the method comprises the following steps:
receiving a display request sent by terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed;
inquiring the cache system according to the policy number, and determining whether an electronic policy corresponding to the policy number generates a display document;
If the electronic policy corresponding to the policy number does not generate the display document, invoking the data micro-service to acquire the policy data corresponding to the policy number from a policy database;
calling the conversion microservice to generate a display document in a preset format, wherein the display document comprises the policy data;
if the electronic policy corresponding to the policy number has generated a display document, acquiring the display document corresponding to the policy number from the document database;
the display document is sent to the terminal equipment, so that the terminal equipment displays the display document;
after the conversion micro-service generates the display document with the preset format, the method further comprises the following steps:
updating the state corresponding to the policy number into a generated display document in the cache system, and storing the policy number and the display document into a document database;
before the display document is sent to the terminal equipment, the method further comprises the following steps:
monitoring the state corresponding to the policy number stored in the cache system;
and if the state corresponding to the policy number is updated from the non-generated display document to the generated display document, acquiring the display document corresponding to the policy number from the document database.
2. The method of claim 1, wherein the preset format is PDF format, and the invoking the conversion micro-service to generate the presentation document in the preset format comprises:
and calling the conversion micro service to execute the following steps:
filling the policy data into a preset template to obtain a preset template document comprising the policy data;
and converting the preset template document into a display document in a PDF format.
3. The method according to claim 2, wherein the filling the policy data into a preset template to obtain a preset template document including the policy data includes:
according to the verification rule corresponding to the preset template, verifying the policy data to obtain a verification result;
and if the verification result is that the verification is passed, filling the policy data into a preset template to obtain a preset template document comprising the policy data.
4. The method of claim 1, wherein the micro-service architecture further has a template micro-service deployed therein; the calling the conversion micro-service to generate a display document in a preset format comprises the following steps:
invoking the template micro-service to obtain a policy type corresponding to the policy number, acquiring a preset template corresponding to the policy type, and filling the policy data into the preset template to obtain a preset template document comprising the policy data;
And calling the conversion micro-service to convert the preset template document into a display document in a preset format.
5. The processing device of the policy data is characterized by being applied to a server of a micro-service architecture, wherein the micro-service architecture is provided with a data micro-service, a conversion micro-service, a cache system and a template micro-service; the cache system is used for storing a plurality of key value pairs, each key value pair comprises a policy number and a state, and the state is used for indicating whether an electronic policy corresponding to the policy number generates a display document or not; the device comprises:
the receiving module is used for receiving a display request sent by the terminal equipment, wherein the display request comprises a policy number of an electronic policy to be displayed; the processing module is used for inquiring the cache system according to the policy number and determining whether the electronic policy corresponding to the policy number generates a display document or not;
if the electronic policy corresponding to the policy number does not generate the display document, the processing module is further configured to invoke the data microservice to obtain policy data corresponding to the policy number from a policy database;
the processing module is further used for calling the conversion microservice to generate a display document in a preset format, wherein the display document comprises the policy data;
If the electronic policy corresponding to the policy number has generated a display document, the processing module is further configured to obtain the display document corresponding to the policy number from the document database;
the sending module is used for sending the display document to the terminal equipment so that the terminal equipment displays the display document;
the processing module is further configured to: after the conversion micro-service generates a display document in a preset format, updating the state corresponding to the policy number into the generated display document in the cache system, and storing the policy number and the display document into a document database;
the processing module is further configured to: before the display document is sent to the terminal equipment, monitoring the state corresponding to the policy number stored in the cache system; and if the state corresponding to the policy number is updated from the non-generated display document to the generated display document, acquiring the display document corresponding to the policy number from the document database.
6. A server, comprising: memory, a processor and a computer program stored in the memory, the processor running the computer program to perform the method according to any one of claims 1 to 4.
7. A computer readable storage medium, characterized in that the computer readable storage medium comprises a computer program which, when executed by a processor, implements the method according to any of claims 1 to 4.
CN201911071970.XA 2019-11-05 2019-11-05 Policy data processing method, device and server Active CN110838071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911071970.XA CN110838071B (en) 2019-11-05 2019-11-05 Policy data processing method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911071970.XA CN110838071B (en) 2019-11-05 2019-11-05 Policy data processing method, device and server

Publications (2)

Publication Number Publication Date
CN110838071A CN110838071A (en) 2020-02-25
CN110838071B true CN110838071B (en) 2023-05-16

Family

ID=69576309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911071970.XA Active CN110838071B (en) 2019-11-05 2019-11-05 Policy data processing method, device and server

Country Status (1)

Country Link
CN (1) CN110838071B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652747B (en) * 2020-05-29 2023-08-29 泰康保险集团股份有限公司 Electronic policy processing method, device, equipment and computer readable storage medium
CN112286935A (en) * 2020-10-30 2021-01-29 上海淇玥信息技术有限公司 Scheduling method and device based on scheduling platform and electronic equipment
CN112381637A (en) * 2020-10-30 2021-02-19 中国人寿保险股份有限公司 Policy borrowing examination and management method and device and electronic equipment
CN112307741B (en) * 2020-12-31 2021-03-30 北京邮电大学 Insurance industry document intelligent analysis method and device
CN113688619A (en) * 2021-08-05 2021-11-23 深圳集智数字科技有限公司 PDF document generation method and device, electronic equipment and storage medium
CN114116803A (en) * 2021-11-30 2022-03-01 中国建设银行股份有限公司 Method, device and equipment for processing big data file and storage medium
CN115242894B (en) * 2022-06-08 2023-11-17 三一智矿科技有限公司 Data processing method, device, storage medium and computer equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052289A1 (en) * 2006-11-02 2008-05-08 Surgicover Pty Ltd An insurance system
US7860735B2 (en) * 2008-04-22 2010-12-28 Xerox Corporation Online life insurance document management service
CN107239325B (en) * 2016-03-28 2020-05-22 平安科技(深圳)有限公司 Document data processing method and device
CN107370786B (en) * 2017-06-02 2020-11-13 广州杰赛科技股份有限公司 General information management system based on micro-service architecture
CN109614559A (en) * 2018-11-16 2019-04-12 泰康保险集团股份有限公司 Data processing method and device
CN110377896B (en) * 2019-07-26 2023-08-22 中国工商银行股份有限公司 Method, system, computer system, and medium for generating a spreadsheet

Also Published As

Publication number Publication date
CN110838071A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
CN110838071B (en) Policy data processing method, device and server
US8250226B2 (en) Generating one or more clients for generating one or more synthetic transactions with one or more web service operations
US11368447B2 (en) Oauth2 SAML token service
CN107479868B (en) Interface loading method, device and equipment
US11797271B2 (en) Dynamic web-based integrated development environment
US8706803B1 (en) Client-side generation of preliminary version of network page
CN110928571A (en) Business program development method and device
CN110704200A (en) Method and device for converting call interface
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN111104556A (en) Service processing method and device
CN112764726A (en) Data synthesis method and device
WO2019043462A1 (en) Systems and methods for creating automated interface transmission between heterogeneous systems in an enterprise ecosystem
AU2018390863B2 (en) Computer system and method for extracting dynamic content from websites
CN107918552B (en) Light application calling method and device, client device and electronic equipment
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN113779122B (en) Method and device for exporting data
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN113626392A (en) Method and device for updating document data, electronic equipment and storage medium
CN111858833A (en) Asynchronous indexing method and device, computer equipment and storage medium
CN113448960A (en) Method and device for importing form file
US10558487B2 (en) Dynamic customization of client behavior
CN112688863B (en) Gateway data processing method and device and electronic equipment
US11778045B2 (en) Communication system for micro-frontends of a web application
CN117931322A (en) Interface calling method and device of low-code platform and electronic equipment
CN116185581A (en) Task processing method and device, nonvolatile storage medium and electronic equipment

Legal Events

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