WO2019001271A1 - 开发平台装置、获取保单号的方法及计算机可读存储介质 - Google Patents

开发平台装置、获取保单号的方法及计算机可读存储介质 Download PDF

Info

Publication number
WO2019001271A1
WO2019001271A1 PCT/CN2018/090902 CN2018090902W WO2019001271A1 WO 2019001271 A1 WO2019001271 A1 WO 2019001271A1 CN 2018090902 W CN2018090902 W CN 2018090902W WO 2019001271 A1 WO2019001271 A1 WO 2019001271A1
Authority
WO
WIPO (PCT)
Prior art keywords
policy number
database
distributed cache
generated
stored
Prior art date
Application number
PCT/CN2018/090902
Other languages
English (en)
French (fr)
Inventor
李小培
毛才斐
刘平刚
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019001271A1 publication Critical patent/WO2019001271A1/zh

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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Definitions

  • FIG. 2 is a schematic diagram of an optional hardware architecture of the platform device 1 of FIG. 1.
  • the development platform device 1 may include, but is not limited to, a processing system 10 and a memory that can be communicably connected to each other through a system bus. 11. Processor 12. It is to be noted that FIG. 2 only shows the development platform apparatus 1 having the components 10-12, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 may also be an external storage device of the development platform device 1, such as a plug-in hard disk (Smart Media Card, SMC) equipped on the development platform device 1, Secure Digital (SD) card, Flash Card, etc.
  • the memory 11 can also include both the internal storage unit of the development platform device 1 and its external storage device.
  • the memory 11 is generally used to store an operating system and various types of application software installed on the development platform device 1, such as program code of the processing system 10. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the external cooperation system may be integrated in the open platform device 1 or integrated in other devices.
  • the external cooperation system transmits a request for generating a policy number to the development platform device 1 via the network, and the open platform device 1 periodically scans its distributed cache 4 and database 3 upon receiving the request.
  • the open platform device 1 simulates an asynchronous task based on the Timer timer and the NAS shared file lock principle. Specifically, first, the start timing and the time interval of the Timer timer are preset, and the NAS shared file lock principle is asynchronous at the start timing. Scan distributed cache 4 and database 3, wait after scanning, Timer timer counts, when the time interval is reached, asynchronously scan distributed cache 4 and database 3 again by using NAS shared file lock principle, and so on. The distributed cache 4 and the database 3 are synchronously scanned at a time, and after scanning, whether the current state of the database 3 is available or not, and whether the distributed cache 4 stores data is known.
  • the database 3 When the database 3 is in the available state, it can further analyze whether it stores the policy number; when the database 3 is in the unavailable state, it cannot analyze whether it has the policy number stored. There are various cases in which the database 3 is in an unavailable state, such as a storage failure or a network failure. When the scan to the database 3 is in an unavailable state, it is analyzed whether a pre-generated policy number is stored in the distributed cache 4. Among them, the distributed cache 4 has a large storage space, including memory and disk. After the billing system 5 generates the policy number, the generated policy number can be stored in its memory or disk.
  • Step S3 if the pre-generated policy number is stored in the distributed cache, the policy number is sent to the external cooperation system;
  • Step S4 If the pre-generated policy number is not stored in the distributed cache, the preset policy number interface is invoked, and the policy number generated by the billing system is obtained through the policy number interface, and the obtained policy number is sent. Give external cooperation systems.
  • the open platform device 1 can directly send the stored policy number to the external cooperation system, so that the external cooperation system can obtain the generated policy number in time. If the pre-generated policy number is not stored in the distributed cache 4, the open platform device 1 invokes the preset policy number interface, and obtains the policy number generated by the billing system through the policy number interface, thereby finally enabling the external cooperation system to be timely Get the generated policy number.
  • the method further includes:
  • Step S6 If the pre-generated policy number is stored in the distributed cache, send the policy number in the distributed cache to the external cooperation system.
  • the scan to the database 3 is in an available state, whether the pre-generated policy number is stored in the database 3 and the distributed cache 4 is simultaneously analyzed, and if the pre-generated policy number is stored in the distributed cache 4, it is opened.
  • the platform device 1 directly sends the policy number in the distributed cache 4 to the external cooperation system 2, and does not perform any processing on the policy number in the database 3; if the pre-generated policy number is not stored in the distributed cache 4, the database 3 If the storage is stored, the policy number in the database 3 is first moved into the distributed cache 4, and the open platform device 1 sends the moved policy number in the distributed cache 4 to the external cooperation system 2, by this method.
  • the pressure on accessing the database 3 is alleviated, and the manner in which the open platform device 1 transmits the moved policy number in the distributed cache 4 to the external cooperation system 2 is faster, so that the external cooperation system can quickly obtain the policy number. .
  • the method further includes:
  • step S4 is performed.
  • the platform device 1 needs to invoke the preset policy number interface, and the policy number is passed.
  • the interface obtains the policy number generated by the billing system immediately, and finally enables the external cooperation system to obtain the generated policy number in time.
  • Step S1 when receiving the request for generating the policy number initiated by the external cooperation system, periodically scanning the distributed cache and the database;
  • the billing system 5 may store the policy number only in its database, or store the policy number only in its distributed cache, or store the policy number in the database and Distributed cache.
  • the database 3 When the database 3 is in the available state, it can further analyze whether it stores the policy number; when the database 3 is in the unavailable state, it cannot analyze whether it stores the policy number. There are various cases in which the database 3 is in an unavailable state, such as a storage failure or a network failure. When the scan to the database 3 is in an unavailable state, it is analyzed whether or not the pre-generated policy number is stored in the distributed cache 4. Among them, the distributed cache 4 has a large storage space, including memory and disk. After the billing system 5 generates the policy number, the generated policy number can be stored in its memory or disk.
  • Step S3 if the pre-generated policy number is stored in the distributed cache, the policy number is sent to the external cooperation system;
  • Step S4 If the pre-generated policy number is not stored in the distributed cache, the preset policy number interface is invoked, and the policy number generated by the billing system is obtained through the policy number interface, and the obtained policy number is sent. Give external cooperation systems.
  • the open platform device 1 can directly send the stored policy number to the external cooperation system, so that the external cooperation system can obtain the generated policy number in time. If the pre-generated policy number is not stored in the distributed cache 4, the open platform device 1 invokes the preset policy number interface, and obtains the policy number generated by the billing system through the policy number interface, thereby finally enabling the external cooperation system to be timely Get the generated policy number.
  • the external cooperation system when the external cooperation system requests the policy number from the open platform device, when the database is in an unavailable state, it can analyze whether the pre-generated policy number is stored in the distributed cache, and if so, the distribution may be The policy number in the cache is sent to the external cooperation system. If not, the default policy number interface is called, the policy number generated by the billing system is obtained through the policy number interface, and the obtained policy number is sent to the external cooperation system. In this embodiment, when the database of the open platform device is unavailable, the policy number can still be obtained and fed back to the external cooperation system, so that the external cooperation system can be issued at any time to avoid customer loss.
  • the method further includes:
  • the scan to the database 3 is in an available state, whether the pre-generated policy number is stored in the database 3 and the distributed cache 4 is simultaneously analyzed, and if the pre-generated policy number is stored in the distributed cache 4, it is opened.
  • the platform device 1 directly sends the policy number in the distributed cache 4 to the external cooperation system 2, and does not perform any processing on the policy number in the database 3; if the pre-generated policy number is not stored in the distributed cache 4, the database 3 If the storage is stored, the policy number in the database 3 is first moved into the distributed cache 4, and the open platform device 1 sends the moved policy number in the distributed cache 4 to the external cooperation system 2, by this method.
  • the pressure on accessing the database 3 is alleviated, and the manner in which the open platform device 1 transmits the moved policy number in the distributed cache 4 to the external cooperation system 2 is faster, so that the external cooperation system can quickly obtain the policy number. .
  • the method further includes: if the pre-generated policy number is not stored in the distributed cache and the database, executing the Step S4.
  • the platform device 1 needs to invoke the preset policy number interface, and the policy number is passed.
  • the interface obtains the policy number generated by the billing system immediately, and finally enables the external cooperation system to obtain the generated policy number in time.
  • the step of generating the policy number by the billing system includes: the billing system querying the distributed document storage database mongo dB to obtain the distributed document Stores the policy number generated in the database mongo dB based on the sequence of numbers.
  • the billing system using the distributed document storage database mongo dB needs to install the mongo dB driver package and add the configuration file related to the mongo dB database information to ensure that the billing system can access the distributed document storage database mongo dB.
  • the policy number is composed of one-digit document type, six-digit ordering agency code (when the number of digits is insufficient, the right side is filled with zero), two-digit database labeling, and an 11-digit sequence.
  • the billing system uses the distributed document storage database mongo dB.
  • the sequence table is used to generate an 11-bit random number.
  • the sequence table is a table for storing a sequence of numbers automatically added by the database system according to certain rules.
  • the table is controlled by the database system.
  • the database system can be based on the current record size plus the step size at any time. Get the next record in the table, and each record will not be repeated.
  • the billing system queries the distributed document storage database mongo dB to obtain an 11-bit random number.
  • the 11-digit random number is combined with the other 9 digits as the policy number, so the obtained policy number will not be repeated, that is, each policy number Not the same.
  • the policy number is stored in the distributed cache and/or database.
  • the open platform device 1 receives the high concurrent request of the external cooperation system, generating the policy number based on the distributed document storage database mongo dB does not cause the same user to obtain the same policy. number.
  • the present application also provides a computer readable storage medium having stored thereon a processing system that, when executed by a processor, implements the steps of the method of obtaining a policy number as described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种开放平台装置(1)、获取保单号的方法及计算机可读存储介质,开放平台装置(1)包括:存储器(11)、处理器(12)及处理系统(10),处理系统(10)被处理器(12)执行时实现如下步骤:在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库(S1);当扫描到数据库处于不可用状态时,分析分布式缓存中是否存储有预先生成的保单号(S2);若是,则将保单号发送给外部合作系统(S3);若否,则调用预设的保单号接口,通过保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统(S4)。所述开放平台装置(1)的数据库(3)处于不可用状态时,仍可以及时获取到保单号并反馈给外部合作系统(2),保证外部合作系统(2)在任何时间均可以出单,避免客户流失。

Description

开发平台装置、获取保单号的方法及计算机可读存储介质
本申请要求于2017年6月25日提交中国专利局,申请号为201710490393.2、发明名称为“开发平台装置、获取保单号的方法及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种开发平台装置、获取保单号的方法及计算机可读存储介质。
背景技术
目前,外部合作系统通过开放平台获取保单号,而开放平台需实时访问开放平台的数据库以获取到出单系统生成的保单号,然后将获取的保单号返回给外部合作系统。当开放平台的数据库不能访问时,将造成外部合作系统无法按照正常流程及时得到保单号,外部合作系统无法进行出单,导致业务无法办理,造成客户的流失。
发明内容
本申请的目的在于提供一种开发平台装置、获取保单号的方法及计算机可读存储介质,旨在实现在数据库不可用状态下外部合作系统仍可以正常、及时出单,避免客户流失。
为实现上述目的,本申请提供一种开放平台装置,所述开放平台装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是否存储有预先生成的保单号;
S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
为实现上述目的,本申请还提供一种获取保单号的方法,所述获取保单号的方法包括:
S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是否存储有预先生成的保单号;
S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现如上述的获取保单号的方法的步骤。
本申请的有益效果是:本申请在外部合作系统向开放平台装置请求保单号,数据库处于不可用状态时,可分析分布式缓存中是否存储有预先生成的保单号,如果有,可以将分布式缓存中的保单号发送给外部合作系统,如果没有,则调用预设的保单号接口,通过保单号接口获取出单系统生成的保单 号,将获取的保单号发送给外部合作系统。本申请在开放平台装置的数据库处于不可用状态时,仍可以及时获取到保单号并反馈给外部合作系统,保证外部合作系统在任何时间均可以正常出单,避免客户流失。
附图说明
图1为本申请各个实施例一可选的应用环境示意图;
图2是图1中开发平台装置一实施例的硬件架构的示意图;
图3为本申请获取保单号的方法第一实施例的流程示意图;
图4为本申请获取保单号的方法第二实施例的流程示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1,是本申请各个实施例一可选的应用环境示意图。
在本实施例中,本申请可应用于包括,但不仅限于,开发平台装置1、 外部合作系统2、数据库3、分布式缓存4及出单系统5的应用环境中。其中,所述开发平台装置1可以是笔记本电脑、PDA(个人数字助理)、PAD(平板电脑)等等的可移动设备,以及诸如数字TV、台式计算机、笔记本、服务器等等的固定终端。其中,外部合作系统2可以是车险系统、寿险系统等等。其中,所述开发平台装置1与一个或多个外部合作系统2通信连接。
参阅图2,是图1中开发平台装置1一可选的硬件架构的示意图,本实施例中,开发平台装置1可包括,但不仅限于,可通过系统总线相互通信连接的处理系统10、存储器11、处理器12。需要指出的是,图2仅示出了具有组件10-12的开发平台装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述开发平台装置1的内部存储单元,例如该开发平台装置1的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述开发平台装置1的外部存储设备,例如该开发平台装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述开发平台装置1的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述开发平台装置1的操作系统和各类应用软件,例如所述处理系统10的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器12在一些实施例中可以是中央处理器(Central Processing  Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述开发平台装置1的总体操作,例如执行与所述外部合作系统2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述处理系统10等。
其中,上述处理系统10被所述处理器12执行时实现如下步骤:
步骤S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
本实施例中,外部合作系统可以集成在开放平台装置1中,也可以集成在其他装置中。外部合作系统通过网络将生成保单号的请求发送给开发平台装置1,开放平台装置1在接收到该请求时,定时扫描其分布式缓存4及数据库3。
优选地,开放平台装置1基于Timer计时器和NAS共享文件锁原理模拟异步任务,具体地,首先预设Timer计时器的开始计时时刻及计时时间间隔,在开始计时时刻利用NAS共享文件锁原理异步扫描分布式缓存4及数据库3,扫描后进行等待,Timer计时器进行计时,当达到计时时间间隔时,再次利用NAS共享文件锁原理异步扫描分布式缓存4及数据库3,以此类推,以实现定时异步扫描分布式缓存4及数据库3,扫描后能够获知数据库3当前的状态是可用状态还是不可用状态,且获知分布式缓存4是否存储有数据。
步骤S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是否存储有预先生成的保单号;
本实施例中,出单系统5在生成保单号后,可将保单号只存储在其数据库中,也可将保单号只存储在其分布式缓存中,也可将保单号分别存储在数据库及分布式缓存中。
数据库3处于可用状态时可以进一步分析其是否存储有保单号;数据库 3处于不可用状态时无法分析其是否存储有保单号。其中,数据库3处于不可用状态的情况有多种,例如出现存储故障或者出现网络故障等等。当扫描到数据库3处于不可用状态时,分析分布式缓存4中是否存储有预先生成的保单号。其中,分布式缓存4具有大容量的存储空间,包括内存及磁盘。在出单系统5生成保单号后,可以将生成的保单号存储在其内存或磁盘中。
步骤S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
步骤S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
如果分布式缓存4中存储有预先生成的保单号时,开放平台装置1可以直接将所存储的保单号发送给外部合作系统,使得外部合作系统能够及时获取到生成的保单号。如果分布式缓存4中未存储有预先生成的保单号,则开放平台装置1调用预设的保单号接口,通过该保单号接口获取出单系统即时生成的保单号,最终使得外部合作系统能够及时获取到生成的保单号。
与现有技术相比,本实施例在外部合作系统向开放平台装置请求保单号,数据库处于不可用状态时,可分析分布式缓存中是否存储有预先生成的保单号,如果有,可以将分布式缓存中的保单号发送给外部合作系统,如果没有,则调用预设的保单号接口,通过保单号接口获取出单系统生成的保单号,将获取的保单号发送给外部合作系统。本实施例在开放平台装置的数据库处于不可用状态时,仍可以及时获取到保单号并反馈给外部合作系统,保证外部合作系统在任何时间均可以正常出单,避免客户流失。
在一优选的实施例中,所述处理系统10被所述处理器12执行实现所述步骤S1之后,还包括:
步骤S5,当扫描到所述数据库处于可用状态时,分析所述数据库及分布式缓存中是否存储有预先生成的保单号。
步骤S6,若所述分布式缓存中存储有预先生成的保单号,则将所述分布式缓存中的保单号发送给外部合作系统。
步骤S7,若所述分布式缓存中未存储有预先生成的保单号,所述数据库中存储有预先生成的保单号,则将所述保单号从所述数据库中移入所述分布式缓存中,并将所述分布式缓存中的保单号发送给外部合作系统。
本实施例中,在扫描到数据库3处于可用状态时,同时分析数据库3及分布式缓存4中是否存储有预先生成的保单号,如果分布式缓存4中存储有预先生成的保单号,则开放平台装置1直接将分布式缓存4中的保单号发送给外部合作系统2,而对数据库3中的保单号不做任何处理;如果分布式缓存4中未存储有预先生成的保单号但数据库3中存储有,则先将数据库3中的保单号移入分布式缓存4中,并由开放平台装置1将所移入的在分布式缓存4中的保单号发送给外部合作系统2,通过这种方式,减轻对数据库3访问的压力,且由开放平台装置1将所移入的在分布式缓存4中的保单号发送给外部合作系统2的方式速度较快,使得外部合作系统能够快速获取到保单号。
在一优选的实施例中,所述处理系统10被所述处理器12执行实现所述步骤S5之后,还包括:
若所述分布式缓存及数据库中均未存储有预先生成的保单号,则执行所述步骤S4。
本实施例中,如果数据库3处于可用状态时,但是分布式缓存4及数据库3中均未存储有预先生成的保单号,则需要放平台装置1调用预设的保单号接口,通过该保单号接口获取出单系统即时生成的保单号,最终使得外部 合作系统能够及时获取到生成的保单号。
如图3所示,图3为本申请获取保单号的方法一实施例的流程示意图,该获取保单号的方法包括以下步骤:
步骤S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
本实施例中,外部合作系统可以集成在开放平台装置1中,也可以集成在其他装置中。外部合作系统通过网络将生成保单号的请求发送给开发平台装置1,开放平台装置1在接收到该请求时,定时扫描其分布式缓存4及数据库3。
优选地,开放平台装置1基于Timer计时器和NAS共享文件锁原理模拟异步任务,具体地,首先预设Timer计时器的开始计时时刻及计时时间间隔,在开始计时时刻利用NAS共享文件锁原理异步扫描分布式缓存4及数据库3,扫描后进行等待,Timer计时器进行计时,当达到计时时间间隔时,再次利用NAS共享文件锁原理异步扫描分布式缓存4及数据库3,以此类推,以实现定时异步扫描分布式缓存4及数据库3,扫描后能够获知数据库3当前的状态是可用状态还是不可用状态,且获知分布式缓存4是否存储有数据。
步骤S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是否存储有预先生成的保单号;
本实施例中,出单系统5在生成保单号后,可将保单号只存储在其数据库中,也可将保单号只存储在其分布式缓存中,也可将保单号分别存储在数据库及分布式缓存中。
数据库3处于可用状态时可以进一步分析其是否存储有保单号;数据库3处于不可用状态时无法分析其是否存储有保单号。其中,数据库3处于不可用状态的情况有多种,例如出现存储故障或者出现网络故障等等。当扫描 到数据库3处于不可用状态时,分析分布式缓存4中是否存储有预先生成的保单号。其中,分布式缓存4具有大容量的存储空间,包括内存及磁盘。在出单系统5生成保单号后,可以将生成的保单号存储在其内存或磁盘中。
步骤S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
步骤S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
如果分布式缓存4中存储有预先生成的保单号时,开放平台装置1可以直接将所存储的保单号发送给外部合作系统,使得外部合作系统能够及时获取到生成的保单号。如果分布式缓存4中未存储有预先生成的保单号,则开放平台装置1调用预设的保单号接口,通过该保单号接口获取出单系统即时生成的保单号,最终使得外部合作系统能够及时获取到生成的保单号。
与现有技术相比,本实施例在外部合作系统向开放平台装置请求保单号,数据库处于不可用状态时,可分析分布式缓存中是否存储有预先生成的保单号,如果有,可以将分布式缓存中的保单号发送给外部合作系统,如果没有,则调用预设的保单号接口,通过保单号接口获取出单系统生成的保单号,将获取的保单号发送给外部合作系统。本实施例在开放平台装置的数据库处于不可用状态时,仍可以获取到保单号并反馈给外部合作系统,保证外部合作系统在任何时间均可以出单,避免客户流失。
在一优选的实施例中,如图4所示,在图3的实施例的基础上,所述步骤S1之后还包括:
S5,当扫描到所述数据库处于可用状态时,分析所述数据库及分布式缓存中是否存储有预先生成的保单号;
S6,若所述分布式缓存中存储有预先生成的保单号,则将所述分布式缓存中的保单号发送给外部合作系统;
S7,若所述分布式缓存中未存储有预先生成的保单号,所述数据库中存储有预先生成的保单号,则将所述保单号从所述数据库中移入所述分布式缓存中,并将所述分布式缓存中的保单号发送给外部合作系统。
本实施例中,在扫描到数据库3处于可用状态时,同时分析数据库3及分布式缓存4中是否存储有预先生成的保单号,如果分布式缓存4中存储有预先生成的保单号,则开放平台装置1直接将分布式缓存4中的保单号发送给外部合作系统2,而对数据库3中的保单号不做任何处理;如果分布式缓存4中未存储有预先生成的保单号但数据库3中存储有,则先将数据库3中的保单号移入分布式缓存4中,并由开放平台装置1将所移入的在分布式缓存4中的保单号发送给外部合作系统2,通过这种方式,减轻对数据库3访问的压力,且由开放平台装置1将所移入的在分布式缓存4中的保单号发送给外部合作系统2的方式速度较快,使得外部合作系统能够快速获取到保单号。
在一优选的实施例中,在图4的实施例的基础上,所述步骤S5之后,还包括:若所述分布式缓存及数据库中均未存储有预先生成的保单号,则执行所述步骤S4。
本实施例中,如果数据库3处于可用状态时,但是分布式缓存4及数据库3中均未存储有预先生成的保单号,则需要放平台装置1调用预设的保单号接口,通过该保单号接口获取出单系统即时生成的保单号,最终使得外部合作系统能够及时获取到生成的保单号。
在一优选的实施例中,在上述的实施例的基础上,所述出单系统生成保 单号的步骤包括:所述出单系统查询分布式文档存储数据库mongo dB,以获取所述分布式文档存储数据库mongo dB中基于数字序列sequence生成的保单号。
其中,使用分布式文档存储数据库mongo dB的出单系统需安装mongo dB驱动包并增加包含mongo dB数据库信息相关的配置文件,以确保出单系统可以访问分布式文档存储数据库mongo dB。
其中,保单号由1位单证类型、6位出单机构编码(位数不够时右边补0)、2位数据库标示、11位数字序列组成,出单系统使用分布式文档存储数据库mongo dB中的sequence表来生成11位随机数,sequence表为存放数据库系统按照一定规则自动增加的数字序列的表,该表受数据库系统控制,任何时候数据库系统都可以根据当前记录数大小加上步长来获取到该表下一条记录应该是多少,每条记录都不会重复。出单系统查询分布式文档存储数据库mongo dB后得到11位随机数,该11位随机数与其他9位数字组合后作为保单号,因此所得到的保单号也不会重复,即每个保单号都不相同。另外,出单系统查询得到保单号后,将保单号存储于分布式缓存及/或数据库中。
本实施例中,随着外部合作系统增加,如果开放平台装置1接收到外部合作系统的高并发请求时,基于分布式文档存储数据库mongo dB生成保单号,不会导致同一个用户得到相同的保单号。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现上述的获取保单号的方法的步骤。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述 实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种开放平台装置,其特征在于,所述开放平台装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
    S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
    S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是否存储有预先生成的保单号;
    S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
    S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
  2. 根据权利要求1所述的开放平台装置,其特征在于,所述处理系统被所述处理器执行实现所述步骤S1之后,还包括:
    S5,当扫描到所述数据库处于可用状态时,分析所述数据库及分布式缓存中是否存储有预先生成的保单号;
    S6,若所述分布式缓存中存储有预先生成的保单号,则将所述分布式缓存中的保单号发送给外部合作系统;
    S7,若所述分布式缓存中未存储有预先生成的保单号,所述数据库中存储有预先生成的保单号,则将所述保单号从所述数据库中移入所述分布式缓存中,并将所述分布式缓存中的保单号发送给外部合作系统。
  3. 根据权利要求2所述的开放平台装置,其特征在于,所述处理系统被所述处理器执行实现所述步骤S5之后,还包括:
    若所述分布式缓存及数据库中均未存储有预先生成的保单号,则执行所述步骤S4。
  4. 根据权利要求1所述的开放平台装置,其特征在于,所述处理系统被所述处理器执行实现所述步骤S1时,具体包括:
    开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布式缓存及数据库。
  5. 根据权利要求2所述的开放平台装置,其特征在于,所述处理系统被所述处理器执行实现所述步骤S1时,具体包括:
    开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布式缓存及数据库。
  6. 根据权利要求3所述的开放平台装置,其特征在于,所述处理系统被所述处理器执行实现所述步骤S1时,具体包括:
    开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布式缓存及数据库。
  7. 根据权利要求1至6任一项所述的开放平台装置,其特征在于,所述出单系统生成保单号的步骤包括:
    所述出单系统查询分布式文档存储数据库mongo dB,以获取所述分布式文档存储数据库mongo dB中基于数字序列sequence生成的保单号。
  8. 一种获取保单号的方法,其特征在于,所述获取保单号的方法包括:
    S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
    S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是 否存储有预先生成的保单号;
    S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
    S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
  9. 根据权利要求8所述的获取保单号的方法,其特征在于,所述步骤S1之后,还包括:
    S5,当扫描到所述数据库处于可用状态时,分析所述数据库及分布式缓存中是否存储有预先生成的保单号;
    S6,若所述分布式缓存中存储有预先生成的保单号,则将所述分布式缓存中的保单号发送给外部合作系统;
    S7,若所述分布式缓存中未存储有预先生成的保单号,所述数据库中存储有预先生成的保单号,则将所述保单号从所述数据库中移入所述分布式缓存中,并将所述分布式缓存中的保单号发送给外部合作系统。
  10. 根据权利要求9所述的获取保单号的方法,其特征在于,所述步骤S5之后,还包括:若所述分布式缓存及数据库中均未存储有预先生成的保单号,则执行所述步骤S4。
  11. 根据权利要求8所述的获取保单号的方法,其特征在于,所述步骤S1包括:开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布式缓存及数据库。
  12. 根据权利要求9所述的获取保单号的方法,其特征在于,所述步骤S1包括:开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布 式缓存及数据库。
  13. 根据权利要求10所述的获取保单号的方法,其特征在于,所述步骤S1包括:开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布式缓存及数据库。
  14. 根据权利要求8至13任一项所述的获取保单号的方法,其特征在于,所述出单系统生成保单号的步骤包括:
    所述出单系统查询分布式文档存储数据库mongo dB,以获取所述分布式文档存储数据库mongo dB中基于数字序列sequence生成的保单号。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现如下步骤:
    S1,在接收到外部合作系统发起的生成保单号的请求时,定时扫描分布式缓存及数据库;
    S2,当扫描到所述数据库处于不可用状态时,分析所述分布式缓存中是否存储有预先生成的保单号;
    S3,若所述分布式缓存中存储有预先生成的保单号,则将所述保单号发送给外部合作系统;
    S4,若所述分布式缓存中未存储有预先生成的保单号,则调用预设的保单号接口,通过所述保单号接口获取出单系统生成的保单号,并将获取的保单号发送给外部合作系统。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述步骤S1之后,还包括:
    S5,当扫描到所述数据库处于可用状态时,分析所述数据库及分布式缓存中是否存储有预先生成的保单号;
    S6,若所述分布式缓存中存储有预先生成的保单号,则将所述分布式缓 存中的保单号发送给外部合作系统;
    S7,若所述分布式缓存中未存储有预先生成的保单号,所述数据库中存储有预先生成的保单号,则将所述保单号从所述数据库中移入所述分布式缓存中,并将所述分布式缓存中的保单号发送给外部合作系统。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述步骤S5之后,还包括:若所述分布式缓存及数据库中均未存储有预先生成的保单号,则执行所述步骤S4。
  18. 根据权利要求15-17任一项所述的计算机可读存储介质,其特征在于,所述步骤S1包括:开放平台在接收到外部合作系统发起的生成保单号的请求时,基于Timer计时器和NAS共享文件锁原理模拟异步任务,定时异步扫描分布式缓存及数据库。
  19. 根据权利要求15至17任一项所述的计算机可读存储介质,其特征在于,所述出单系统生成保单号的步骤包括:
    所述出单系统查询分布式文档存储数据库mongo dB,以获取所述分布式文档存储数据库mongo dB中基于数字序列sequence生成的保单号。
  20. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述出单系统生成保单号的步骤包括:
    所述出单系统查询分布式文档存储数据库mongo dB,以获取所述分布式文档存储数据库mongo dB中基于数字序列sequence生成的保单号。
PCT/CN2018/090902 2017-06-25 2018-06-12 开发平台装置、获取保单号的方法及计算机可读存储介质 WO2019001271A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710490393.2 2017-06-25
CN201710490393.2A CN108428182B (zh) 2017-06-25 2017-06-25 开发平台装置、获取保单号的方法及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019001271A1 true WO2019001271A1 (zh) 2019-01-03

Family

ID=63155423

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090902 WO2019001271A1 (zh) 2017-06-25 2018-06-12 开发平台装置、获取保单号的方法及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN108428182B (zh)
WO (1) WO2019001271A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109670975B (zh) * 2018-12-17 2021-02-05 泰康保险集团股份有限公司 计算机系统中生成单号的方法、介质及电子设备
CN110659258A (zh) * 2019-09-06 2020-01-07 平安普惠企业管理有限公司 单证生成方法、系统、计算机设备和计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120470A1 (en) * 2006-11-21 2008-05-22 Microsoft Corporation Enforced transaction system recoverability on media without write-through
US20140032981A1 (en) * 2012-07-26 2014-01-30 Apple Inc. Intermediate database management layer
CN106204000A (zh) * 2016-07-05 2016-12-07 康存乐付保数据科技(上海)有限公司 一种服务消费支付信息处理方法及系统
CN106326293A (zh) * 2015-07-01 2017-01-11 阿里巴巴集团控股有限公司 基于动态网页的访问方法及装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941310B2 (en) * 2002-07-17 2005-09-06 Oracle International Corp. System and method for caching data for a mobile application
US20070300243A1 (en) * 2006-06-22 2007-12-27 Sap Portals Israel Ltd. Modular caching method and system for enabling offline functionality of server-client systems
CN101576918B (zh) * 2009-06-19 2012-11-28 用友软件股份有限公司 具备负载均衡功能的数据缓存系统
CN101706781B (zh) * 2009-09-29 2012-03-07 北京星网锐捷网络技术有限公司 一种数据库缓存集中管理方法和系统
CN102063427A (zh) * 2009-11-12 2011-05-18 中兴通讯股份有限公司 分布式数据库系统中的异常处理系统及方法
CN103716375A (zh) * 2013-12-05 2014-04-09 北京用友政务软件有限公司 基于分布式缓存的多级财政数据交互方法及系统
CN104717262A (zh) * 2013-12-13 2015-06-17 中国移动通信集团辽宁有限公司 一种企业通讯录下载方法及系统
CN105468707A (zh) * 2015-11-19 2016-04-06 北京锐安科技有限公司 一种基于缓存的数据处理方法及装置
CN106384290B (zh) * 2016-08-31 2020-05-12 泰康保险集团股份有限公司 保单处理系统、方法及装置
CN106302827B (zh) * 2016-10-25 2019-09-17 聚好看科技股份有限公司 基于分布式系统的通信方法、设备及分布式系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080120470A1 (en) * 2006-11-21 2008-05-22 Microsoft Corporation Enforced transaction system recoverability on media without write-through
US20140032981A1 (en) * 2012-07-26 2014-01-30 Apple Inc. Intermediate database management layer
CN106326293A (zh) * 2015-07-01 2017-01-11 阿里巴巴集团控股有限公司 基于动态网页的访问方法及装置
CN106204000A (zh) * 2016-07-05 2016-12-07 康存乐付保数据科技(上海)有限公司 一种服务消费支付信息处理方法及系统

Also Published As

Publication number Publication date
CN108428182A (zh) 2018-08-21
CN108428182B (zh) 2021-08-24

Similar Documents

Publication Publication Date Title
WO2019140828A1 (zh) 电子装置、分布式系统日志查询方法及存储介质
US8572023B2 (en) Data services framework workflow processing
WO2019179026A1 (zh) 电子装置、集群访问域名自动生成方法及存储介质
WO2018223941A1 (zh) 多保险产品出单的装置、方法及计算机可读存储介质
JP5975501B2 (ja) コンピューティングシステムにおいてストレージデータの暗号化不要の整合性保護を促進するメカニズム
WO2020000725A1 (zh) 电子装置、数据迁移的方法及存储介质
US20130227047A1 (en) Methods for managing content stored in cloud-based storages
WO2020000720A1 (zh) 服务器、报文处理方法、程序和计算机可读存储介质
WO2019041759A1 (zh) 服务器、区块链验签解密的方法及存储介质
WO2019127893A1 (zh) 一种电子签名方法、电子装置及计算机可读存储介质
CN112819617B (zh) 数据上链方法及装置、电子设备、存储介质
CN112199442B (zh) 分布式批量下载文件方法、装置、计算机设备及存储介质
WO2019169763A1 (zh) 电子装置、业务系统风险控制方法及存储介质
US10788997B2 (en) Method and device for storage management with metadata stored in disk extents in an extent pool
WO2019001271A1 (zh) 开发平台装置、获取保单号的方法及计算机可读存储介质
CN115470156A (zh) 基于rdma的内存使用方法、系统、电子设备和存储介质
US9473565B2 (en) Data transmission for transaction processing in a networked environment
WO2019169771A1 (zh) 电子装置、访问指令信息获取方法及存储介质
US20220083507A1 (en) Trust chain for official data and documents
WO2019091023A1 (zh) 影像文件上传方法、服务器及可读存储介质
CN107657155B (zh) 用于鉴定用户操作权限的方法和装置
CN108241732B (zh) 电子装置、信息处理的方法及存储介质
CN107291628B (zh) 访问数据存储设备的方法和装置
CN114266072A (zh) 一种权限分配控制方法、装置、电子设备及存储介质
CN113722007A (zh) Vpn分支设备的配置方法、装置及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18823228

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18823228

Country of ref document: EP

Kind code of ref document: A1