Information query method and device, electronic equipment and computer program product

By allocating target physical nodes for user information to be processed in the distributed cache system and querying sales product instances using user trajectory tags, the problem of low efficiency in querying sales product parameters in the prior art is solved, and efficient and accurate daily account calculation is achieved.

CN119829629APending Publication Date: 2025-04-15CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411998466.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The inquiry method of calculating sales product parameters in the prior art is inefficient, which affects the timeliness and accuracy of the billing daily account system.

Method used

By assigning target physical nodes to the user information to be processed in the distributed cache system and querying sales product instances using user trajectory tags, efficient sales product parameter query is achieved.

Benefits of technology

It improves the query efficiency of sales product instances, shortens the daily account calculation time, solves the problem of low efficiency, and improves the timeliness and accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829629A_ABST
    Figure CN119829629A_ABST
Patent Text Reader

Abstract

The invention discloses an information query method and device, electronic equipment and a computer program product. The method comprises the steps that a daily account to be processed is acquired, the daily account to be processed comprises multiple pieces of bill information, and each piece of bill information at least comprises user information to be processed and product information; in a plurality of preset physical nodes in the distributed cache system, distributing a corresponding target physical node for the to-be-processed user information; a user track label corresponding to the to-be-processed user information is inquired in a plurality of preset track labels recorded in a target physical node, the target physical node at least records the corresponding relation between the preset track label and the preset user information, the preset track label comprises a plurality of binary digits, and the binary digits are in one-to-one correspondence with the addressing modules; and according to the user track label, querying a sales item instance corresponding to the to-be-processed user information in the selected addressing module. The technical problem of low efficiency of a daily account calculation sales item parameter query mode in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to an information query method, device, electronic equipment and computer program product. Background Art

[0002] While telecommunication operators provide users with diverse and complex services, the package information related to users has also become diverse and the pricing for a single user has also become numerous and complex, which has directly increased the requirements for operators to calculate daily user accounts.

[0003] Daily account billing is not only a key link to ensure corporate revenue, but also an important indicator to meet user satisfaction. However, the current mainstream daily account calculation sales product parameter query method is to use the user's sales product information stored in the physical library, and repeatedly read and write user information every day for calculation. This method not only wastes resources, but also has low efficiency. If there are many user parameters, it will seriously affect the timeliness and accuracy of the billing daily account system.

[0004] With respect to the problem of low efficiency of the method for querying sales product parameters in the above-mentioned prior art, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide an information query method, device, electronic device and computer program product to at least solve the technical problem of low efficiency of the daily account calculation sales product parameter query method in the prior art.

[0006] According to one aspect of an embodiment of the present invention, there is provided an information query method, comprising: obtaining a daily account to be processed, wherein the daily account to be processed comprises: a plurality of billing information, each of which comprises at least: user information to be processed and product information; among a plurality of preset physical nodes in a distributed cache system, assigning a corresponding target physical node to the user information to be processed, wherein each of the preset physical nodes in the distributed cache system is pre-configured with a corresponding preset hash slot, using the user information to be processed as a key for querying the target physical node in the distributed cache system, calculating a user hash value of the user information to be processed, and the user hash value falls into the target hash slot corresponding to the target physical node; among a plurality of preset trajectory tags recorded in the target physical node , query the user trajectory tag corresponding to the user information to be processed, wherein the target physical node at least records the correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag includes: multiple binary digits, the target physical node includes: multiple addressing modules, the binary digits correspond to the addressing modules one by one, in each of the binary digits, the first value indicates that the addressing module is selected, and the second value indicates that the addressing module is not selected; according to the user trajectory tag, in the selected addressing module, query the sales product instance corresponding to the user information to be processed, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0007] Optionally, after obtaining the daily account to be processed, the method further includes: detecting whether there is billing information identical to the user information to be processed in the daily account to be processed; if there is billing information identical to the user information to be processed in the daily account to be processed, merging the product information corresponding to the same user information to be processed in multiple billing information.

[0008] Optionally, among multiple preset physical nodes in a distributed cache system, assigning a corresponding target physical node to the user information to be processed includes: using the user information to be processed as a key to query the target physical node in the distributed cache system, and calculating a user hash value of the user information to be processed; among multiple preset physical nodes in the distributed cache system, matching the user hash value with the preset hash slot corresponding to each preset physical node; determining the preset hash slot that matches the user hash value as the target hash slot; and determining the preset physical node corresponding to the target hash slot as the target physical node.

[0009] Optionally, among multiple preset physical nodes in a distributed cache system, before allocating corresponding target physical nodes to the user information to be processed, the method also includes: obtaining multiple initial hash slots pre-configured for multiple preset user information, wherein each of the initial hash slots corresponds to at least one of the preset user information; detecting the number of nodes of the preset physical nodes in the distributed cache system; according to the number of nodes, evenly allocating the multiple initial hash slots to obtain multiple initial hash slot sets, wherein the number of sets of the initial hash slot sets is the same as the number of nodes, and the number of hash slots of the initial hash slots in the multiple initial hash slot sets is the same; merging the multiple initial hash slots in each of the initial hash slot sets into the preset hash slots, and allocating the preset hash slots to each of the preset physical nodes.

[0010] Optionally, the method also includes: querying whether there is a user trajectory label corresponding to the user information to be processed among multiple preset trajectory labels recorded in the target physical node; if the user trajectory label corresponding to the user information to be processed does not exist in the target physical node, using each of the addressing modules in the target physical node one by one to query the sales product instance corresponding to the user information to be processed; generating the preset trajectory label for the user information to be processed based on the query results of multiple addressing modules for the user information to be processed, wherein the query result of each addressing module is used to determine the value of the binary digit corresponding to the addressing module in the preset trajectory label.

[0011] Optionally, generating the preset track label for the user information to be processed based on the query results of multiple addressing modules on the user information to be processed includes: detecting the query result of each addressing module, wherein the query result is at least used to indicate whether the addressing module has queried the sales product instance corresponding to the user information to be processed; when the query result indicates that the addressing module has queried the sales product instance corresponding to the user information to be processed, in the preset track label, setting the binary digit corresponding to the addressing module to the first value; when the query result indicates that the addressing module has not queried the sales product instance corresponding to the user information to be processed, in the preset track label, setting the binary digit corresponding to the addressing module to the second value.

[0012] Optionally, the method also includes: detecting the sales product code corresponding to each addressing module in the target physical node, wherein different addressing modules are used to query different sales product instances, and the sales product code is used to indicate the type of the sales product instance queried by the addressing module, and different types of sales product instances have different priorities; arranging multiple sales product codes in order of priority to obtain a priority sequence; and setting the correspondence between the binary digits in the preset trajectory label and the addressing module according to the priority sequence.

[0013] According to another aspect of an embodiment of the present invention, an information query device is also provided, including: an acquisition module, used to acquire a daily account to be processed, wherein the daily account to be processed includes: multiple billing information, each of which includes at least: user information to be processed and product information; an allocation module, used to allocate a corresponding target physical node to the user information to be processed among multiple preset physical nodes in a distributed cache system, wherein each of the preset physical nodes in the distributed cache system is pre-configured with a corresponding preset hash slot, and the user information to be processed is used as a key to query the target physical node in the distributed cache system, and a user hash value of the user information to be processed is calculated, and the user hash value falls into the target hash slot corresponding to the target physical node; a first query module, used to allocate multiple records recorded in the target physical node A preset trajectory tag is used to query the user trajectory tag corresponding to the user information to be processed, wherein the target physical node at least records the correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag includes: multiple binary digits, and the target physical node includes: multiple addressing modules, the binary digits correspond to the addressing modules one by one, in each of the binary digits, the first value indicates that the addressing module is selected, and the second value indicates that the addressing module is not selected; a second query module is used to query the sales product instance corresponding to the user information to be processed in the selected addressing module according to the user trajectory tag, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0014] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned information query method through the computer program.

[0015] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, which implement the steps of the above information query method when executed by a processor.

[0016] In an embodiment of the present invention, in the case of calculating cost data for the daily account to be processed, a target physical node for processing the user information to be processed is selected from the distributed cache system, so as to achieve the purpose of using multiple preset physical nodes in the distributed cache system to perform distributed processing on different information to be processed, and realize the technical effect of improving processing efficiency. Then, the user trajectory label corresponding to the user information to be processed is used to select the addressing module for querying the sales product instance, which can improve the selection efficiency of the addressing module, and the multiple binary digits in the user trajectory label can represent the selected addressing module and the unselected addressing module, thereby realizing the screening of the addressing modules required for the user information to be processed, eliminating the addressing modules that do not need to be queried, and thus improving the query efficiency of the addressing module, and can more quickly query the sales product instance used to calculate the product information, and further obtain the cost data corresponding to the user information to be processed, achieving the technical effect of improving the query efficiency of the sales product instance, and thus solving the technical problem of low efficiency of the query method of daily account calculation sales product parameters in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 is a flow chart of an information query method according to an embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of a system architecture for querying billing daily account package information based on differentiated tags according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of an overall architecture of a distributed memory database DCA according to an embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of a daily account calculation process according to an embodiment of the present invention;

[0022] Figure 5 It is a schematic diagram of a method for implementing billing daily account package information query based on differentiated tags according to an embodiment of the present invention;

[0023] Figure 6 is a schematic diagram of an information query device according to an embodiment of the present invention;

[0024] Figure 7 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0028] Daily account: The operator's billing system calculates the user's bill in real time every day, which is called daily account.

[0029] Redis, an open source, high-performance health-value database, is written in ANSI C language, supports network access, and can persist data on disk based on memory or through persistent files. Redis is famous for its fast data reading and writing speed.

[0030] JSTORM, a streaming computing framework.

[0031] According to an embodiment of the present invention, an information query method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] Figure 1 is a flow chart of an information query method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0033] Step S102, obtaining the daily account to be processed, wherein the daily account to be processed includes: a plurality of billing information, each billing information includes at least: user information and product information to be processed;

[0034] Step S104, among multiple preset physical nodes in the distributed cache system, a corresponding target physical node is allocated for the user information to be processed, wherein each preset physical node in the distributed cache system is pre-configured with a corresponding preset hash slot, the user information to be processed is used as a key to query the target physical node in the distributed cache system, a user hash value of the user information to be processed is calculated, and the user hash value falls into the target hash slot corresponding to the target physical node;

[0035] Step S106, querying a user trajectory tag corresponding to the to-be-processed user information from a plurality of preset trajectory tags recorded in the target physical node, wherein the target physical node at least records a correspondence between a preset trajectory tag and preset user information, the preset trajectory tag comprises: a plurality of binary digits, the target physical node comprises: a plurality of addressing modules, the binary digits correspond to the addressing modules one by one, in each binary digit, a first value indicates that the addressing module is selected, and a second value indicates that the addressing module is not selected;

[0036] Step S108, based on the user track label, in the selected addressing module, query the sales product instance corresponding to the user information to be processed, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0037] In an embodiment of the present invention, in the case of calculating cost data for the daily account to be processed, a target physical node for processing the user information to be processed is selected from the distributed cache system, so as to achieve the purpose of using multiple preset physical nodes in the distributed cache system to perform distributed processing on different information to be processed, and realize the technical effect of improving processing efficiency. Then, the user trajectory label corresponding to the user information to be processed is used to select the addressing module for querying the sales product instance, which can improve the selection efficiency of the addressing module, and the multiple binary digits in the user trajectory label can represent the selected addressing module and the unselected addressing module, thereby realizing the screening of the addressing modules required for the user information to be processed, eliminating the addressing modules that do not need to be queried, and thus improving the query efficiency of the addressing module, and can more quickly query the sales product instance used to calculate the product information, and further obtain the cost data corresponding to the user information to be processed, achieving the technical effect of improving the query efficiency of the sales product instance, and thus solving the technical problem of low efficiency of the query method of daily account calculation sales product parameters in the prior art.

[0038] In the above step S102, the daily account to be processed may represent the cost incurred by the communication service on a single day. The daily account to be processed may include multiple billing information, each of which includes user information to be processed and product information corresponding to the user information to be processed.

[0039] Optionally, the product information may be data generated by enjoying the communication service, which is used to calculate the fee data, wherein the communication service is a sales product and the product information may be sales product data, such as the purchase quantity or the usage duration.

[0040] In the above step S102, the distributed cache system may be a distributed memory database DCA based on Redis, which uses multiple preset physical nodes to record sales product instances and preset track labels corresponding to multiple preset user information, such as for storing user main products (such as preset user information) and package information (such as sales product instances), as well as labeled data (such as preset track labels).

[0041] It should be noted that the sales product instance is used to represent the calculation rules of product information, such as packages or unit prices. After each bill information is queried for a matching sales product instance, calculations are performed based on the sales product instance and product information to obtain the cost data of the user information to be processed in the bill information.

[0042] In the above step S104, each preset physical node in the distributed cache system is pre-set with a corresponding preset hash slot, so that the preset physical node can perform a query based on the user hash value of the user information to be processed, thereby improving the query efficiency.

[0043] Optionally, the user information to be processed is used as the key for querying in the distributed cache system, and hash coding is performed on the user information to obtain a user hash value. The user hash value is then matched with a preset hash slot corresponding to each preset physical node in the distributed cache system to determine which preset hash slot the user hash value falls into. The preset hash slot is then the target hash slot, and the preset physical node configured for the target hash slot is the target physical node for querying the user information to be processed.

[0044] In the above step S104, multiple addressing modules are pre-set in each preset physical node, and each addressing module stores a specific type of sales product instance. Therefore, after determining the target physical node for the user information to be processed, the sales product instances corresponding to the user information to be processed can be queried one by one in the multiple addressing modules of the target physical node.

[0045] In the above step S104, each preset physical node also records preset trajectory tags corresponding to multiple preset user information. The preset trajectory tag uses multiple binary digits, and each binary digit corresponds to an addressing module. After determining the target physical node for the user information to be processed, it is possible to first query whether the target physical node records the user trajectory tag corresponding to the user information to be processed. After the user trajectory tag is queried, each addressing module can be selected in turn according to the instructions of the user trajectory tag to query the sales product instance.

[0046] In the above step S106, the first value may be "1" to indicate that the addressing module is selected, and the second value may be "0" to indicate that the addressing module is not selected.

[0047] Optionally, each addressing module is used to query a sales product instance corresponding to the user information to be processed.

[0048] It should be noted that there may be multiple sales product instances corresponding to the same user information to be processed, and the product information also includes product data available for multiple sales product instances. The product of each product data and the sales product instance can be used as the dimensional cost of the dimension in which the sales product instance is located. The dimensional costs corresponding to the same user information to be processed in multiple sales product instances are summarized to obtain the cost data corresponding to the user information to be processed.

[0049] As an optional embodiment, after obtaining the daily account to be processed, the method also includes: detecting whether there is billing information with the same user information to be processed in the daily account to be processed; if there is billing information with the same user information to be processed in the daily account to be processed, merging the product information corresponding to the same user information to be processed in multiple billing information.

[0050] In the above-mentioned embodiment of the present application, the daily account to be processed can be counted on the side of the operator providing communication services, and then the multiple billing information in the daily account to be processed may contain multiple different user information to be processed. In order to facilitate statistics, the multiple billing information in the daily account to be processed can be merged according to the user information to be processed. For example, the product information corresponding to the same user information to be processed can be merged to obtain a merged billing information, and then the target physical node and sales product instance can be queried based on the merged billing information, which can reduce the amount of data to be queried and improve the query efficiency.

[0051] Optionally, after obtaining the daily accounts to be processed, multiple bill information can be divided into multiple bill sets according to the type of user information to be processed, each bill set includes multiple bill information with the same user information to be processed, and the user information to be processed in each bill information in the same bill set can correspond to the same preset physical node in the distributed cache system, and then the preset physical node can be used as the target physical node to query the sales product instances of the user information to be processed in each bill information in the bill set in turn.

[0052] As an optional embodiment, among multiple preset physical nodes in a distributed cache system, assigning a corresponding target physical node to the user information to be processed includes: using the user information to be processed as a key to query the target physical node in the distributed cache system, and calculating the user hash value of the user information to be processed; among multiple preset physical nodes in the distributed cache system, matching the user hash value with the preset hash slot corresponding to each preset physical node; determining the preset hash slot that matches the user hash value as the target hash slot; and determining the preset physical node corresponding to the target hash slot as the target physical node.

[0053] In the above-mentioned embodiment of the present application, the target physical node of the user information to be processed in the distributed cache system can calculate the user hash value, and then match the user hash value with the preset hash slot corresponding to each preset physical node in the distributed cache system, determine the matched preset hash slot as the target hash slot, and configure the preset physical node of the target hash slot as the target physical node, so as to realize the query of the target physical node.

[0054] Optionally, the user hash value can be a value obtained by performing hash processing on the user information to be processed; the preset hash slot is a set of multiple preset values, and can also be a range of values.

[0055] As an optional embodiment, before allocating corresponding target physical nodes to the user information to be processed among multiple preset physical nodes in a distributed cache system, the method also includes: obtaining multiple initial hash slots pre-configured for multiple preset user information, wherein each initial hash slot corresponds to at least one preset user information; detecting the number of preset physical nodes in the distributed cache system; according to the number of nodes, evenly allocating the multiple initial hash slots to obtain multiple initial hash slot sets, wherein the number of initial hash slot sets is the same as the number of nodes, and the number of hash slots of the initial hash slots in the multiple initial hash slot sets is the same; merging the multiple initial hash slots in each initial hash slot set into preset hash slots, and allocating the preset hash slots to each preset physical node.

[0056] In the above-mentioned embodiment of the present application, the daily accounts to be processed can be counted on the side of the operator providing the communication service. Then, when the preset hash slots are configured for the preset physical nodes in the distributed cache system, the total number of service objects of the communication service (that is, the preset user information) and the initial hash slots pre-configured for each preset user information can be known in advance. Then, the initial hash slots configured for multiple preset user information are evenly distributed according to the number of preset physical nodes in the distributed cache system, and multiple initial hash slot sets can be obtained. Each initial hash slot set corresponds to a preset physical node in the distributed cache system, and then the multiple initial hash slots in the same initial hash slot set are merged into the preset hash slot, so that the preset hash slots can be allocated to the preset physical node.

[0057] Optionally, each initial hash slot may correspond to one preset user information or multiple preset user information, wherein, when each initial hash slot corresponds to one preset user information, the initial hash slot is the hash value of the corresponding preset user information; when the initial hash slot corresponds to multiple preset user information, the initial hash slot may represent multiple preset user information using the same communication service (such as a communication package), and the initial hash slot may be determined based on the respective hash values ​​of the multiple preset user information, such as the initial hash slot may be a numerical interval that can cover the hash values ​​of multiple preset user information.

[0058] As an optional embodiment, the method also includes: querying whether there is a user trajectory label corresponding to the user information to be processed in multiple preset trajectory labels recorded in the target physical node; when there is no user trajectory label corresponding to the user information to be processed in the target physical node, using each addressing module in the target physical node one by one to query the sales product instance corresponding to the user information to be processed; generating a preset trajectory label for the user information to be processed based on the query results of multiple addressing modules for the user information to be processed, wherein the query result of each addressing module is used to determine the value of the binary digit corresponding to the addressing module in the preset trajectory label.

[0059] In the above-mentioned embodiment of the present application, the user trajectory label is used to indicate the addressing module that needs to be queried and the addressing module that needs to be skipped. Therefore, before using the addressing module in the target physical node to query the sales product instance, it is possible to first query whether the target physical node has recorded the user trajectory label corresponding to the user information to be processed. The user trajectory label is used to indicate the addressing module that needs to be queried and the addressing module that needs to be skipped. Furthermore, if the user trajectory label is not recorded in the target physical node, each addressing module in the target physical node can be used to obtain the query result of each addressing module one by one, and then a preset trajectory label for the user information to be processed can be generated according to the query result of each addressing module for use when the user information to be processed is queried next time.

[0060] Optionally, a user track tag is recorded in the target physical node, and an addressing module to be used for query can be selected from multiple addressing modules according to the value of each binary digit in the user track tag, and the sales product instances can be queried one by one based on the selected addressing module.

[0061] As an optional embodiment, generating a preset track label for the user information to be processed based on the query results of multiple addressing modules for the user information to be processed includes: detecting the query result of each addressing module, wherein the query result is at least used to indicate whether the addressing module has queried the sales product instance corresponding to the user information to be processed; when the query result indicates that the addressing module has queried the sales product instance corresponding to the user information to be processed, in the preset track label, setting the binary digit corresponding to the addressing module to a first value; when the query result indicates that the addressing module has not queried the sales product instance corresponding to the user information to be processed, in the preset track label, setting the binary digit corresponding to the addressing module to a second value.

[0062] In the above-mentioned embodiment of the present application, when the addressing module includes the sales product instance corresponding to the user information to be processed, the query result includes the queried sales product instance; when the addressing module does not include the sales product instance corresponding to the user information to be processed, the query result indicates that the query failed. Therefore, when the query result of the addressing module includes the queried sales product instance, the binary digit corresponding to the addressing module in the preset trajectory label can be configured as a first value; when the query result of the addressing module indicates that the query failed, the binary digit corresponding to the addressing module in the preset trajectory label can be configured as a second value, thereby realizing the generation of the preset trajectory label.

[0063] As an optional embodiment, the method also includes: detecting the sales product code corresponding to each addressing module in the target physical node, wherein different addressing modules are used to query different sales product instances, and the sales product code is used to indicate the type of the sales product instance queried by the addressing module, and different types of sales product instances have different priorities; arranging multiple sales product codes in order of priority to obtain a priority sequence; and according to the priority sequence, setting the correspondence between the binary digits in the preset trajectory label and the addressing module.

[0064] In the above-mentioned embodiments of the present application, sales product instances have different priorities. For example, the sales product instances of the same user information to be processed can be divided into a main product instance and an auxiliary product instance. The priority of the main product instance is higher than that of the auxiliary product instance. Furthermore, the correspondence between the binary digits in the preset track label and the addressing module can be configured according to the priority of the sales product instance obtained by the addressing module. The higher the priority of the sales product instance, the closer the binary digit corresponding to the addressing module used for the query in the preset track label is.

[0065] Optionally, the sales product instance may include: main product rental fee, historical monthly user status, thousands of groups and hundreds of numbers, ringtone payment, ordinary discounts, general election discounts, guaranteed discounts, and official communication X package Y; the multiple addressing modules include: a first addressing module for querying the main product rental fee, a second addressing module for querying historical monthly user status, a third addressing module for querying thousands of groups and hundreds of numbers, a fourth addressing module for querying ringtone payment, a fifth addressing module for querying ordinary discounts, a sixth addressing module for querying general election discounts, a seventh addressing module for querying guaranteed discounts, and an eighth addressing module for querying official communication X package Y.

[0066] The present invention also provides a preferred embodiment, which provides a method for querying billing daily account package information based on differentiated labels. The method introduces a distributed database data storage and reading device based on Redis, which performs label processing on the addressed data, reduces the query of invalid data, ensures the query delay index, and reduces the query network and CPU consumption. This not only greatly improves the computing efficiency of the billing system, but also improves the accuracy of billing, thereby significantly improving customer satisfaction. Through this innovative method, we can process complex daily account data more efficiently and accurately, and meet the high requirements of operators for daily account billing in the context of rapidly developing communication technology.

[0067] With the rapid development of communication technology, new technologies and services emerge in an endless stream. The tariff products that operators launch to meet customer requirements are becoming more and more complex, and the system functions are becoming more and more complex. Complex package information, high real-time requirements, large data volumes, and increased personalized needs. This places higher demands on the daily account calculation capabilities of the billing system, requiring more advanced algorithms and technologies, and the system architecture must be upgraded to enhance system security and stability in order to improve user experience.

[0068] Figure 2 is a schematic diagram of a system architecture for querying billing daily account package information based on differentiated tags according to an embodiment of the present invention, such as Figure 2 As shown in the figure, the implementation scheme is to perform differentiated label processing on user sales product information, rather than traversing and processing every scenario of all users in general. At the same time, in order to improve the efficiency of repeated reading and writing of large amounts of information, a distributed memory database DCA based on Redis is used to store user main product and package information, as well as labeled data. The DCA database cluster also has high reliability characteristics. For example, if a single host fails, it can still ensure the normal operation of the business system and the normal processing of business, which greatly improves the ability to serve customers.

[0069] It should be noted that the DCA used to query the differentiated labels of billing daily account data is a distributed memory database based on Redis, which has fast reading speed and high storage efficiency. In addition, the cluster has high availability and can be horizontally expanded, which greatly improves the utilization of system resources.

[0070] Figure 3 is a schematic diagram of the overall architecture of a distributed memory database DCA according to an embodiment of the present invention, such as Figure 3 As shown in the figure, in order to improve the data reading and writing rate under large data volume and improve the efficiency of daily account processing, a memory database with distributed node management, authentication, data storage, operation, front-end maintenance and other functions is established based on the Redis memory library and encapsulated in C++ language. It mainly includes: management node (DCAM), service node (DCAS) and data storage node (Redis), with sentinel monitoring, using Redis Sentinel for monitoring and failover. Cluster mode, using RedisCluster to achieve distributed storage and load balancing of data. Data partitioning, using hash slot technology to achieve data partitioning and balanced distribution.

[0071] As an alternative example, Figure 3 As shown in the figure, the cluster used in this case contains 6 servers. Each server is a backup server, which improves the reliability of the system. Assume that the data of a certain sales product selects the storage path through a hash slot. Assume that there is a distributed cache system with 3 physical nodes (Node A, Node B, Node C) and 100 hash slots. The hash value of each key is calculated by hash(key)%100 to get a value between 0 and 99. After that, these 100 hash slots are evenly distributed to the three nodes, for example: hash slots 0-32 are assigned to Node A; hash slots 33-66 are assigned to Node B; hash slots 67-99 are assigned to Node C. When data needs to be stored or retrieved, the system will find the corresponding hash slot according to the hash value of the key, and then determine the physical node where the data is located according to the mapping relationship of the hash slot.

[0072] As an optional example, the differentiated label information query method is deployed on the server for daily account business processing. Each host deploys the same processing process, adopts a stream processing mechanism, and a modulo sharding algorithm. Specifically, the user ID is obtained, and a specific value is obtained through the modulo algorithm. The value is then matched with the number of server nodes. If the results are the same, the user is assigned to the server.

[0073] Figure 4 is a schematic diagram of a daily account calculation process according to an embodiment of the present invention, such as Figure 4As shown, real-time daily accounts (DCSumMsgProxy) and scheduled daily accounts (RentLoad) are obtained, daily account graphs are generated, differentiated label processing, main product instances, pricing plan combinations, event pricing strategies, and daily account calculations are performed; thus, after the daily account graph and before the user formally calculates the daily account, user instance parameters are centrally obtained and processed, rather than traditional single-user data processing. Centralized processing can save computing power and resource utilization.

[0074] For example, the user track label uses an eight-bit binary code (e.g., 10010011) to mark the addressing module (main product rental, historical monthly user status, thousands of groups and hundreds of numbers, ringtone payment, general discounts, general election discounts, guaranteed discounts, and public service X package Y). 0 represents skipping the query logic, and 1 represents entering the query logic. The user's initial label is reset at the beginning of each month and the next month, and all are re-labeled. When the user information changes, the query logic will be reset to determine whether to skip the query logic. Using a differentiated label processing module can reduce invalid information queries, ensure that query latency is reduced, reduce query network and CPU consumption, and improve computing efficiency. This module composes user-level query track labels according to the user addressing logic. Without labels, the default full classification query generates query track labels, and the business queries information according to the query track labels. Changes to users, accounts, and sales items modify or delete labels in real time, and labels are cleaned up regularly every month, and they naturally become invalid over time.

[0075] As an optional example, according to the billing business logic, the following addressing modules are sorted out, such as: differentiated label processing module, main product rental module, historical monthly user status module, thousand groups and hundred numbers module, ringback tone payment module, general discount module, general election discount module, guaranteed discount module, and official communication X package Y module.

[0076] Optionally, the main product rental module determines the basic product type of the user instance, such as mobile phone or broadband, by querying the data in DCA. Different product types have different daily account charging modes, and the default is mobile phone products.

[0077] Optionally, the historical monthly user status module queries whether the user was down for the entire month last month to determine whether the user can carry forward the amount. The number of users who were down for the entire month last month is low. After optimization, only users who were down for the entire month last month will enter this module.

[0078] Optionally, a module for thousands of groups and hundreds of numbers, enterprise-level fixed-line telephones, and the list fee of multiple numbers are charged on one number.

[0079] Optionally, in the ringback tone payment module, the fees incurred by the free ringback tone ordered by the user are paid by the designated user.

[0080] Optionally, the general preferential module calculates preferential treatment such as rent reduction or discount for users.

[0081] Optionally, the general election discount module mainly caps mobile Internet traffic, with a cap of 450 yuan for postpaid 4G users, 600 yuan for 5G users, and 50 yuan for prepaid users, accounting for about 0.001%, which is a small proportion.

[0082] Optionally, a guaranteed discount module is a module that calculates the user's minimum consumption or minimum payment.

[0083] Optionally, the X package for the official communication module includes Y package. When the user orders the official communication module, X package includes Y package. If the fee is less than Y, X will be charged; if the fee is greater than Y, X + (actual fee - Y) will be charged.

[0084] Figure 5 is a schematic diagram of a method for implementing billing daily account package information query based on differentiated tags according to an embodiment of the present invention, such as Figure 5 As shown, the method comprises the following steps:

[0085] Step S51, the billing system makes a daily account, reads the user product information according to the user instance ID sent by the program, and distinguishes the sales product instance information.

[0086] Step S52, initialize the user tag 11111111 according to the user information in step S51, and enter all daily account function modules by default.

[0087] Step S53, determine the rental fee, discount, and enter the sales product information query calculation process based on the data verification in step S52. The pricing addressing process needs to include: main product rental fee calculation process, historical monthly user status record process, thousand group and hundred number calculation process, ringtone payment calculation process, general discount, general election discount, guaranteed discount, and official communication X package Y and other calculation modules. The above processes all need to query the relationship between the main product instance information and the sales product instance, and then determine whether it is a rental fee or discount type to determine the addressing process. The specific steps include:

[0088] Step S531, query the user's main product instance and subsidiary product instance, and obtain the main product and subsidiary product information.

[0089] Step S532, query the user's sales product instance relationship to obtain the sales product code.

[0090] Step S533, if the user can query the above information, the priority is determined in order: main product rental, ancillary product rental, ringback tone payment, general preferential process, general election preferential process, official communication X package Y process, and guaranteed minimum preferential process.

[0091] Step S534, obtain the pricing paragraph code according to the sales product code obtained in the above steps.

[0092] In this process, the user tag is automatically changed, and the addressing modules that need to be entered are determined through the timed daily account, and the automatic change of the user tag identification is triggered. If the user does not have this scene data, the corresponding position is set to "0", and this logic will be skipped during the next user daily account addressing.

[0093] Step S54: According to step S53, when the user information is changed, such as a new general discount is accepted, the user tag is changed, and the fifth position is "1". The same applies to other information changes.

[0094] Step S54, according to step S54, find the corresponding sales product, find the corresponding paragraph, rate, and discount through the event strategy for charging. Arrange the event strategy, paragraph, rate, and discount rule information corresponding to the sales product in order, and traverse the results to charge the rent and discount.

[0095] Compared with the traditional method of traversing all processing scenarios, the technical solution provided by this application uses differentiated label processing, which improves the efficiency of package queries and shortens the time for daily account calculations. Compared with the traditional deployment mode, the information reading and writing method based on the memory database Redis is used, which makes the information reading speed faster. At the same time, the architecture has a multi-node high-availability deployment method and can dynamically expand and shrink capacity. Compared with the traditional technical architecture, it is more practical, efficient and innovative.

[0096] This application provides a technical solution that can effectively improve the efficiency of daily account calculation, improve system utilization, ensure the timeliness and accuracy of billing daily account processing, and effectively improve customer perception and enterprise service level. It is mainly manifested in: after the differentiated label addressing function based on daily account product package information query is launched, the system efficiency is improved by (1-X)*N compared with the previous system, where N represents the total number of times all data are queried DCA, X represents the remaining proportion of DCA that needs to be queried, and (1-X)*N is the final reduction.

[0097] Table 1 is a schematic table comparing the number of DCA queries before and after a process transformation according to an embodiment of the present invention. As shown in Table 1, the following data are estimated based on the minimum number of queries for process entry, without considering abnormal ordering scenarios, such as: users join thousands of groups and hundreds of numbers, but the groups do not order sales products, etc. The minimum number of queries for data services before the transformation is 13, and the minimum number of queries is reduced by 6 after the transformation; the minimum number of queries for voice and SMS services before the transformation is 15, and the minimum number of queries is reduced by 9 after the transformation.

[0098] Table 1

[0099]

[0100]

[0101] Compared with the traditional method of traversing all product package information of the user during the calculation of the daily billing account, the above-mentioned embodiment of the present application uses a differentiated label processing method to improve the efficiency of daily account calculation, improve the query hit rate, and reduce network empty packets; the DCA distributed memory database based on Redis is adopted. Compared with the traditional database, the data reading speed is faster after the DCA memory database is deployed, the host data cost utilization rate is reduced by 10%, the efficiency is higher, and data persistence is provided.

[0102] The technical solution provided by this application stores data in a memory database and performs labeling processing, which can significantly improve the work efficiency of communication operators in the process of sales product information query, shorten the calculation waiting time, and at the same time reduce the burden on the server, reduce operating costs, improve system utilization, and reduce resource investment. In addition, this method also provides convenient conditions for the rapid access of new services or products in the future. In summary, this technological innovation is of great significance in optimizing user experience, enhancing service quality, and controlling operating costs.

[0103] According to an embodiment of the present invention, an information query device embodiment is also provided. It should be noted that the information query device can be used to execute the information query method in the embodiment of the present invention, and the information query method in the embodiment of the present invention can be executed in the information query device.

[0104] Figure 6 is a schematic diagram of an information query device according to an embodiment of the present invention. Figure 6As shown, the device may include: an acquisition module 62, which is used to acquire a daily account to be processed, wherein the daily account to be processed includes: multiple billing information, each billing information includes at least: user information to be processed and product information; an allocation module 64, which is used to allocate a corresponding target physical node to the user information to be processed among multiple preset physical nodes in the distributed cache system, wherein each preset physical node in the distributed cache system is pre-configured with a corresponding preset hash slot, and the user information to be processed is used as a key to query the target physical node in the distributed cache system, and the user hash value of the user information to be processed is calculated, and the user hash value falls into the target hash slot corresponding to the target physical node; a first query module 66, which is used to record multiple preset physical nodes in the target physical node Assume that in the trajectory tag, the user trajectory tag corresponding to the user information to be processed is queried, wherein the target physical node at least records the correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag includes: multiple binary digits, and the target physical node includes: multiple addressing modules, the binary digits correspond to the addressing modules one by one, in each binary digit, the first value indicates that the addressing module is selected, and the second value indicates that the addressing module is not selected; the second query module 68 is used to query the sales product instance corresponding to the user information to be processed in the selected addressing module according to the user trajectory tag, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0105] It should be noted that the acquisition module 62 in this embodiment can be used to execute step S102 in the embodiment of the present application, the allocation module 64 in this embodiment can be used to execute step S104 in the embodiment of the present application, the first query module 66 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the second query module 68 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0106] In an embodiment of the present invention, in the case of calculating cost data for the daily account to be processed, a target physical node for processing the user information to be processed is selected from the distributed cache system, so as to achieve the purpose of using multiple preset physical nodes in the distributed cache system to perform distributed processing on different information to be processed, and realize the technical effect of improving processing efficiency. Then, the user trajectory label corresponding to the user information to be processed is used to select the addressing module for querying the sales product instance, which can improve the selection efficiency of the addressing module, and the multiple binary digits in the user trajectory label can represent the selected addressing module and the unselected addressing module, thereby realizing the screening of the addressing modules required for the user information to be processed, eliminating the addressing modules that do not need to be queried, and thus improving the query efficiency of the addressing module, and can more quickly query the sales product instance used to calculate the product information, and further obtain the cost data corresponding to the user information to be processed, achieving the technical effect of improving the query efficiency of the sales product instance, and thus solving the technical problem of low efficiency of the query method of daily account calculation sales product parameters in the prior art.

[0107] As an optional embodiment, the device also includes: a first detection submodule, which is used to detect whether there is billing information with the same user information to be processed in the daily account to be processed after obtaining the daily account to be processed; and a merging submodule, which is used to merge the product information corresponding to the same user information to be processed in multiple billing information when there is billing information with the same user information to be processed in the daily account to be processed.

[0108] As an optional embodiment, the allocation module includes: a calculation unit, used to calculate the user hash value of the user information to be processed by using the user information to be processed as the key for querying the target physical node in the distributed cache system; a matching unit, used to match the user hash value with the preset hash slot corresponding to each preset physical node in multiple preset physical nodes in the distributed cache system; a first determination unit, used to determine the preset hash slot that matches the user hash value as the target hash slot; and a second determination unit, used to determine the preset physical node corresponding to the target hash slot as the target physical node.

[0109] As an optional embodiment, the device also includes: an acquisition submodule, used to acquire multiple initial hash slots pre-configured for multiple preset user information before allocating corresponding target physical nodes to the user information to be processed in multiple preset physical nodes in the distributed cache system, wherein each initial hash slot corresponds to at least one preset user information; a second detection submodule, used to detect the number of preset physical nodes in the distributed cache system; a first allocation submodule, used to evenly allocate multiple initial hash slots according to the number of nodes to obtain multiple initial hash slot sets, wherein the number of sets of initial hash slots is the same as the number of nodes, and the number of hash slots of the initial hash slots in the multiple initial hash slot sets is the same; a second allocation submodule, used to merge multiple initial hash slots in each initial hash slot set into preset hash slots, and allocate the preset hash slots to each preset physical node.

[0110] As an optional embodiment, the device also includes: a first query submodule, used to query whether there is a user trajectory label corresponding to the user information to be processed in multiple preset trajectory labels recorded in the target physical node; a second query submodule, used to use each addressing module in the target physical node one by one to query the sales product instance corresponding to the user information to be processed when there is no user trajectory label corresponding to the user information to be processed in the target physical node; a generation submodule, used to generate a preset trajectory label for the user information to be processed based on the query results of multiple addressing modules for the user information to be processed, wherein the query result of each addressing module is used to determine the value of the binary digit corresponding to the addressing module in the preset trajectory label.

[0111] As an optional embodiment, generating a sub-module signature includes: a detection unit, which is used to detect the query result of each addressing module, wherein the query result is at least used to indicate whether the addressing module has queried the sales product instance corresponding to the user information to be processed; a first setting unit, which is used to set the binary digit corresponding to the addressing module to a first value in the preset track label when the query result indicates that the addressing module has queried the sales product instance corresponding to the user information to be processed; and a second setting unit, which is used to set the binary digit corresponding to the addressing module to a second value in the preset track label when the query result indicates that the addressing module has not queried the sales product instance corresponding to the user information to be processed.

[0112] As an optional embodiment, the device also includes: a third detection submodule, used to detect the sales product code corresponding to each addressing module in the target physical node, wherein different addressing modules are used to query different sales product instances, and the sales product code is used to indicate the type of the sales product instance queried by the addressing module, and different types of sales product instances have different priorities; a sorting submodule, used to arrange multiple sales product codes in order of priority to obtain a priority sequence; a setting submodule, used to set the correspondence between the binary digits in the preset trajectory label and the addressing module according to the priority sequence.

[0113] An embodiment of the present invention may provide an electronic device, which may be a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0114] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0115] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the information query method: obtaining a daily account to be processed, wherein the daily account to be processed includes: multiple billing information, each billing information includes at least: user information to be processed and product information; among multiple preset physical nodes in the distributed cache system, assigning a corresponding target physical node to the user information to be processed, wherein each preset physical node in the distributed cache system is pre-configured with a corresponding preset hash slot, using the user information to be processed as a key to query the target physical node in the distributed cache system, calculating the user hash value of the user information to be processed, and the user hash value falls into the target hash slot corresponding to the target physical node; recording in the target physical node Among multiple preset trajectory tags, query the user trajectory tag corresponding to the user information to be processed, wherein the target physical node at least records the correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag includes: multiple binary digits, and the target physical node includes: multiple addressing modules, the binary digits correspond to the addressing modules one by one, in each binary digit, the first value indicates that the addressing module is selected, and the second value indicates that the addressing module is not selected; according to the user trajectory tag, query the sales product instance corresponding to the user information to be processed in the selected addressing module, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0116] Figure 7 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 7As shown, the computer terminal 70 may include: one or more (only one is shown in the figure) processors 72 and a memory 74 .

[0117] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the information query method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned information query method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal 70 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0118] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the daily account to be processed, wherein the daily account to be processed includes: multiple bill information, each bill information includes at least: user information to be processed and product information; among multiple preset physical nodes in the distributed cache system, assign corresponding target physical nodes to the user information to be processed, wherein each preset physical node in the distributed cache system is pre-configured with a corresponding preset hash slot, and the user information to be processed is used as the key to query the target physical node in the distributed cache system, and the user hash value of the user information to be processed is calculated, and the user hash value falls into the target hash slot corresponding to the target physical node; the Among multiple preset trajectory tags, query the user trajectory tag corresponding to the user information to be processed, wherein the target physical node at least records the correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag includes: multiple binary digits, and the target physical node includes: multiple addressing modules, the binary digits correspond to the addressing modules one by one, in each binary digit, the first value indicates that the addressing module is selected, and the second value indicates that the addressing module is not selected; according to the user trajectory tag, query the sales product instance corresponding to the user information to be processed in the selected addressing module, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0119] Optionally, the processor may also execute the program code of the following steps: detecting whether there is billing information with the same user information to be processed in the daily account to be processed; if there is billing information with the same user information to be processed in the daily account to be processed, merging the product information corresponding to the same user information to be processed in multiple billing information.

[0120] Optionally, the processor may also execute the program code of the following steps: using the user information to be processed as the key for querying the target physical node in the distributed cache system, calculating the user hash value of the user information to be processed; matching the user hash value with the preset hash slot corresponding to each preset physical node in the multiple preset physical nodes in the distributed cache system; determining the preset hash slot that matches the user hash value as the target hash slot; and determining the preset physical node corresponding to the target hash slot as the target physical node.

[0121] Optionally, the processor may also execute the program code of the following steps: obtaining multiple initial hash slots pre-configured for multiple preset user information, wherein each initial hash slot corresponds to at least one preset user information; detecting the number of preset physical nodes in the distributed cache system; evenly distributing the multiple initial hash slots according to the number of nodes to obtain multiple initial hash slot sets, wherein the number of initial hash slot sets is the same as the number of nodes, and the number of hash slots of the initial hash slots in the multiple initial hash slot sets is the same; merging the multiple initial hash slots in each initial hash slot set into a preset hash slot, and allocating the preset hash slot to each preset physical node.

[0122] Optionally, the processor may also execute the program code of the following steps: querying whether there is a user trajectory tag corresponding to the user information to be processed in the multiple preset trajectory tags recorded in the target physical node; when there is no user trajectory tag corresponding to the user information to be processed in the target physical node, querying the sales product instance corresponding to the user information to be processed using each addressing module in the target physical node one by one; generating a preset trajectory tag for the user information to be processed based on the query results of the multiple addressing modules for the user information to be processed, wherein the query result of each addressing module is used to determine the value of the binary digit corresponding to the addressing module in the preset trajectory tag.

[0123] Optionally, the processor may also execute the program code of the following steps: detecting the query result of each addressing module, wherein the query result is at least used to indicate whether the addressing module has queried the sales product instance corresponding to the user information to be processed; when the query result indicates that the addressing module has queried the sales product instance corresponding to the user information to be processed, in the preset track label, setting the binary digit corresponding to the addressing module to a first value; when the query result indicates that the addressing module has not queried the sales product instance corresponding to the user information to be processed, in the preset track label, setting the binary digit corresponding to the addressing module to a second value.

[0124] Optionally, the processor may also execute the program code of the following steps: detecting the sales product code corresponding to each addressing module in the target physical node, wherein different addressing modules are used to query different sales product instances, and the sales product code is used to indicate the type of the sales product instance queried by the addressing module, and different types of sales product instances have different priorities; arranging multiple sales product codes in order of priority to obtain a priority sequence; and setting the correspondence between the binary digits in the preset trajectory label and the addressing module according to the priority sequence.

[0125] It can be understood by those skilled in the art that Figure 7 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 7 The structure of the electronic device is not limited. For example, the computer terminal 70 may also include Figure 7 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 7 Different configurations are shown.

[0126] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a computer program. The computer program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0127] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the information query method provided in the above embodiment.

[0128] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0129] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining a daily account to be processed, wherein the daily account to be processed includes: multiple billing information, each billing information includes at least: user information to be processed and product information; among multiple preset physical nodes in the distributed cache system, assigning a corresponding target physical node to the user information to be processed, wherein each preset physical node in the distributed cache system is pre-configured with a corresponding preset hash slot, using the user information to be processed as a key for querying the target physical node in the distributed cache system, calculating a user hash value of the user information to be processed, and the user hash value falls into the target hash slot corresponding to the target physical node; recording in the target physical node The user trajectory label corresponding to the user information to be processed is queried from the multiple preset trajectory labels recorded, wherein the target physical node at least records the correspondence between the preset trajectory label and the preset user information, the preset trajectory label includes: multiple binary digits, and the target physical node includes: multiple addressing modules, the binary digits correspond to the addressing modules one by one, in each binary digit, the first value indicates that the addressing module is selected, and the second value indicates that the addressing module is not selected; according to the user trajectory label, in the selected addressing module, the sales product instance corresponding to the user information to be processed is queried, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

[0130] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: detecting whether there is billing information with the same user information to be processed in the daily account to be processed; if there is billing information with the same user information to be processed in the daily account to be processed, merging the product information corresponding to the same user information to be processed in multiple billing information.

[0131] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: using the user information to be processed as a key for querying the target physical node in the distributed cache system, calculating the user hash value of the user information to be processed; matching the user hash value with a preset hash slot corresponding to each preset physical node in multiple preset physical nodes in the distributed cache system; determining the preset hash slot that matches the user hash value as the target hash slot; and determining the preset physical node corresponding to the target hash slot as the target physical node.

[0132] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining multiple initial hash slots pre-configured for multiple preset user information, wherein each initial hash slot corresponds to at least one preset user information; detecting the number of preset physical nodes in the distributed cache system; evenly distributing the multiple initial hash slots according to the number of nodes to obtain multiple initial hash slot sets, wherein the number of initial hash slot sets is the same as the number of nodes, and the number of hash slots of the initial hash slots in the multiple initial hash slot sets is the same; merging the multiple initial hash slots in each initial hash slot set into preset hash slots, and allocating the preset hash slots to each preset physical node.

[0133] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: querying whether there is a user trajectory label corresponding to the user information to be processed in multiple preset trajectory labels recorded in the target physical node; in the case that there is no user trajectory label corresponding to the user information to be processed in the target physical node, using each addressing module in the target physical node one by one to query the sales product instance corresponding to the user information to be processed; generating a preset trajectory label for the user information to be processed based on the query results of multiple addressing modules for the user information to be processed, wherein the query result of each addressing module is used to determine the value of the binary digit corresponding to the addressing module in the preset trajectory label.

[0134] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: detecting the query result of each addressing module, wherein the query result is at least used to indicate whether the addressing module has queried the sales product instance corresponding to the user information to be processed; when the query result indicates that the addressing module has queried the sales product instance corresponding to the user information to be processed, in the preset track label, the binary digit corresponding to the addressing module is set to a first value; when the query result indicates that the addressing module has not queried the sales product instance corresponding to the user information to be processed, in the preset track label, the binary digit corresponding to the addressing module is set to a second value.

[0135] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: detecting the sales product code corresponding to each addressing module in the target physical node, wherein different addressing modules are used to query different sales product instances, and the sales product code is used to indicate the type of the sales product instance queried by the addressing module, and different types of sales product instances have different priorities; arranging multiple sales product codes in order of priority to obtain a priority sequence; and setting the correspondence between the binary digits in the preset trajectory label and the addressing module according to the priority sequence.

[0136] The embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the information query method provided in the above embodiment are implemented.

[0137] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0138] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0141] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0142] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0143] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An information query method, characterized in that: include: Obtaining a daily account to be processed, wherein the daily account to be processed includes: a plurality of billing information, each of which includes at least: user information and product information to be processed; Among multiple preset physical nodes in the distributed cache system, a corresponding target physical node is assigned to the user information to be processed, wherein each of the preset physical nodes in the distributed cache system is pre-configured with a corresponding preset hash slot, the user information to be processed is used as a key to query the target physical node in the distributed cache system, a user hash value of the user information to be processed is calculated, and the user hash value falls into the target hash slot corresponding to the target physical node; Inquiring a user trajectory tag corresponding to the to-be-processed user information from a plurality of preset trajectory tags recorded in the target physical node, wherein the target physical node at least records a correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag comprises: a plurality of binary digits, the target physical node comprises: a plurality of addressing modules, the binary digits correspond to the addressing modules one by one, in each of the binary digits, a first value indicates that the addressing module is selected, and a second value indicates that the addressing module is not selected; Based on the user track label, in the selected addressing module, the sales product instance corresponding to the user information to be processed is queried, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

2. The method according to claim 1, characterized in that After obtaining the daily account to be processed, the method further includes: Detect whether there is the bill information identical to the user information to be processed in the daily account to be processed; When the billing information identical to the user information to be processed exists in the daily account to be processed, the product information corresponding to the same user information to be processed in multiple pieces of the billing information is merged.

3. The method according to claim 1, characterized in that Among a plurality of preset physical nodes in the distributed cache system, allocating a corresponding target physical node for the to-be-processed user information includes: Using the user information to be processed as a key for querying the target physical node in the distributed cache system, calculating a user hash value of the user information to be processed; Among multiple preset physical nodes in the distributed cache system, matching the user hash value with the preset hash slot corresponding to each preset physical node; Determine the preset hash slot that matches the user hash value as the target hash slot; The preset physical node corresponding to the target hash slot is determined as the target physical node.

4. The method according to claim 1, characterized in that: Before allocating a corresponding target physical node to the to-be-processed user information among a plurality of preset physical nodes in the distributed cache system, the method further includes: Acquire a plurality of initial hash slots preconfigured for a plurality of preset user information, wherein each of the initial hash slots corresponds to at least one of the preset user information; Detecting the number of the preset physical nodes in the distributed cache system; According to the number of nodes, the multiple initial hash slots are evenly distributed to obtain multiple initial hash slot sets, wherein the number of the initial hash slot sets is the same as the number of nodes, and the number of the initial hash slots in the multiple initial hash slot sets is the same; The multiple initial hash slots in each initial hash slot set are merged into the preset hash slot, and the preset hash slot is allocated to each preset physical node.

5. The method according to claim 1, characterized in that The method further comprises: querying whether there is a user trajectory tag corresponding to the to-be-processed user information among a plurality of preset trajectory tags recorded in the target physical node; In the case that the user track tag corresponding to the to-be-processed user information does not exist in the target physical node, using each of the addressing modules in the target physical node one by one to query the sales product instance corresponding to the to-be-processed user information; The preset track label of the user information to be processed is generated according to the query results of the multiple addressing modules on the user information to be processed, wherein the query result of each addressing module is used to determine the value of the binary digit corresponding to the addressing module in the preset track label.

6. The method according to claim 5, characterized in that Generating the preset track label of the user information to be processed according to the query results of the multiple addressing modules on the user information to be processed includes: Detecting the query result of each of the addressing modules, wherein the query result is at least used to indicate whether the addressing module has queried the sales product instance corresponding to the user information to be processed; In the case where the query result indicates that the addressing module has queried the sales product instance corresponding to the to-be-processed user information, in the preset track label, the binary digit corresponding to the addressing module is set to the first value; When the query result indicates that the addressing module has not found the sales product instance corresponding to the user information to be processed, the binary digit corresponding to the addressing module is set to the second value in the preset track label.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Detecting the sales product code corresponding to each addressing module in the target physical node, wherein different addressing modules are used to query different sales product instances, and the sales product code is used to indicate the type of the sales product instance queried by the addressing module, and different types of sales product instances have different priorities; Arrange the plurality of sales product codes in order of priority to obtain a priority sequence; According to the priority sequence, the corresponding relationship between the binary digits in the preset track label and the addressing module is set.

8. An information query device, characterized in that: include: An acquisition module is used to acquire the daily account to be processed, wherein the daily account to be processed includes: a plurality of billing information, each of which includes at least: user information and product information to be processed; An allocation module, configured to allocate a corresponding target physical node for the user information to be processed among a plurality of preset physical nodes in a distributed cache system, wherein each of the preset physical nodes in the distributed cache system is pre-configured with a corresponding preset hash slot, and the user information to be processed is used as a key for querying the target physical node in the distributed cache system, and a user hash value of the user information to be processed is calculated, and the user hash value falls into a target hash slot corresponding to the target physical node; A first query module is used to query a user trajectory tag corresponding to the to-be-processed user information from a plurality of preset trajectory tags recorded in the target physical node, wherein the target physical node at least records a correspondence between the preset trajectory tag and the preset user information, the preset trajectory tag comprises: a plurality of binary digits, the target physical node comprises: a plurality of addressing modules, the binary digits correspond to the addressing modules one by one, in each of the binary digits, a first value indicates that the addressing module is selected, and a second value indicates that the addressing module is not selected; The second query module is used to query the sales product instance corresponding to the user information to be processed in the selected addressing module based on the user trajectory label, wherein the sales product instance is used to represent the calculation rule of the product information, and the sales product instance is combined with the product information to calculate the cost data corresponding to the user information to be processed.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the information query method according to any one of claims 1 to 7 through the computer program.

10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the information query method described in any one of claims 1 to 7 are implemented.