CN108009245A - Value of the product acquisition methods, device, computer equipment and storage medium - Google Patents
Value of the product acquisition methods, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN108009245A CN108009245A CN201711240711.6A CN201711240711A CN108009245A CN 108009245 A CN108009245 A CN 108009245A CN 201711240711 A CN201711240711 A CN 201711240711A CN 108009245 A CN108009245 A CN 108009245A
- Authority
- CN
- China
- Prior art keywords
- product
- value
- data
- control data
- information
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24539—Query rewriting; Transformation using cached or materialised query results
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/08—Insurance
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Entrepreneurship & Innovation (AREA)
- Educational Administration (AREA)
- Game Theory and Decision Science (AREA)
- General Engineering & Computer Science (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Technology Law (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明涉及一种产品价值获取方法、装置、计算机设备及存储介质。方法包括:接收终端发送的产品价值获取请求,产品价值获取请求中携带产品信息和用户信息;从缓存的静态数据区中获取产品价值组合表;根据产品价值组合表从产品信息中提取对应的产品信息值;根据产品价值组合表从用户信息中提取对应的用户信息值;从产品价值组合表中查找与提取的产品信息值和用户信息值对应的初始产品价值;从缓存的动态数据区中查找与产品信息相匹配的调控数据;根据调控数据对初始产品价值进行调整;将调整后的初始产品价值返回给终端。上述独权的内容产品价值获取方法、装置、计算机设备及存储介质能够提高数据读取速率,提高价值计算的处理效率。
The invention relates to a product value acquisition method, device, computer equipment and storage medium. The method includes: receiving the product value acquisition request sent by the terminal, the product value acquisition request carrying product information and user information; obtaining the product value combination table from the cached static data area; extracting the corresponding product from the product information according to the product value combination table Information value; extract the corresponding user information value from the user information according to the product value combination table; look up the initial product value corresponding to the extracted product information value and user information value from the product value combination table; look up from the cached dynamic data area Regulatory data matching the product information; adjust the initial product value according to the regulatory data; return the adjusted initial product value to the terminal. The above exclusive content product value acquisition method, device, computer equipment and storage medium can increase the data reading rate and improve the processing efficiency of value calculation.
Description
技术领域technical field
本发明涉及计算机技术领域,特别是涉及一种产品价值获取方法、装置、计算机设备及存储介质。The present invention relates to the field of computer technology, in particular to a product value acquisition method, device, computer equipment and storage medium.
背景技术Background technique
随着互联网销售业务的增长,尤其在公司进行营销宣传活动时,有大量客户会同时集中发起对产品价值的获取请求,公司的系统需要对产品的价值进行计算,计算过程中需要调用大量数据。目前大部分公司的都是采用如Oracle,Mysql之类的关系型数据库来存储相关数据,但是在从数据库调用数据的工程中经常会出现数据库因消耗过大而死机,性能无法满足销售业务需求的情况。With the growth of Internet sales business, especially when the company conducts marketing activities, a large number of customers will simultaneously initiate requests for product value acquisition. The company's system needs to calculate the value of the product, and a large amount of data needs to be called during the calculation process. At present, most companies use relational databases such as Oracle and Mysql to store related data. However, in the project of calling data from the database, the database often crashes due to excessive consumption, and the performance cannot meet the sales business needs. Case.
发明内容Contents of the invention
基于此,有必要针对上述产品价值获取过程中出现的数据库调用数据时性能差的问题,提供一种产品价值获取方法、装置、计算机设备及存储介质。Based on this, it is necessary to provide a product value acquisition method, device, computer equipment and storage medium for the problem of poor performance when calling data from the database in the above product value acquisition process.
一种产品价值获取方法,包括以下步骤:A method for obtaining product value, comprising the following steps:
接收终端发送的产品价值获取请求,所述产品价值获取请求中携带产品信息和用户信息;receiving the product value acquisition request sent by the terminal, the product value acquisition request carrying product information and user information;
从缓存的静态数据区中获取产品价值组合表;Obtain the product value combination table from the cached static data area;
根据所述产品价值组合表从所述产品信息中提取对应的产品信息值;Extracting a corresponding product information value from the product information according to the product value combination table;
根据所述产品价值组合表从所述用户信息中提取对应的用户信息值;Extracting a corresponding user information value from the user information according to the product value combination table;
从产品价值组合表中查找与提取的所述产品信息值和用户信息值对应的初始产品价值;Finding the initial product value corresponding to the extracted product information value and user information value from the product value combination table;
从缓存的动态数据区中查找与所述产品信息相匹配的调控数据;Find regulatory data matching the product information from the cached dynamic data area;
根据所述调控数据对所述初始产品价值进行调整;adjusting the initial product value according to the control data;
将调整后的所述初始产品价值返回给所述终端。returning the adjusted initial product value to the terminal.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
当从所述缓存的动态数据区中查找到与所述产品信息相匹配的调控数据时,更新查找到的所述调控数据的查询记录;When the regulatory data matching the product information is found from the cached dynamic data area, updating the query record of the found regulatory data;
获取所述动态数据区中各调控数据的查询记录,根据所述各调控数据的查询记录对所述各调控数据进行排序。Acquiring query records of each control data in the dynamic data area, and sorting the control data according to the query records of each control data.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
当从所述缓存的动态数据区中未查找到与所述产品信息相匹配的调控数据时,从数据库中查找与所述产品信息相匹配的调控数据;When no regulatory data matching the product information is found in the cached dynamic data area, searching the database for regulatory data matching the product information;
将查找到的所述调控数据写入所述动态数据区中。Write the found control data into the dynamic data area.
在其中一个实施例中,所述将查找到的所述调控数据写入所述动态数据区中的步骤,包括:In one of the embodiments, the step of writing the found control data into the dynamic data area includes:
当所述动态数据区的存储空间已满时,删除位于所述动态数据区中预设顺序处的调控数据;When the storage space of the dynamic data area is full, delete the control data located in the preset order in the dynamic data area;
根据所述动态数据区中各调控数据的查询记录将查找到的所述调控数据写入至所述动态数据区中。Writing the found control data into the dynamic data zone according to the query record of each control data in the dynamic data zone.
在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:
当检测到所述数据库中的第一调控数据被更新时,获取所述第一调控数据对应的产品信息;When it is detected that the first regulatory data in the database is updated, acquiring product information corresponding to the first regulatory data;
从所述动态数据区中查找与所述产品信息对应的第二调控数据,并将所述第二调控数据替换为更新后的第一调控数据。Finding the second control data corresponding to the product information from the dynamic data area, and replacing the second control data with the updated first control data.
一种产品价值获取装置,所述装置包括:A product value acquisition device, said device comprising:
请求接收模块,用于接收终端发送的产品价值获取请求,所述产品价值获取请求中携带产品信息和用户信息;The request receiving module is used to receive the product value acquisition request sent by the terminal, and the product value acquisition request carries product information and user information;
价值表获取模块,用于从缓存的静态数据区中获取产品价值组合表;The value table obtaining module is used to obtain the product value combination table from the cached static data area;
产品信息值提取模块,用于根据所述产品价值组合表从所述产品信息提取对应的产品信息值;A product information value extraction module, configured to extract a corresponding product information value from the product information according to the product value combination table;
用户信息值提取模块,用于根据所述产品价值组合表从所述用户信息中提取对应的用户信息值;A user information value extraction module, configured to extract a corresponding user information value from the user information according to the product value combination table;
初始值查找模块,用于从产品价值组合表中查找与提取的所述产品信息值和用户信息值对应的初始产品价值;An initial value lookup module, configured to look up the initial product value corresponding to the extracted product information value and user information value from the product value combination table;
调控数据查找模块,用于从缓存的动态数据区中查找与所述产品信息相匹配的调控数据;A regulatory data search module, configured to search for regulatory data matching the product information from the cached dynamic data area;
数值调整模块,用于根据所述调控数据对所述初始产品价值进行调整;A value adjustment module, configured to adjust the initial product value according to the control data;
数值返回模块,用于将调整后的所述初始产品价值返回给所述终端。A value returning module, configured to return the adjusted initial product value to the terminal.
在其中一个实施例中,所述装置还包括:In one of the embodiments, the device also includes:
记录更新模块,用于当从所述缓存的动态数据区中查找到与所述产品信息相匹配的调控数据时,更新查找到的所述调控数据的查询记录;A record update module, configured to update the query record of the found control data when the control data matching the product information is found from the cached dynamic data area;
数据排序模块,用于获取所述动态数据区中各调控数据的查询记录,根据所述各调控数据的查询记录对所述各调控数据进行排序。The data sorting module is used to obtain the query records of the control data in the dynamic data area, and sort the control data according to the query records of the control data.
在其中一个实施例中,所述装置还包括:In one of the embodiments, the device also includes:
数据调用模块,用于当从所述缓存的动态数据区中未查找到与所述产品信息相匹配的调控数据时,从数据库中查找与所述产品信息相匹配的调控数据;A data calling module, configured to search the database for regulatory data matching the product information when no regulatory data matching the product information is found in the cached dynamic data area;
数据写入模块,用于将查找到的所述调控数据写入所述动态数据区中。A data writing module, configured to write the found control data into the dynamic data area.
一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。A computer device includes a memory, a processor, and a computer program stored in the memory and operable on the processor, and the processor implements the steps of the above method when executing the program.
一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are realized.
上述产品价值获取方法、装置、计算机设备及存储介质,与产品价值计算相关的且被经常调用的静态、动态数据都事先存储在缓存的静态数据区和动态数据区中,当终端发起产品价值获取请求时,根据终端发送请求中携带的产品信息和用户信息从缓存的静态数据区中获取对应的信息值,并根据产品信息从缓存的动态数据区中获取调控数据,根据信息值和调控数据得到最终的初始产品价值。从而使得当调用产品价值计算相关的数据时,可以直接从缓存中读取,无需从数据库中调用,提高了数据读取效率,并能避免数据库宕机的情况,有效提高了产品价值计算工作的工作效率。The above product value acquisition method, device, computer equipment and storage medium, the static and dynamic data related to the product value calculation and frequently called are all stored in the static data area and dynamic data area of the cache in advance, when the terminal initiates the product value acquisition When requesting, obtain the corresponding information value from the cached static data area according to the product information and user information carried in the request sent by the terminal, and obtain the control data from the cached dynamic data area according to the product information, and obtain Final initial product value. Therefore, when the data related to product value calculation is called, it can be read directly from the cache without calling from the database, which improves the efficiency of data reading, avoids database downtime, and effectively improves the efficiency of product value calculation. work efficiency.
附图说明Description of drawings
图1为一个实施例中产品价值获取方法的应用环境图;Fig. 1 is the application environment figure of product value acquisition method in an embodiment;
图2为一个实施例中产品价值获取方法的方法流程图;Fig. 2 is a method flowchart of a product value acquisition method in an embodiment;
图3为一个实施例中产品价值获取装置的结构示意图;Fig. 3 is a schematic structural diagram of a product value acquisition device in an embodiment;
图4为一个实施例中计算机设备的内部结构示意图。Fig. 4 is a schematic diagram of the internal structure of a computer device in an embodiment.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
在详细说明根据本发明的实施例前,应该注意到的是,所述的实施例主要在于与产品价值获取方法、装置、计算机设备及存储介质相关的步骤和系统组件的组合。因此,所属系统组件和方法步骤已经在附图中通过常规符号在适当的位置表示出来了,并且只示出了与理解本发明的实施例有关的细节,以免因对于得益于本发明的本领域普通技术人员而言显而易见的那些细节模糊了本发明的公开内容。Before describing the embodiments according to the present invention in detail, it should be noted that the described embodiments mainly lie in the combination of steps and system components related to the product value acquisition method, device, computer equipment and storage medium. Accordingly, pertinent system components and method steps have been indicated at appropriate places in the drawings by conventional symbols, and only details relevant to the understanding of the embodiments of the present invention have been shown so as not to cause confusion to those who would benefit from the present invention. Details that would be apparent to one of ordinary skill in the art obscure the present disclosure.
在本文中,诸如左和右,上和下,前和后,第一和第二之类的关系术语仅仅用来区分一个实体或动作与另一个实体或动作,而不一定要求或暗示这种实体或动作之间的任何实际的这种关系或顺序。术语“包括”、“包含”或任何其他变体旨在涵盖非排他性的包含,由此使得包括一系列要素的过程、方法、物品或者设备不仅包含这些要素,而且还包含没有明确列出的其他要素,或者为这种过程、方法、物品或者设备所固有的要素。In this text, relational terms such as left and right, up and down, front and back, first and second are used merely to distinguish one entity or action from another without necessarily requiring or implying such Any actual such relationship or sequence between entities or actions. The terms "comprising", "comprising" or any other variant are intended to cover a non-exclusive inclusion whereby a process, method, article or apparatus comprising a set of elements includes not only those elements but also other elements not expressly listed elements, or elements inherent in such a process, method, article, or apparatus.
本发明实施例中所提供的产品价值获取方法可以应用于如图1所示的应用环境中。服务器102与终端104通过网络连接。其中,终端104的数量可以为多个。终端104向服务器102发送产品价值获取请求,服务器102接受请求后从请求中获取产品信息和用户信息,服务器102从本地缓存的静态区域中获取产品价值组合表,并根据产品价值组合表从产品信息和用户信息中提取产品信息值和用户信息值,查找与其相对应的初始产品价值,服务器102从本地缓存的动态区域中查找于产品信息相匹配的调控数据以对初始产品价值进行调整,服务器102将调整后的初始产品价值返回给终端104。从而可以直接从缓存中读取数据,提高数据读取效率。The product value acquisition method provided in the embodiment of the present invention can be applied to the application environment shown in FIG. 1 . The server 102 and the terminal 104 are connected via a network. Wherein, the number of terminals 104 may be multiple. The terminal 104 sends a product value acquisition request to the server 102, and the server 102 obtains product information and user information from the request after accepting the request, and the server 102 obtains the product value combination table from the static area of the local cache, and obtains the product value combination table according to the product value combination table. Extract the product information value and the user information value from the user information, search for the initial product value corresponding to it, and the server 102 searches the control data matching the product information from the dynamic area of the local cache to adjust the initial product value, and the server 102 The adjusted initial product value is returned to the terminal 104 . Therefore, data can be read directly from the cache, improving data reading efficiency.
下述实施方式以产品价值获取方法应用于图1中的服务器102为例进行说明。但需要说明的是,实际应用中该方法并不仅限应用于上述服务器。The following embodiments are described by taking the product value acquisition method applied to the server 102 in FIG. 1 as an example. However, it should be noted that in practical applications, the method is not limited to the above-mentioned servers.
请参阅图2,图2为一个实施例中的产品价值获取方法的流程图,该方法具体包括以下步骤:Please refer to Fig. 2, Fig. 2 is a flowchart of a method for obtaining product value in an embodiment, the method specifically includes the following steps:
步骤210,接收终端发送的产品价值获取请求,产品价值获取请求中携带产品信息和用户信息。Step 210, receiving a product value acquisition request sent by the terminal, the product value acquisition request carrying product information and user information.
目前,越来越多的公司将自己的产品投放在互联网上进行推广和销售。用户可以通过公司的门店、代销点购买产品,也可以自行网购产品。终端可以为用户、门店、代销点等所使用的电脑等计算机设备,也可以为手机、平板电脑等智能移动终端。At present, more and more companies put their products on the Internet for promotion and sales. Users can purchase products through the company's stores and consignment outlets, or purchase products online by themselves. The terminal can be a computer device such as a computer used by a user, a store, a consignment point, etc., or an intelligent mobile terminal such as a mobile phone or a tablet computer.
现在很多产品的价值不是固定统一的,需要根据用户的个人情况以及产品的配置情况来确定保险产品的最终价值。因此,在用户购买产品之前,终端需要根据用户输入的具体信息向服务器发送产品价值获取请求,以确定产品最终的价格。例如,购买笔记本电脑等电子产品时,同一种型号的笔记本电脑会提供多种软硬件配置以使用户进行挑选和组合,如提供多种同类型的处理器、显卡、内存容量、保修年限等供用户根据自己是需求进行组合。并且,不同的配置组合还可以有不同的优惠促销活动。因此,笔记本电脑最终的价值需要综合考虑配置组合情况和优惠情况等来确定。又如,同一款保险产品,如果不同性别、年龄、身体状况的人购买则所需的投保费用是不同的,相同的投保人投保不同的标的保额所需的投保费用也不同,投保人选择不同的机构或销售渠道购买的折扣也是不同的,因此,需要根据投保人的自身信息和产品信息来确定最终的保险产品的价值。终端接收用户或者工作人员输入的用户、产品信息,并获取产品价值查询指令,终端根据接收到的用户信息和产品信息生成产品价值获取请求,并将产品价值获取请求发送给服务器。服务器接收终端发送的产品价值获取请求,并从请求中获取对应产品的产品信息和用户信息。Now the value of many products is not fixed and uniform, and the final value of insurance products needs to be determined according to the user's personal situation and product configuration. Therefore, before the user purchases the product, the terminal needs to send a product value acquisition request to the server according to the specific information input by the user, so as to determine the final price of the product. For example, when purchasing electronic products such as notebook computers, the same type of notebook computer will provide a variety of hardware and software configurations for users to choose and combine, such as providing a variety of processors of the same type, graphics cards, memory capacity, warranty years, etc. Users make combinations according to their needs. Moreover, different configuration combinations may also have different preferential promotional activities. Therefore, the final value of the notebook computer needs to be determined by comprehensively considering the configuration combination and preferential conditions. As another example, if the same insurance product is purchased by people of different genders, ages, and physical conditions, the insurance premiums required are different. The discounts purchased by different institutions or sales channels are also different. Therefore, the value of the final insurance product needs to be determined according to the policyholder's own information and product information. The terminal receives the user and product information input by the user or staff, and obtains a product value query instruction. The terminal generates a product value acquisition request according to the received user information and product information, and sends the product value acquisition request to the server. The server receives the product value acquisition request sent by the terminal, and obtains product information and user information of the corresponding product from the request.
在一个实施例中,终端发送的产品价值获取请求为产品保费获取请求,产品保费获取请求中携带保险产品的产品信息和用户信息,以请求服务器根据产品信息和用户信息计算用户需要缴纳的保险产品的保费。其中,产品信息可以包括但不限于险种代码、产品代码、投保额度、保险档次、渠道代码等信息;用户信息可以包括投保人性别、年龄、体检信息、出险情况等信息。需要说明的是,在其他实施例中,产品价值获取请求不限于对保险产品的保费计算的请求,也可以是其他在售产品的费用计算请求,产品信息和用户信息根据具体的在售产品而确定。In one embodiment, the product value acquisition request sent by the terminal is a product premium acquisition request, and the product premium acquisition request carries the product information and user information of the insurance product, so as to request the server to calculate the insurance product that the user needs to pay according to the product information and user information premium. Among them, product information may include but not limited to insurance type code, product code, insurance amount, insurance grade, channel code and other information; user information may include information such as the gender, age, medical examination information, and accident situation of the insured. It should be noted that, in other embodiments, the product value acquisition request is not limited to the request for premium calculation of insurance products, but may also be a request for fee calculation of other products on sale, and the product information and user information are determined according to the specific products on sale. Sure.
步骤220,从缓存的静态数据区中获取产品价值组合表。Step 220, obtain the product value combination table from the cached static data area.
服务器将本地的缓存分为静态数据区和动态数据区,静态数据区中存储静态数据,静态数据区可以存储与产品价值相关的参数数据,静态数据需要进行修改的频率较低,数据较为稳定,且静态数据的更新独立于动态数据。The server divides the local cache into a static data area and a dynamic data area. Static data is stored in the static data area, and parameter data related to product value can be stored in the static data area. Static data needs to be modified less frequently, and the data is more stable. And the update of static data is independent of dynamic data.
保险产品的静态数据可以包括险种表、短期险表、产品价值组合表等,终端可以根据产品代码从险种表中查找对应的险种等。产品价值组合表中可以包含多种组合信息参数,并且保存了各种组合信息参数的信息值与初始产品价值的一一对应关系。服务器从静态数据区中获取产品价值组合表。The static data of insurance products can include insurance type table, short-term insurance table, product value combination table, etc., and the terminal can look up the corresponding insurance type from the insurance type table according to the product code. The product value combination table may contain multiple combination information parameters, and stores the one-to-one correspondence between the information values of various combination information parameters and the initial product value. The server obtains the product value combination table from the static data area.
例如,产品价值组合表中的组合参数信息包括年龄、性别、保障金额、保险险种、交费方式、保障期等,请参照表1,表1列出了产品价值组合表中部分产品的组合参数的信息值与产品价值的对应关系。For example, the combination parameter information in the product value combination table includes age, gender, insurance amount, insurance type, payment method, guarantee period, etc. Please refer to Table 1, which lists the combination parameters of some products in the product value combination table The corresponding relationship between information value and product value.
表1:产品的组合参数的信息值与产品价值的对应关系表Table 1: The correspondence table between the information value of the combination parameter of the product and the value of the product
从表1可以看出,其中某个或某些组合参数的信息值发生改变就可能导致产品的初始产品价值发生改变,不同的信息值组合也可能对应于相同的初始产品价值。It can be seen from Table 1 that a change in the information value of one or some combination parameters may lead to a change in the initial product value of the product, and different information value combinations may also correspond to the same initial product value.
在一个实施例中,服务器的缓存使用Redis(Remote Dictionary Servers)存储系统。在其他实施例中,服务器的缓存也可以使用其他存储系统。In one embodiment, the cache of the server uses a Redis (Remote Dictionary Servers) storage system. In other embodiments, the cache of the server may also use other storage systems.
步骤230,根据产品价值组合表从产品信息中提取对应的产品信息值。Step 230, extract the corresponding product information value from the product information according to the product value combination table.
服务器获取产品价值组合表中的组合信息参数,组合信息参数包括产品信息参数和用户信息参数,服务器根据组合信息参数中的产品信息参数从产品信息中提取相对应的产品信息值。例如,保险产品的产品信息参数可以包括保险险种、保障金额、保障期限、渠道代码等。The server obtains the combination information parameters in the product value combination table, the combination information parameters include product information parameters and user information parameters, and the server extracts the corresponding product information value from the product information according to the product information parameters in the combination information parameters. For example, the product information parameters of an insurance product may include insurance type, guarantee amount, guarantee period, channel code, and the like.
在一个实施例中,在提取产品信息值时,服务器需要根据产品信息参数对相应的产品信息进行转换处理。例如,产品信息参数为保险档次,而产品信息中只存在保险代码,服务器可以从静态数据区的险种表中查找与保险代码相对应的保险档次。In one embodiment, when extracting the product information value, the server needs to convert the corresponding product information according to the product information parameters. For example, if the product information parameter is the insurance grade, but only the insurance code exists in the product information, the server can search the insurance grade corresponding to the insurance code from the insurance type table in the static data area.
步骤240,根据产品价值组合表从用户信息中提取对应的用户信息值。Step 240, extract the corresponding user information value from the user information according to the product value combination table.
服务器根据组合信息参数中的用户信息参数从用户信息中提取相对应的用户信息值。例如,保险产品的用户信息参数可以包括用户性别、年龄、投保关系等。The server extracts the corresponding user information value from the user information according to the user information parameter in the combined information parameter. For example, user information parameters of an insurance product may include user gender, age, insurance relationship, etc.
在一个实施例中,在提取用户信息值时,服务器需要根据用户信息参数对相应的用户信息进行转换处理。例如,用户信息参数为年龄区间,而用户信息中只存在用户年龄,服务器可以从静态数据区的年龄对照表中查找与用户年龄相对应的年龄区间,如用户年龄为38岁,其年龄区间为36岁-40岁。In an embodiment, when extracting the user information value, the server needs to convert the corresponding user information according to the user information parameter. For example, the user information parameter is an age range, but only the user's age exists in the user information. The server can search the age range corresponding to the user's age from the age comparison table in the static data area. For example, if the user is 38 years old, the age range is 36-40 years old.
步骤250,从产品价值组合表中查找与提取的产品信息值和用户信息值对应的初始产品价值。Step 250, look up the initial product value corresponding to the extracted product information value and user information value from the product value combination table.
服务器从产品信息和用户信息中提取出产品信息值与用户信息值以后,将提取出的产品信息值与用户信息值与产品价值组合表中的信息值进行比对,查找出完全匹配的信息值组合,并获取与之相对应的初始产品价值。After the server extracts the product information value and user information value from the product information and user information, it compares the extracted product information value and user information value with the information value in the product value combination table to find out the information value that exactly matches Combination, and get the corresponding initial product value.
以表1中的产品价值组合表为例来说明匹配查找的方法。请参阅表1,服务器可以先筛选出年龄匹配的信息值组合,再从其中筛选出性别相匹配的信息值组合,以此类推,逐渐缩小匹配范围,直至查找到完全匹配的信息值组合,获取相应的初始产品价值。Take the product value combination table in Table 1 as an example to illustrate the matching search method. Please refer to Table 1, the server can first filter out age-matched information value combinations, and then filter out gender-matched information value combinations, and so on, gradually narrowing down the matching range until an exact matching information value combination is found. The corresponding initial product value.
步骤260,从缓存的动态数据区中查找与产品信息相匹配的调控数据。Step 260, look for regulation data matching the product information from the cached dynamic data area.
服务器缓存的动态数据区中存储了与产品价值计算相关的调控数据,调控数据包括产品价值的调整计算规则等。如,根据产品的不同对初始产品价值进行取整、小数位四舍五入的计算,根据销售渠道的不同,对不同渠道购买的产品进行相应的优惠折扣计算。Regulatory data related to product value calculation is stored in the dynamic data area cached by the server, and the regulatory data includes product value adjustment calculation rules and the like. For example, according to different products, the initial product value is rounded up and the decimal places are rounded off, and according to different sales channels, corresponding discounts are calculated for products purchased through different channels.
由于产品的销售活动和销售计划在不断调整,因此,动态数据区中存储的调控数据也经常根据经营策略在不断进行修改和调整,相对于静态数据区来说,动态数据区中的数据进行修改的频次较高,数据相对不稳定。一般情况下,调控数据与产品代码和渠道代码相对应,服务器从产品信息中获取产品代码和渠道代码,并从动态数据区中查找与产品代码和渠道代码相对应的调控数据。Due to the constant adjustment of product sales activities and sales plans, the control data stored in the dynamic data area is also constantly being modified and adjusted according to the business strategy. Compared with the static data area, the data in the dynamic data area is modified The frequency is high, and the data is relatively unstable. Generally, the control data corresponds to the product code and the channel code, and the server obtains the product code and the channel code from the product information, and searches the dynamic data area for the control data corresponding to the product code and the channel code.
步骤270,根据调控数据对初始产品价值进行调整。Step 270, adjust the initial product value according to the control data.
由于调控数据一般为调整计算规则、计算公式等,调控数据可以包括预设的调整系数,也可以包括需要带入的参数等,如有的调控数据需要带入初始产品价值,有时还需要从产品信息中或者用户信息中提取相应的参数值带入。Since the control data are generally adjustment calculation rules, calculation formulas, etc., the control data can include preset adjustment coefficients, and can also include parameters that need to be brought in. If some control data needs to be brought into the initial product value, sometimes it needs to Extract the corresponding parameter value from the information or user information and bring it in.
服务器查找到与产品信息相匹配的调控数据后,根据查找到的调控数据来判断是否要提取相应的参数值,若需要,则将提取的参数值带入调控数据,并对初始产品价值进行调整;若不需要,直接根据查找到的调控数据对初始产品价值进行调整。After the server finds the regulatory data that matches the product information, it judges whether to extract the corresponding parameter value according to the found regulatory data. If necessary, it brings the extracted parameter value into the regulatory data and adjusts the initial product value. ; If not needed, adjust the initial product value directly according to the found control data.
步骤280,将调整后的初始产品价值返回给终端。Step 280, returning the adjusted initial product value to the terminal.
服务器对初始产品价值调整之后得到最终的产品价值,并将调整后的初始产品价值返回发送请求的终端。The server obtains the final product value after adjusting the initial product value, and returns the adjusted initial product value to the terminal sending the request.
在本实施例中,服务器将产品价值计算相关的且被经常被调用的静态、动态数据都事先存储在缓存的静态数据区和动态数据区中,当终端发起产品价值获取请求时,服务器根据终端发送请求中携带的产品信息和用户信息从缓存的静态数据区中获取对应的信息值,并根据产品信息从缓存的动态数据区中获取调控数据,根据信息值和调控数据得到最终的初始产品价值。从而使得当调用产品价值计算相关的数据时,可以直接从缓存中读取数据,提高了数据读取效率,减少了从数据库中查找调用数据的频率,可以避免数据库宕机的情况,加强了服务器在数据请求高并发状态下的可用性,提高工作效率。In this embodiment, the server stores the static and dynamic data related to product value calculation and frequently called in the static data area and dynamic data area of the cache in advance. When the terminal initiates a product value acquisition request, the server according to the terminal The product information and user information carried in the sending request obtain the corresponding information value from the cached static data area, and obtain the control data from the cached dynamic data area according to the product information, and obtain the final initial product value based on the information value and control data . Therefore, when the data related to product value calculation is called, the data can be read directly from the cache, which improves the efficiency of data reading, reduces the frequency of searching and calling data from the database, avoids database downtime, and strengthens the server Availability under high concurrency of data requests improves work efficiency.
在一个实施例中,方法还包括:当从缓存的动态数据区中查找到与产品信息相匹配的调控数据时,更新查找到的调控数据的查询记录;获取动态数据区中各调控数据的查询记录,根据各调控数据的查询记录对各调控数据进行排序。In one embodiment, the method further includes: when the regulatory data matching the product information is found from the cached dynamic data area, updating the query record of the found regulatory data; obtaining the query of each regulatory data in the dynamic data area records, and sort each control data according to the query records of each control data.
服务器每次从缓存的动态数据区中查找到相匹配的调控数据时,获取查找到的调控数据的查询记录,对该调控数据的查询记录的查询次数进行更新。Each time the server finds matching control data from the cached dynamic data area, it obtains the query record of the found control data, and updates the query times of the query record of the control data.
服务器在预设时间对动态数据区中的调控数据的排列顺序进行调整。预设的时间可以为特定的时间间隔,如30分钟、1小时、2小时等等。预设时间也可以是服务器对缓存系统的忙闲程度进行监控,当服务器监测到缓存系统处于空闲状态时,服务器启动对动态数据区中的调控数据的排序。具体的忙闲程度的监测标准可以为统计预设时间段内缓存的动态数据区中的调控数据被查询的频率,如果查询的频率低于预设阈值,则判定缓存系统处于空闲状态。优选地,服务器对动态数据区调控数据进行排列的频率不易过多,以免增加服务器的工作量,避免造成与数据查询工作的并发执行,降低数据查询工作的工作效率。The server adjusts the arrangement order of the control data in the dynamic data area at a preset time. The preset time can be a specific time interval, such as 30 minutes, 1 hour, 2 hours and so on. The preset time may also be that the server monitors the busyness of the cache system, and when the server detects that the cache system is idle, the server starts sorting the control data in the dynamic data area. The specific monitoring standard for busyness can be to count the query frequency of the control data in the cached dynamic data area within a preset period of time. If the query frequency is lower than the preset threshold, it is determined that the cache system is in an idle state. Preferably, the frequency with which the server arranges the control data in the dynamic data area is not too high, so as not to increase the workload of the server, avoid concurrent execution with the data query work, and reduce the work efficiency of the data query work.
在本实施例中,到达预设时间后,服务器获取动态数据区中所有调控数据的查询记录,具体地,查询记录可以包括各调控数据每次被查询的时间,累计的查询次数等。服务器根据各调控数据的查询次数,服务器将查询次数多的调控数据排在动态数据区的前面,将查询次数少的调控数据排在动态数据区的后面,若某些调控数据的查询次数一致,则获取它们最近一次被查询的查询时间,将查询时间较近的调控数据排在靠前的位置。在其他实施例中,服务器还可以根据其他预设排序规则对动态数据区中的调控数据进行排列,并不限于本实施例中描述的排序规则。In this embodiment, when the preset time is reached, the server obtains query records of all control data in the dynamic data area. Specifically, the query records may include the time each control data is queried each time, the accumulated query times, and the like. According to the query times of each control data, the server will arrange the control data with more query times in front of the dynamic data area, and arrange the control data with less query times at the back of the dynamic data area. If the query times of some control data are the same, Then obtain the query time of their latest query, and rank the regulatory data with a relatively recent query time in the front position. In other embodiments, the server may also arrange the control data in the dynamic data area according to other preset sorting rules, which are not limited to the sorting rules described in this embodiment.
在本实施例中,在每次调控数据被查询时,服务器均对该调控数据进行查询记录,并根据查询记录在预设时间对动态数据区中的所有调控数据进行排序,从而能够实施监控各调控数据的查询频率,以便对动态数据区中的调控数据进行顺序调整,提高高频使用数据的读取效率。In this embodiment, each time the control data is queried, the server will query and record the control data, and sort all the control data in the dynamic data area at a preset time according to the query records, so that the monitoring of each control data can be implemented. Regulate the query frequency of data, so as to adjust the order of the regulated data in the dynamic data area, and improve the reading efficiency of frequently used data.
在一个实施例中,所述方法还包括:当从缓存的动态数据区中未查找到与产品信息相匹配的调控数据时,从数据库中查找与产品信息相匹配的调控数据;将查找到的调控数据写入动态数据区中。In one embodiment, the method further includes: when the regulatory data matching the product information is not found from the cached dynamic data area, searching the database for the regulatory data matching the product information; Regulatory data is written into the dynamic data area.
当服务器从动态数据区中查找不到与获取的产品信息相匹配的调控数据时,服务器从数据库中进行查找。数据库中存储了所有的与产品价值计算相关的静态数据和动态数据。服务器从数据库中查找与产品信息如产品代码、渠道代码相匹配的调控数据,并继续进行根据调控数据对初始产品价值进行调整的步骤270。When the server cannot find regulatory data matching the obtained product information from the dynamic data area, the server searches from the database. All static data and dynamic data related to product value calculation are stored in the database. The server searches the database for adjustment data matching product information such as product code and channel code, and proceeds to step 270 of adjusting the initial product value according to the adjustment data.
服务器将从数据库中查找到的调控数据写入动态数据区中,以对动态数据区进行更新。具体地,服务器从动态数据区中查找与待写入的调控数据的查询频率一致的调控数据,并将待写入的调控数据插入至频率一致的调控数据的位置处。优选地,由于待写入的调控数据的查询时间最近,若调控数据是按照查询次数由高至低的顺序从前到后进行排列,则将待写入的调控数据排在频率一致的调控数据的前面;反之,将待写入的调控数据排在频率一致的调控数据的后面。此外,服务器对写入的调控数据的查询时间和查询次数进行记录。The server writes the control data found from the database into the dynamic data area, so as to update the dynamic data area. Specifically, the server searches the dynamic data area for regulation data that has the same query frequency as the regulation data to be written, and inserts the regulation data to be written into the position of the regulation data with the same frequency. Preferably, since the query time of the control data to be written is the latest, if the control data is arranged from front to back according to the order of the number of queries from high to low, then the control data to be written is arranged at the top of the control data with the same frequency. in front; otherwise, the control data to be written is arranged behind the control data with the same frequency. In addition, the server records the query time and query times of the written control data.
在本实施例中,当从缓存中查找不到对应的调控数据时,服务器从数据库中查找数据保证产品价值计算工作的正常进行,并且将从数据库中查找到的调库数据写入动态数据区中,使动态数据区中的调控数据处于动态更新中,以满足用户最新的查询需求。In this embodiment, when the corresponding regulatory data cannot be found from the cache, the server searches the data from the database to ensure the normal operation of product value calculation, and writes the database adjustment data found from the database into the dynamic data area In this mode, the control data in the dynamic data area is dynamically updated to meet the latest query requirements of users.
在一个实施例中,将查找到的调控数据写入动态数据区中的步骤,包括:当动态数据区的存储空间已满时,删除位于动态数据区中预设顺序处的调控数据;根据动态数据区中各调控数据的查询记录将查找到的调控数据写入至动态数据区中。In one embodiment, the step of writing the found control data into the dynamic data area includes: when the storage space of the dynamic data area is full, deleting the control data at the preset order in the dynamic data area; The query record of each control data in the data area writes the found control data into the dynamic data area.
服务器将查找到的调控数据写入动态数据区之前,判断缓存的动态数据区的存储空间是否已满,当动态数据区中的存储空间未满时,按照上述实施例中描述的方法将调控数据写入动态数据区中。Before the server writes the found control data into the dynamic data area, it judges whether the storage space of the cached dynamic data area is full. Write to the dynamic data area.
当动态数据区中的存储空间已满时,服务器查找动态数据区中预设顺序处的调控数据,并将其删除。在一个实施例中,服务器获取当前动态数据区中调控数据的排列顺序,若调控数据是按照查询次数由高至低的顺序从前到后进行排列,则将排在动态数据区最后面的数据删除;反之,服务器将排在动态数据区最前面的数据删除。When the storage space in the dynamic data area is full, the server searches for the control data in the preset order in the dynamic data area, and deletes them. In one embodiment, the server obtains the arrangement order of the control data in the current dynamic data area, and if the control data is arranged from front to back in the order of query times from high to low, delete the last data in the dynamic data area ; On the contrary, the server deletes the first data in the dynamic data area.
在一个实施例中,在进行数据删除之前,服务器获取动态数据区上次进行数据排序的时间,并计算排序时间与当前时间的时间间隔,根据时间间隔判断是否要在删除数据之前对调控数据进行排序。例如,当排序时间与当前时间的时间间隔超过进行排序预设时间间隔的一半时,则进行排序,排序后再进行调控数据的删除,否则,不启动数据排序的步骤,直接删除预设顺序处的调控数据。In one embodiment, before data deletion, the server obtains the time when the dynamic data area was sorted last time, and calculates the time interval between the sorting time and the current time, and judges according to the time interval whether to sort the data before deleting the data. Sort. For example, when the time interval between the sorting time and the current time exceeds half of the preset time interval for sorting, perform sorting, and then delete the control data; otherwise, do not start the step of data sorting, and directly delete the preset sequence. control data.
服务器将预设顺序处的调控数据删除后,从动态数据区中查找与待写入的调控数据的查询频率一致的调控数据,并将待写入的调控数据插入至频率一致的调控数据的位置处。优选地,由于待写入的调控数据的查询时间最近,若调控数据是按照查询次数由高至低的顺序从前到后进行排列,则将待写入的调控数据排在频率一致的调控数据的前面;反之,将待写入的调控数据排在频率一致的调控数据的后面。此外,服务器对写入的调控数据的查询时间和查询次数进行记录。After the server deletes the control data at the preset order, it searches the dynamic data area for the control data with the same query frequency as the control data to be written, and inserts the control data to be written into the location of the control data with the same frequency place. Preferably, since the query time of the control data to be written is the latest, if the control data is arranged from front to back according to the order of the number of queries from high to low, then the control data to be written is arranged at the top of the control data with the same frequency. in front; otherwise, the control data to be written is arranged behind the control data with the same frequency. In addition, the server records the query time and query times of the written control data.
在本实施例中,当动态数据区的存储空间已满时,服务器根据动态数据区中调控数据的排列顺序,将预设顺序处的调控数据删除,并将待写入的调控数据插入动态数据区的相应位置处,以对动态数据区进行更新,保证动态数据区中存储的数据是最新被查询到的数据。In this embodiment, when the storage space of the dynamic data area is full, the server deletes the control data at the preset order according to the arrangement order of the control data in the dynamic data area, and inserts the control data to be written into the dynamic data The corresponding position of the dynamic data area is used to update the dynamic data area to ensure that the data stored in the dynamic data area is the latest queried data.
在一个实施例中,所述方法还包括:当检测到数据库中的第一调控数据被更新时,获取第一调控数据对应的产品信息;从动态数据区中查找与产品信息对应的第二调控数据,并将第二调控数据替换为更新后的第一调控数据。In one embodiment, the method further includes: when it is detected that the first regulatory data in the database is updated, acquiring product information corresponding to the first regulatory data; searching for the second regulatory data corresponding to the product information from the dynamic data area data, and replace the second regulation data with the updated first regulation data.
由于公司经营销售策略、以及产品自身的调整,与产品价值相关的数据也会进行相应的调整。各产品部门的终端将调整后的调控数据以及数据更新指令发送给服务器,服务器接收调整后的调控数据并获取数据更新指令中调控数据相应的产品信息,根据产品信息从数据库中查找对应的第一调控数据,并对第一调控数据进行更新。Due to the company's sales strategy and the adjustment of the product itself, the data related to the product value will also be adjusted accordingly. The terminals of each product department send the adjusted control data and data update instructions to the server, and the server receives the adjusted control data and obtains the product information corresponding to the control data in the data update instruction, and searches the corresponding first from the database according to the product information. control data, and update the first control data.
服务器根据更新的第一调控数据的产品信息,查找动态数据区中是否存在与产品信息对应的第二调控数据,当服务器查找到对应的第二调控数据时,则将查找到的第二调控数据替换为更新后的第一调控数据。在一个实施例中,若服务器从动态数据区中查找不到对应的调控数据,则将更新后的第一调控数据根据写入动态数据区中。在一个实施例中,当数据库中添加了新增的调控数据时,服务器将数据库中新增的调控数据写入动态数据区中。具体的写入规则请参照上述实施例,在此不再赘述。一般情况下,调控数据的调整或更新是由于产品促销或新产品上线,因此,对应的调控数据被查询的概率也会相应提高,将更新的、新增的数据写入缓存的动态数据区中,可以使其被快速读取,提高数据查询的效率。According to the product information of the updated first control data, the server searches whether there is second control data corresponding to the product information in the dynamic data area. When the server finds the corresponding second control data, it will find the second control data Replaced with the updated first regulation data. In one embodiment, if the server cannot find the corresponding control data in the dynamic data area, it writes the updated first control data into the dynamic data area. In one embodiment, when new regulation data is added to the database, the server writes the new regulation data in the database into the dynamic data area. For specific writing rules, please refer to the above-mentioned embodiments, which will not be repeated here. Under normal circumstances, the adjustment or update of control data is due to product promotion or new product launch. Therefore, the probability of corresponding control data being queried will increase accordingly, and the updated and newly added data will be written into the dynamic data area of the cache. , which can make it read quickly and improve the efficiency of data query.
在一个实施例中,当数据库中存储的静态数据进行更新或有新的静态数据添加时,服务器将缓存中静态数据区中的数据进行同步更新和添加。从而保证缓存中存储的数据为最新的数据,保证产品价值计算的准确性。In one embodiment, when the static data stored in the database is updated or new static data is added, the server will synchronously update and add the data in the static data area in the cache. In this way, the data stored in the cache is guaranteed to be the latest data, and the accuracy of product value calculation is ensured.
在一个实施例中,服务器定时检测缓存的工作状态,如服务器每隔30s检测一次,若服务器检测到缓存状态异常时,向管理员终端发送报警邮件。在缓存处于状态异常的时间内,若服务器接收到产品价值获取请求时,服务器直接从数据库中读取静态数据和动态数据。In one embodiment, the server regularly checks the working status of the cache, for example, the server checks once every 30 seconds, and if the server detects that the cache status is abnormal, it sends an alarm email to the administrator terminal. During the time when the cache is in an abnormal state, if the server receives a product value acquisition request, the server directly reads static data and dynamic data from the database.
当服务器监测到缓存状态恢复正常时,检测缓存中的动态数据是否存在缺失,若存在缺失,则将数据库中最新被查询到的且与缺失数量相当的调控数据写入缓存的动态数据区中,缓存的状态恢复正常后,服务器再接收到产品价值获取请求时,从缓存中进行调控数据查询。When the server detects that the cache status has returned to normal, it detects whether there is a missing dynamic data in the cache, and if there is a missing, writes the newly queried regulatory data in the database that is equivalent to the number of missing data into the dynamic data area of the cache. After the state of the cache returns to normal, when the server receives a product value acquisition request, it will query the control data from the cache.
请参阅图3,图3为一实施例中的产品价值获取装置的示意图,该装置包括:Please refer to Figure 3, Figure 3 is a schematic diagram of a product value acquisition device in an embodiment, the device includes:
请求接收模块310,用于接收终端发送的产品价值获取请求,产品价值获取请求中携带产品信息和用户信息。The request receiving module 310 is configured to receive the product value acquisition request sent by the terminal, and the product value acquisition request carries product information and user information.
价值表获取模块320,用于从缓存的静态数据区中获取产品价值组合表。The value table obtaining module 320 is configured to obtain the product value combination table from the cached static data area.
产品信息值提取模块330,用于根据产品价值组合表从产品信息提取对应的产品信息值。The product information value extraction module 330 is configured to extract the corresponding product information value from the product information according to the product value combination table.
用户信息值提取模块340,用于根据产品价值组合表从用户信息中提取对应的用户信息值。The user information value extraction module 340 is configured to extract the corresponding user information value from the user information according to the product value combination table.
初始值查找模块350,用于从产品价值组合表中查找与提取的产品信息值和用户信息值对应的初始产品价值。The initial value lookup module 350 is used to look up the initial product value corresponding to the extracted product information value and user information value from the product value combination table.
调控数据查找模块360,用于从缓存的动态数据区中查找与产品信息相匹配的调控数据。The regulation data search module 360 is configured to search the regulation data matching the product information from the cached dynamic data area.
数值调整模块370,用于根据调控数据对初始产品价值进行调整。A value adjustment module 370, configured to adjust the initial product value according to the control data.
数值返回模块380,用于将调整后的初始产品价值返回给终端。A value returning module 380, configured to return the adjusted initial product value to the terminal.
在一个实施例中,所述装置还可以包括:In one embodiment, the device may also include:
记录更新模块,用于当从缓存的动态数据区中查找到与产品信息相匹配的调控数据时,更新查找到的调控数据的查询记录。The record update module is configured to update the query record of the found control data when the control data matching the product information is found from the cached dynamic data area.
数据排序模块,用于获取动态数据区中各调控数据的查询记录,根据各调控数据的查询记录对各调控数据进行排序。The data sorting module is used to obtain the query records of the control data in the dynamic data area, and sort the control data according to the query records of the control data.
在一个实施例中,所述装置还可以包括:In one embodiment, the device may also include:
数据调用模块,用于当从缓存的动态数据区中未查找到与产品信息相匹配的调控数据时,从数据库中查找与产品信息相匹配的调控数据。The data calling module is used for finding the regulation data matching the product information from the database when the regulation data matching the product information is not found in the cached dynamic data area.
数据写入模块,用于将查找到的调控数据写入动态数据区中。The data writing module is used to write the found control data into the dynamic data area.
在一个实施例中,数据写入模块还可以包括:In one embodiment, the data writing module can also include:
数据删除模块,用于当动态数据区的存储空间已满时,删除位于动态数据区中预设顺序处的调控数据。The data deletion module is used for deleting the regulation data located in the preset order in the dynamic data area when the storage space of the dynamic data area is full.
数据插入模块,用于根据动态数据区中各调控数据的查询记录将查找到的调控数据写入至动态数据区中。The data insertion module is used for writing the found regulation data into the dynamic data region according to the query records of the regulation data in the dynamic data region.
在一个实施例中,所述装置还可以包括:In one embodiment, the device may also include:
数据信息获取模块,用于当检测到数据库中的第一调控数据被更新时,获取第一调控数据对应的产品信息。The data information acquisition module is configured to acquire product information corresponding to the first control data when it is detected that the first control data in the database is updated.
数据替换模块,用于从动态数据区中查找与产品信息对应的第二调控数据,并将第二调控数据替换为更新后的第一调控数据。The data replacement module is used to search the second control data corresponding to the product information from the dynamic data area, and replace the second control data with the updated first control data.
关于产品价值获取装置的具体限定可以参见上文中对于产品价值获取方法的限定,在此不再赘述。上述产品价值获取装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。上述产品价值获取装置可以实现为一种计算机程序的形式。For specific limitations on the product value acquisition device, please refer to the above-mentioned limitations on the product value acquisition method, which will not be repeated here. Each module in the above-mentioned product value acquisition device can be fully or partially realized by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, and the like. The above-mentioned product value acquisition device can be realized in the form of a computer program.
本发明实施例提出了一种计算机设备,该计算机设备包括一系列存储于存储器上的计算机程序,当计算机程序被处理器执行时,可以实现本发明各个实施例提出的产品价值获取方法,在一些实施例中,基于该计算机程序各部分所实现的特定的操作。参阅图4,提供一种计算机设备,包括通过系统总线连接的存储器、处理器、操作系统,其中,该处理器用于提供计算和控制能力,支撑整个计算机设备的运行。存储器用于存储数据、程序代码等。The embodiment of the present invention proposes a computer device, the computer device includes a series of computer programs stored in the memory, when the computer program is executed by the processor, it can realize the product value acquisition method proposed by each embodiment of the present invention, in some In the embodiments, it is based on the specific operations realized by each part of the computer program. Referring to FIG. 4 , a computer device is provided, including a memory, a processor, and an operating system connected through a system bus, wherein the processor is used to provide calculation and control capabilities and support the operation of the entire computer device. The memory is used to store data, program codes, and the like.
该存储器上存储至少一个计算机可执行程序,该计算机可执行程序可被处理器执行,以实现本申请各实施例中提供的产品价值获取方法。该计算机可执行程序可被处理器所执行,以用于实现上述各个实施例所提供的一种产品价值获取方法。计算机设备中的内存储器为非易失性存储介质中的操作系统、数据库和计算机可执行程序提供高速缓存的运行环境。At least one computer-executable program is stored in the memory, and the computer-executable program can be executed by a processor to implement the product value acquisition method provided in each embodiment of the present application. The computer-executable program can be executed by a processor, so as to implement a method for acquiring product value provided by each of the foregoing embodiments. The internal memory in the computer equipment provides a high-speed running environment for the operating system, database and computer executable program in the non-volatile storage medium.
其中,处理器执行程序时实现以下步骤:接收终端发送的产品价值获取请求,产品价值获取请求中携带产品信息和用户信息;从缓存的静态数据区中获取产品价值组合表;根据产品价值组合表从产品信息中提取对应的产品信息值;根据产品价值组合表从用户信息中提取对应的用户信息值;从产品价值组合表中查找与提取的产品信息值和用户信息值对应的初始产品价值;从缓存的动态数据区中查找与产品信息相匹配的调控数据;根据调控数据对初始产品价值进行调整;将调整后的初始产品价值返回给终端。Among them, the processor implements the following steps when executing the program: receiving the product value acquisition request sent by the terminal, the product value acquisition request carries product information and user information; obtaining the product value combination table from the cached static data area; according to the product value combination table Extracting the corresponding product information value from the product information; extracting the corresponding user information value from the user information according to the product value combination table; searching the initial product value corresponding to the extracted product information value and user information value from the product value combination table; Search the regulation data matching the product information from the cached dynamic data area; adjust the initial product value according to the regulation data; return the adjusted initial product value to the terminal.
在其中一个实施例中,处理器执行程序时还可以实现以下步骤:当从缓存的动态数据区中查找到与产品信息相匹配的调控数据时,更新查找到的调控数据的查询记录;获取动态数据区中各调控数据的查询记录,根据各调控数据的查询记录对各调控数据进行排序。In one of the embodiments, when the processor executes the program, the following steps can also be implemented: when the regulatory data matching the product information is found from the cached dynamic data area, update the query record of the found regulatory data; obtain the dynamic The query records of each control data in the data area are sorted according to the query records of each control data.
在其中一个实施例中,处理器执行程序时还可以实现以下步骤:当从缓存的动态数据区中未查找到与产品信息相匹配的调控数据时,从数据库中查找与产品信息相匹配的调控数据;将查找到的调控数据写入动态数据区中。In one of the embodiments, when the processor executes the program, the following steps can also be implemented: when the regulatory data matching the product information is not found from the cached dynamic data area, look for the regulatory data matching the product information from the database Data; write the found control data into the dynamic data area.
在其中一个实施例中,处理器执行程序时还可以实现以下步骤:当动态数据区的存储空间已满时,删除位于动态数据区中预设顺序处的调控数据;根据动态数据区中各调控数据的查询记录将查找到的调控数据写入至动态数据区中。In one of the embodiments, when the processor executes the program, the following steps can also be implemented: when the storage space of the dynamic data area is full, delete the control data located in the preset sequence in the dynamic data area; The data query record writes the found control data into the dynamic data area.
在其中一个实施例中,处理器执行程序时还可以实现以下步骤:当检测到数据库中的第一调控数据被更新时,获取第一调控数据对应的产品信息;从动态数据区中查找与产品信息对应的第二调控数据,并将第二调控数据替换为更新后的第一调控数据。In one of the embodiments, when the processor executes the program, the following steps can also be implemented: when it is detected that the first regulation data in the database is updated, obtain the product information corresponding to the first regulation data; The second regulation data corresponding to the information, and replace the second regulation data with the updated first regulation data.
上述对于计算机设备的限定可以参见上文中对于产品价值获取方法的具体限定,在此不再赘述。For the above-mentioned limitations on computer equipment, please refer to the above-mentioned specific limitations on the product value acquisition method, which will not be repeated here.
请继续参阅图4,还提供一种计算机非易失性存储介质,其上存储有计算机程序,如图4中所示的非易失性存储介质,其中,该程序被处理器执行时实现以下步骤:接收终端发送的产品价值获取请求,产品价值获取请求中携带产品信息和用户信息;从缓存的静态数据区中获取产品价值组合表;根据产品价值组合表从产品信息中提取对应的产品信息值;根据产品价值组合表从用户信息中提取对应的用户信息值;从产品价值组合表中查找与提取的产品信息值和用户信息值对应的初始产品价值;从缓存的动态数据区中查找与产品信息相匹配的调控数据;根据调控数据对初始产品价值进行调整;将调整后的初始产品价值返回给终端。Please continue to refer to FIG. 4, there is also provided a computer non-volatile storage medium on which a computer program is stored, such as the non-volatile storage medium shown in FIG. 4, wherein, when the program is executed by the processor, the following Steps: Receive the product value acquisition request sent by the terminal, the product value acquisition request carries product information and user information; obtain the product value combination table from the cached static data area; extract the corresponding product information from the product information according to the product value combination table value; extract the corresponding user information value from the user information according to the product value combination table; find the initial product value corresponding to the extracted product information value and user information value from the product value combination table; find the corresponding value from the cached dynamic data area Regulatory data matching the product information; adjust the initial product value according to the regulatory data; return the adjusted initial product value to the terminal.
在其中一个实施例中,该程序被处理器执行时还可以实现以下步骤:当从缓存的动态数据区中查找到与产品信息相匹配的调控数据时,更新查找到的调控数据的查询记录;获取动态数据区中各调控数据的查询记录,根据各调控数据的查询记录对各调控数据进行排序。In one of the embodiments, when the program is executed by the processor, the following steps can also be implemented: when the regulatory data matching the product information is found from the cached dynamic data area, the query record of the found regulatory data is updated; The query records of each control data in the dynamic data area are obtained, and each control data is sorted according to the query records of each control data.
在其中一个实施例中,该程序被处理器执行时还可以实现以下步骤:当从缓存的动态数据区中未查找到与产品信息相匹配的调控数据时,从数据库中查找与产品信息相匹配的调控数据;将查找到的调控数据写入动态数据区中。In one of the embodiments, when the program is executed by the processor, the following steps can also be implemented: when the regulatory data matching the product information is not found from the dynamic data area of the cache, look for the data matching the product information from the database. control data; write the found control data into the dynamic data area.
在其中一个实施例中,该程序被处理器执行时还可以实现以下步骤:当动态数据区的存储空间已满时,删除位于动态数据区中预设顺序处的调控数据;根据动态数据区中各调控数据的查询记录将查找到的调控数据写入至动态数据区中。In one of the embodiments, when the program is executed by the processor, the following steps can also be implemented: when the storage space of the dynamic data area is full, delete the regulation data at the preset order in the dynamic data area; The query record of each control data writes the found control data into the dynamic data area.
在其中一个实施例中,该程序被处理器执行时还可以实现以下步骤:当检测到数据库中的第一调控数据被更新时,获取第一调控数据对应的产品信息;从动态数据区中查找与产品信息对应的第二调控数据,并将第二调控数据替换为更新后的第一调控数据。In one of the embodiments, when the program is executed by the processor, the following steps can also be implemented: when it is detected that the first regulation data in the database is updated, obtain the product information corresponding to the first regulation data; The second regulation data corresponding to the product information, and the second regulation data is replaced with the updated first regulation data.
上述对于计算机可读存储介质的限定可以参见上文中对于产品价值获取方法的具体限定,在此不再赘述。For the above limitations on the computer-readable storage medium, please refer to the specific limitations on the product value acquisition method above, which will not be repeated here.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be realized through computer programs to instruct related hardware, and the programs can be stored in a non-volatile computer-readable storage medium When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) and the like.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711240711.6A CN108009245B (en) | 2017-11-30 | 2017-11-30 | Product value acquisition method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711240711.6A CN108009245B (en) | 2017-11-30 | 2017-11-30 | Product value acquisition method and device, computer equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108009245A true CN108009245A (en) | 2018-05-08 |
| CN108009245B CN108009245B (en) | 2021-02-26 |
Family
ID=62055240
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711240711.6A Expired - Fee Related CN108009245B (en) | 2017-11-30 | 2017-11-30 | Product value acquisition method and device, computer equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108009245B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020119111A1 (en) * | 2018-12-13 | 2020-06-18 | 平安医疗健康管理股份有限公司 | Insurance premium calculation method for non-disease treatment program, device, apparatus, and storage medium |
| CN112418827A (en) * | 2020-12-16 | 2021-02-26 | 平安健康保险股份有限公司 | Product scheme configuration method and device, computer equipment and storage medium |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1339747A (en) * | 2000-08-17 | 2002-03-13 | 国际商业机器公司 | System and method for high speed buffer storage file information |
| CN101090401A (en) * | 2007-05-25 | 2007-12-19 | 金蝶软件(中国)有限公司 | Data buffer store method and system at duster environment |
| CN101246460A (en) * | 2008-03-10 | 2008-08-20 | 华为技术有限公司 | Cache data writing system and method and cache data reading system and method |
| CN101609432A (en) * | 2009-07-13 | 2009-12-23 | 中国科学院计算技术研究所 | Shared cache management system and method |
| CN102185725A (en) * | 2011-05-31 | 2011-09-14 | 北京星网锐捷网络技术有限公司 | Cache management method and device as well as network switching equipment |
| US8495286B2 (en) * | 2009-12-10 | 2013-07-23 | International Business Machines Corporation | Write buffer for improved DRAM write access patterns |
| CN105335402A (en) * | 2014-07-23 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Search method, index data generation method and device on the basis of static Cache |
| CN107291920A (en) * | 2017-06-28 | 2017-10-24 | 南京途牛科技有限公司 | A kind of air ticket query caching method |
| CN107402982A (en) * | 2017-07-07 | 2017-11-28 | 阿里巴巴集团控股有限公司 | Data write-in, data matching method, device and computing device |
-
2017
- 2017-11-30 CN CN201711240711.6A patent/CN108009245B/en not_active Expired - Fee Related
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1339747A (en) * | 2000-08-17 | 2002-03-13 | 国际商业机器公司 | System and method for high speed buffer storage file information |
| CN101090401A (en) * | 2007-05-25 | 2007-12-19 | 金蝶软件(中国)有限公司 | Data buffer store method and system at duster environment |
| CN101246460A (en) * | 2008-03-10 | 2008-08-20 | 华为技术有限公司 | Cache data writing system and method and cache data reading system and method |
| CN101609432A (en) * | 2009-07-13 | 2009-12-23 | 中国科学院计算技术研究所 | Shared cache management system and method |
| US8495286B2 (en) * | 2009-12-10 | 2013-07-23 | International Business Machines Corporation | Write buffer for improved DRAM write access patterns |
| CN102185725A (en) * | 2011-05-31 | 2011-09-14 | 北京星网锐捷网络技术有限公司 | Cache management method and device as well as network switching equipment |
| CN105335402A (en) * | 2014-07-23 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Search method, index data generation method and device on the basis of static Cache |
| CN107291920A (en) * | 2017-06-28 | 2017-10-24 | 南京途牛科技有限公司 | A kind of air ticket query caching method |
| CN107402982A (en) * | 2017-07-07 | 2017-11-28 | 阿里巴巴集团控股有限公司 | Data write-in, data matching method, device and computing device |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020119111A1 (en) * | 2018-12-13 | 2020-06-18 | 平安医疗健康管理股份有限公司 | Insurance premium calculation method for non-disease treatment program, device, apparatus, and storage medium |
| CN112418827A (en) * | 2020-12-16 | 2021-02-26 | 平安健康保险股份有限公司 | Product scheme configuration method and device, computer equipment and storage medium |
| CN112418827B (en) * | 2020-12-16 | 2024-05-28 | 平安健康保险股份有限公司 | Product scheme configuration method, device, computer equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108009245B (en) | 2021-02-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10504120B2 (en) | Determining a temporary transaction limit | |
| AU2018206822A1 (en) | Simplified tax interview | |
| US9940360B2 (en) | Streaming optimized data processing | |
| US8843436B2 (en) | Systems and methods for performing direct reporting access to transaction databases | |
| US20210082026A1 (en) | Content-recommendation method and apparatus, electronic device, and system | |
| CN109388657B (en) | Data processing method, device, computer equipment and storage medium | |
| WO2016004813A1 (en) | Data storage method, query method and device | |
| US9275125B1 (en) | System for organizing data from a plurality of users to create individual user profiles | |
| US20120169713A1 (en) | Automatically generating reports matching user interests represented in a dynamically adjusted user interest analytic model | |
| US20140067548A1 (en) | Saving on device functionality for business calendar | |
| CN107291779B (en) | Cache data management method and device | |
| US9798760B2 (en) | Application retention metrics | |
| CN114066533A (en) | Product recommendation method, device, electronic device and storage medium | |
| CN112241420A (en) | A method for recommending government service items based on association rules algorithm | |
| US10185757B2 (en) | Non-uniform multi-row text file loading | |
| WO2019085463A1 (en) | Department demand recommendation method, application server, and computer-readable storage medium | |
| US20120197925A1 (en) | Optimization of Database Driver Performance | |
| CN112036631A (en) | Purchase quantity determination method, device, equipment and storage medium | |
| US8341181B2 (en) | Method for performance tuning a database | |
| CN107451280B (en) | Data communication method and device and electronic equipment | |
| US9754319B2 (en) | Source document framework for accounting systems | |
| CN108009245A (en) | Value of the product acquisition methods, device, computer equipment and storage medium | |
| US20200210087A1 (en) | Method and system for a configurable storage engine | |
| JP6442083B2 (en) | Information item storage method, information item storage system, information item storage device, information item storage program, and computer-readable storage medium | |
| US20230394535A1 (en) | Method and apparatus for maintaining a database |
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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210226 |