CN107644020B - Data storage and calling method and device - Google Patents

Data storage and calling method and device Download PDF

Info

Publication number
CN107644020B
CN107644020B CN201610574602.7A CN201610574602A CN107644020B CN 107644020 B CN107644020 B CN 107644020B CN 201610574602 A CN201610574602 A CN 201610574602A CN 107644020 B CN107644020 B CN 107644020B
Authority
CN
China
Prior art keywords
data
intermediate data
storage
redis
calling
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
CN201610574602.7A
Other languages
Chinese (zh)
Other versions
CN107644020A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201610574602.7A priority Critical patent/CN107644020B/en
Publication of CN107644020A publication Critical patent/CN107644020A/en
Application granted granted Critical
Publication of CN107644020B publication Critical patent/CN107644020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention is suitable for the technical field of data processing, and provides a method and a device for storing and calling data, wherein the method comprises the following steps: building a redis storage system in the system; and in the process of making the vehicle insurance data list by the system, storing the intermediate data and calling the intermediate data through the redis storage system so as to finish the interactive operation between the system and the associated service system. The invention avoids the storage of the intermediate data in the session of the server, enhances the stability of the storage of the intermediate data by using redis, and effectively solves the problem that the storage capacity and the performance of the data in the system are limited.

Description

Data storage and calling method and device
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a method and a device for storing and calling data.
Background
The life insurance system often needs to interact with an associated business system in the process of carrying out the vehicle insurance data ordering operation. In the prior art, intermediate data in the interaction process is temporarily stored in a session of a server, which occupies a memory of the server, and meanwhile, the storage capacity and performance of the data are both limited by the server, and the expandability is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for storing and calling data, so as to extend storage capacity, performance, and scalability of data.
In a first aspect, a method for storing and calling data is provided, where the method includes:
building a redis storage system in the system;
and in the process of making the vehicle insurance data list by the system, storing the intermediate data and calling the intermediate data through the redis storage system so as to finish the interactive operation between the system and the associated service system.
In a second aspect, an apparatus for storing and retrieving data is provided, the apparatus comprising:
the building module is used for building a redis storage system in the system;
and the storage and calling module is used for storing intermediate data and calling the intermediate data through the redis storage system in the process of making the vehicle insurance data list by the system so as to finish interactive operation with the associated service system.
Compared with the prior art, the embodiment of the invention adds a redis storage system in the system; and in the process of making the vehicle insurance data list by the system, storing the intermediate data and calling the intermediate data through the redis storage system so as to finish the interactive operation between the system and the associated service system. Therefore, the intermediate data are prevented from being stored in the session of the server, the stability of the intermediate data storage is enhanced by using the redis, and the problems of limited storage capacity and performance of the data in the system are effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of an implementation of a method for storing and calling data provided by an embodiment of the present invention;
fig. 2 is a flowchart illustrating a specific implementation of step S102 in the method for storing and calling data according to the embodiment of the present invention;
fig. 3 is a flowchart illustrating a specific implementation of step S102 in a method for storing and calling data according to another embodiment of the present invention;
fig. 4 is a block diagram of a data storage and retrieval apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention 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 invention and are not intended to limit the invention.
The embodiment of the invention adds a redis storage system in the system; and in the process of making the vehicle insurance data list by the system, storing the intermediate data and calling the intermediate data through the redis storage system so as to finish the interactive operation between the system and the associated service system. Therefore, the intermediate data are prevented from being stored in the session of the server, the stability of the intermediate data storage is enhanced by using the redis, and the problems of limited storage capacity and performance of the data in the system are effectively solved. The embodiment of the invention also provides a corresponding device, which is respectively explained in detail below.
Fig. 1 is an implementation flow of a data storage and invocation method provided by an embodiment of the present invention.
In the embodiment of the invention, the data storage and calling method is applied to the terminal of the life insurance system, and the terminal comprises but is not limited to a server, a computer and the like. Referring to fig. 1, the data storage and calling method includes:
in step S101, a redis storage system is built in the system.
Illustratively, the system may be a life insurance system. According to the embodiment of the invention, a redis storage system is additionally built in the life insurance system. Where redis is an open source, advanced key-value store: the processing speed is high, and about 11 ten thousand sets and about 81000+ records can be executed per second; the method can support rich data types such as lists, sets, ordered sets, scattered data types and the like, and has strong problem solving capability; all redis operations are atomic, support multiple utilities, and can be used in multiple applications such as caching, messaging, and queuing.
In step S102, in the process of making a ticket of the car insurance data by the system, the intermediate data is stored and called by the redis storage system to complete the interactive operation with the associated service system.
Here, the interactive operations include, but are not limited to, data processing and logic determination. For example, for a life insurance system in a bank, when vehicle insurance data is listed, a plurality of rules related to vehicle insurance are stored in the insurance system, and the associated insurance system needs to be called to process the data and perform logic judgment. At this time, the associated business system is an insurance system. In practical applications, other business systems may also be called according to the order-issuing requirement, and the aforementioned insurance system is only a preferred example of the present invention and is not intended to limit the present invention.
In the embodiment of the invention, the redis storage system is used for storing intermediate data between the life insurance system and the associated business system in the vehicle insurance data ordering process. The intermediate data includes, but is not limited to, a data processing request, business information, a data processing result, and the like, and the business information includes, but is not limited to, vehicle information, owner information, quotation information, and the like. The life insurance system can store the intermediate data in the redis storage system and call the intermediate data from the redis storage system. Therefore, the intermediate data are prevented from being stored in the session of the server, the stability of the intermediate data storage is enhanced by using the redis, and the problems of limited storage capacity and performance of the data in the system are effectively solved.
As a preferred example of the present invention, fig. 2 shows a specific implementation flow of step S102 in the method for storing and calling data provided by the embodiment of the present invention.
Referring to fig. 2, the step S102 includes:
in step S201, in the process of making the vehicle insurance data invoice, the interface of the associated service system is called according to the requirement of the vehicle insurance data invoice.
Here, different stages of the order-out process correspond to different order-out requirements, for example, ICORE-PNBS of the production risk needs to be called in the order-out process, ICORE-PAS needs to be called when obtaining the last year insurance policy information, and the like. According to the embodiment of the invention, the associated service system to be called is acquired according to the requirement of the vehicle insurance data list, and then the corresponding interface of the service system is called to establish communication connection with the service system.
In step S202, intermediate data is read from the redis storage system.
Here, the life insurance system reads required intermediate data, such as data processing requests, service information and the like, from the redis storage system according to the requirement of vehicle insurance data billing, wherein the service information includes but is not limited to vehicle information, vehicle owner information, quotation information and the like.
In step S203, the intermediate data is transmitted to the service system through the interface, so that the service system processes the intermediate data.
After the intermediate data are read, the life insurance system transmits the intermediate data to a service system through the called interface so as to request the service system to process and/or logically judge the intermediate data, and therefore data calling based on a redis storage system in the vehicle insurance data issuing process is achieved.
Further, the step S102 may further include:
receiving a processing result returned by the service system through the interface;
and storing the processing result into the redis storage system.
Here, after the associated business system completes processing the intermediate data sent by the life insurance system, a processing result is obtained, and the processing result is returned to the life insurance system through the interface. And the life insurance system receives the processing result and stores the processing result into the redis storage system for subsequent calling of the system per se, so that data storage based on the redis storage system is realized in the vehicle insurance data issuing process.
Fig. 3 shows a specific implementation flow of step S102 in the method for storing and calling data according to another embodiment of the present invention.
In step S301, in the process of making the vehicle insurance data invoice, the interface of the associated service system is called according to the requirement of the vehicle insurance data invoice.
In step S302, intermediate data is read from the redis storage system.
In step S303, the intermediate data is transmitted to the service system through the interface, so that the service system processes the intermediate data.
In step S304, a processing result returned by the service system is received through the interface.
In step S305, the processing result is stored into the redis storage system.
The embodiment of the invention adds a redis storage system in the system; in the process of making a vehicle insurance data order by the system, storing intermediate data and calling the intermediate data through the redis storage system to finish interactive operation with the associated service system; therefore, the intermediate data are prevented from being stored in the session of the server, the stability of the intermediate data storage is enhanced by using the redis, and the problems of limited storage capacity and performance of the data in the system are effectively solved.
Further, since the redis storage system can replicate data to any number of slave servers. Therefore, in the embodiment of the present invention, the redis storage system stores the intermediate data in a cluster manner, and the servers in the cluster backup the intermediate data mutually. Illustratively, when the redis storage system uses two or more servers, if the intermediate data stored in the server a is updated, other servers will also update the stored intermediate data to backup the intermediate data stored in the server a; therefore, when a server in the redis storage system fails, other servers can be used temporarily; in addition, the number of servers can be conveniently increased or reduced in the redis storage system, and the expandability of data storage is improved.
Fig. 4 shows a component structure of a data storage and retrieval apparatus provided by an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown.
In the embodiment of the present invention, the data storage and call apparatus is used to implement the data storage and call method described in the above embodiments of fig. 1 to fig. 3, and may be a software unit, a hardware unit or a unit combining software and hardware that is built in a terminal. Including but not limited to servers, computers, and the like.
Referring to fig. 4, the apparatus includes:
the building module 41 is used for building a redis storage system in the system;
and the storage and calling module 42 is configured to store intermediate data and call the intermediate data through the redis storage system in a process of issuing a ticket of the vehicle insurance data by the system, so as to complete an interactive operation with the associated service system.
In an embodiment of the invention, the system comprises a life insurance system in a bank. The interaction includes, but is not limited to, data processing and logic determination. For the life insurance system in the bank, when the vehicle insurance makes a bill, a plurality of rules related to the vehicle insurance are stored in the insurance system, and the related insurance system is required to be called to process data and perform logic judgment. At this time, the insurance system is a related business system. The intermediate data includes, but is not limited to, data processing requests, business information, data processing results, and the like, and the business information includes, but is not limited to, vehicle information, owner information, quotation information, and the like.
Further, the storing and calling module 42 includes:
the calling unit 421 is configured to call an interface of the associated service system according to a demand for issuing a ticket of the vehicle insurance data in a process of issuing a ticket of the vehicle insurance data by the system;
a reading unit 422, configured to read intermediate data from the redis storage system;
a transmission unit 423, configured to transmit the intermediate data to the service system through the interface, so that the service system processes the intermediate data.
Here, different stages of the order-out process correspond to different order-out requirements, for example, ICORE-PNBS of the production risk needs to be called in the order-out process, ICORE-PAS needs to be called when obtaining the last year insurance policy information, and the like. According to the embodiment of the invention, the associated service system to be called is acquired according to the requirement of the vehicle insurance data list, and then the corresponding interface of the service system is called through the calling unit 421 so as to establish communication connection with the service system.
Further, the storing and calling module 42 further includes:
a receiving unit 424, configured to receive a processing result returned by the service system through the interface;
a storage unit 425, configured to store the processing result in the redis storage system.
Further, the redis storage system stores the intermediate data in a cluster manner, and the servers in the cluster backup the intermediate data mutually. Therefore, when a server in the redis storage system fails, other servers can be used temporarily; in addition, the number of servers can be conveniently increased or reduced in the redis storage system, and the expandability of data storage is improved.
It should be noted that the apparatus in the embodiment of the present invention may be configured to implement all technical solutions in the foregoing method embodiments, and the functions of each functional module may be implemented specifically according to the method in the foregoing method embodiments, and the specific implementation process may refer to the relevant description in the foregoing example, which is not described herein again.
The embodiment of the invention builds a redis storage system by adding the redis storage system in the system; and in the process of making the vehicle insurance data list by the system, storing the intermediate data and calling the intermediate data through the redis storage system so as to finish the interactive operation between the system and the associated service system. Therefore, the intermediate data are prevented from being stored in the session of the server, the stability of the intermediate data storage is enhanced by using the redis, and the problems of limited storage capacity and performance of the data in the system are effectively solved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus for storing and calling data may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units and modules in the embodiments of the present invention may be integrated into one processing unit, or each unit and module may exist alone physically, or two or more units and modules may be integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for data storage and retrieval, the method comprising:
building a redis storage system in the system; the system is a life insurance system;
in the process of making a vehicle insurance data order by the system, storing intermediate data and calling the intermediate data through the redis storage system to complete interactive operation with the associated service system, wherein the interactive operation comprises the following steps: in the process of vehicle insurance data ordering by the system, calling an interface of an associated service system according to the requirement of the vehicle insurance data ordering, wherein the associated service system is a production insurance system; reading intermediate data from the redis storage system; and transmitting the intermediate data to the service system through the interface so that the service system processes and logically judges the intermediate data.
2. The data storage and invocation method according to claim 1, wherein during the process of the system making the vehicle insurance data invoice, the storing intermediate data and invoking the intermediate data through the redis storage system to complete the interactive operation with the associated business system further comprises:
receiving a processing result returned by the service system through the interface;
and storing the processing result into the redis storage system.
3. A data storage and retrieval method according to claim 1 or 2, wherein the redis storage system stores the intermediate data in a cluster manner, and the respective servers in the cluster back up the intermediate data with each other.
4. An apparatus for data storage and retrieval, the apparatus comprising:
the building module is used for building a redis storage system in the system; the system is a life insurance system;
the storage and calling module is used for storing intermediate data and calling the intermediate data through the redis storage system in the process of making the vehicle insurance data list by the system so as to finish interactive operation with the associated service system; the storage and call module comprises:
the calling unit is used for calling an interface of the associated service system according to the requirement of the vehicle insurance data bill making in the process of the vehicle insurance data bill making of the system; the associated business system is a production risk system;
a reading unit for reading intermediate data from the redis storage system;
and the transmission unit is used for transmitting the intermediate data to the service system through the interface so that the service system can process and logically judge the intermediate data.
5. The data storage and retrieval apparatus of claim 4, wherein the storage and retrieval module further comprises:
a receiving unit, configured to receive, through the interface, a processing result returned by the service system;
and the storage unit is used for storing the processing result into the redis storage system.
6. The data storage and retrieval apparatus of claim 4 or 5, wherein the redis storage system stores the intermediate data in a cluster manner, and the intermediate data is mutually backed up between the servers in the cluster.
CN201610574602.7A 2016-07-20 2016-07-20 Data storage and calling method and device Active CN107644020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610574602.7A CN107644020B (en) 2016-07-20 2016-07-20 Data storage and calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610574602.7A CN107644020B (en) 2016-07-20 2016-07-20 Data storage and calling method and device

Publications (2)

Publication Number Publication Date
CN107644020A CN107644020A (en) 2018-01-30
CN107644020B true CN107644020B (en) 2020-07-28

Family

ID=61109605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610574602.7A Active CN107644020B (en) 2016-07-20 2016-07-20 Data storage and calling method and device

Country Status (1)

Country Link
CN (1) CN107644020B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334380A (en) * 2018-01-19 2018-07-27 新智云数据服务有限公司 A kind of configuration item management method, device, terminal and computer readable storage medium
CN109240946A (en) * 2018-09-06 2019-01-18 平安科技(深圳)有限公司 The multi-level buffer method and terminal device of data
CN109299143B (en) * 2018-11-28 2022-03-22 重庆邮电大学 Knowledge fast indexing method of data interoperation test knowledge base based on Redis cache

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699718B (en) * 2013-12-10 2019-04-12 阿里巴巴集团控股有限公司 Method and apparatus for being rapidly introduced into business datum
CN103886079B (en) * 2014-03-26 2018-03-30 北京京东尚科信息技术有限公司 A kind of data processing method and system
CN105446896B (en) * 2014-08-29 2018-05-04 国际商业机器公司 The buffer memory management method and device of MapReduce application

Also Published As

Publication number Publication date
CN107644020A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
CN103544153B (en) A kind of data-updating method based on data base and system
US9280370B2 (en) System structure management device, system structure management method, and program
CN104573093B (en) A kind of method and apparatus for managing file directory
CN106095622A (en) Data back up method and device
CN111163130A (en) Network service system and data transmission method thereof
CN107644020B (en) Data storage and calling method and device
CN109032796B (en) Data processing method and device
CN109885786A (en) Data buffer storage processing method, device, electronic equipment and readable storage medium storing program for executing
CN104657435A (en) Storage management method for application data and network management system
CN104881454A (en) Updating method and system of parameter
CN111611249A (en) Data management method, device, equipment and storage medium
CN111784318A (en) Data processing method and device, electronic equipment and storage medium
US11178197B2 (en) Idempotent processing of data streams
CN103428260A (en) System and method for allocating server to terminal and efficiently delivering messages to the terminal
CN110992011A (en) Data splitting method and device, electronic equipment and storage medium
CN110377645A (en) Be related to block chain thumbs up data sharing method and its system
KR20120073799A (en) Data synchronizing and servicing apparatus and method based on cloud storage
CN108376314B (en) Material allocation method, device, server and storage medium
CN111212138A (en) Cross-site storage system and data information access method
CN110472977A (en) A kind of the transaction record generation method and relevant device of block chain
CN117472617B (en) Message processing method and device, electronic equipment and readable storage medium
CN116820354B (en) Data storage method, data storage device and data storage system
CN113886078B (en) Method and device for realizing quota unified management based on dynamic threshold mechanism, electronic equipment and computer readable storage medium
US11269736B2 (en) Method to manage database failure
CN116909684A (en) Deployment method and device of low-code application, computer equipment and storage medium

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