CN110490636B - Client information management method, device, computer readable storage medium and server - Google Patents
Client information management method, device, computer readable storage medium and server Download PDFInfo
- Publication number
- CN110490636B CN110490636B CN201910634157.2A CN201910634157A CN110490636B CN 110490636 B CN110490636 B CN 110490636B CN 201910634157 A CN201910634157 A CN 201910634157A CN 110490636 B CN110490636 B CN 110490636B
- Authority
- CN
- China
- Prior art keywords
- record
- client information
- client
- information setting
- sequence number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
Landscapes
- Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Data Mining & Analysis (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for managing client information, a computer readable storage medium, and a server. The method comprises the steps of receiving a client information setting request sent by first terminal equipment, and extracting a first client identifier and client information setting content in the client information setting request; constructing a newly added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number to the newly added client information setting record; inquiring a first anchor point record sequence number in a preset client list according to the first client identifier; if the first anchor point record sequence number is not null, adding the first anchor point record sequence number into the newly-added client information setting record; and storing the newly added client information setting record into the database, and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for managing client information, a computer readable storage medium, and a server.
Background
There are many systems for managing customer information in the prior art, but these customer information management systems are generally aimed at static (basically no change) or quasi-static (very low frequency of change) customer information such as name, gender, contact, home address, etc. In practical applications, there is a large amount of dynamically changing client information, and the client information is usually set by a plurality of terminal devices in a common participation manner, so that the client information can change continuously with time, corresponding client information setting records can be accumulated gradually with time, and if the existing client information management mode is adopted, the records of the same client can be distributed in a disordered manner, so that the efficiency of managing and querying the client information is lower.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a computer readable storage medium, and a server for managing client information, so as to solve the problem that when client information is dynamically changed, the existing client information management manner can cause records of the same client to be distributed in disorder, thereby making the efficiency of managing and querying the client information lower.
A first aspect of an embodiment of the present invention provides a method for managing client information, which may include:
receiving a client information setting request sent by first terminal equipment, and extracting a first client identifier and client information setting content in the client information setting request;
constructing a newly added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number to the newly added client information setting record;
inquiring a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the first client identifier stored in a preset database;
if the first anchor point record sequence number is not null, adding the first anchor point record sequence number into the newly-added client information setting record;
and storing the newly added client information setting record into the database, and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record.
A second aspect of an embodiment of the present invention provides a client information management apparatus, which may include:
A setting request receiving module, configured to receive a client information setting request sent by a first terminal device, and extract a first client identifier and a client information setting content in the client information setting request;
the record construction module is used for constructing a newly-added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number for the newly-added client information setting record;
the first sequence number inquiring module is used for inquiring a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the first client identifier stored in a preset database;
the record sequence number adding module is used for adding the first anchor point record sequence number into the newly-added client information setting record if the first anchor point record sequence number is not null;
and the record storage module is used for storing the newly added client information setting record into the database and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record.
A third aspect of embodiments of the present invention provides a computer readable storage medium storing computer readable instructions which when executed by a processor perform the steps of:
receiving a client information setting request sent by first terminal equipment, and extracting a first client identifier and client information setting content in the client information setting request;
constructing a newly added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number to the newly added client information setting record;
inquiring a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the first client identifier stored in a preset database;
if the first anchor point record sequence number is not null, adding the first anchor point record sequence number into the newly-added client information setting record;
and storing the newly added client information setting record into the database, and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record.
A fourth aspect of the embodiments of the present invention provides a server comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer readable instructions to perform the steps of:
receiving a client information setting request sent by first terminal equipment, and extracting a first client identifier and client information setting content in the client information setting request;
constructing a newly added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number to the newly added client information setting record;
inquiring a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the first client identifier stored in a preset database;
if the first anchor point record sequence number is not null, adding the first anchor point record sequence number into the newly-added client information setting record;
and storing the newly added client information setting record into the database, and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the embodiment of the invention firstly receives a client information setting request sent by first terminal equipment, extracts a first client identifier and client information setting content in the client information setting request, constructs a newly-increased client information setting record according to the first client identifier and the client information setting content, distributes a record sequence number for the newly-increased client information setting record, inquires a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is the record sequence number of the last client information setting record corresponding to the first client identifier stored in a preset database, adds the first anchor point record sequence number into the newly-increased client information setting record if the first anchor point record sequence number is not empty, stores the newly-increased client information setting record into the database, and finally changes the first anchor point record sequence number in the client list into the record sequence number of the newly-increased client information setting record. According to the embodiment of the invention, when a new customer information setting record is added for a certain customer, the record serial number of the last customer information setting record of the customer is added into the record, which is equivalent to the index of jumping to the previous record left in the newly added customer information setting record.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of communication connection between a server and each terminal device;
FIG. 2 is a schematic illustration of a cluttered distribution of customer information setup records across a database;
FIG. 3 is a flow chart of an embodiment of a method for managing customer information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a complete record chain linking all records presented by the same customer in a cluttered distribution;
FIG. 5 is a schematic diagram of validation rules for customer information;
FIG. 6 is a block diagram of an embodiment of a client information management apparatus according to an embodiment of the present invention;
fig. 7 is a schematic block diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For convenience of description, the term "customer information" refers to dynamically changing customer information, such as a customer's billing price, unless otherwise specified.
The customer information is determined by a plurality of basic attributes with different dimensions, wherein the total dimension number of the basic attributes is DN, and the basic attributes with the dimensions are numbered according to the sequence of 1, 2, 3, …, d, … and DN, and d is more than or equal to 1 and less than or equal to DN.
In a specific application scenario of this embodiment, determining the basic attribute of the client information may include the following three dimensions: product attributes, zone attributes, customer attributes, i.e., dn=3.
The product attribute refers to which product is used by the customer, and in this embodiment, all the products provided to the customer are classified according to the level from high to low of the product type, the product series, the product specification, and the like. Taking the scenario of providing cloud services to customers as an example, product types may include cloud servers, yun Cipan, etc., product families may include RBD-instancevpc3.0, RBD cloud hosts, SSD Yun Cipan, etc., and product specifications may include esc.hqc.clm2, ecs.ra.c4m4, ecs.r2.c2m4, etc.
For each product specification there is corresponding reference information including, but not limited to: charging type (e.g., may be metering, monthly, etc.), charging unit price, charging unit (e.g., may use CNY or USD as charging unit), whether ladder pricing and ladder pricing rules, etc. It should be noted that the reference information is not distinguished from the region and the customer, and the products with the same product specification all have the same reference information.
The regional attribute refers to a geographical area where the client is located, for example, in a specific implementation of this embodiment, the geographical area of the client may be divided into regions of northeast, north-south, south-south, east-west, north-west, etc., and of course, other regional division manners may be adopted according to actual situations, which is not limited specifically herein.
The client attribute refers to which client uses the service, and in this embodiment, each client may be assigned a client identifier in advance, where the client identifier is unique in the entire system, and the client identifiers of different clients are different from one client to another.
The product attribute, the region attribute and the client attribute jointly determine the adjustment coefficient for adjusting the client information, namely the adjustment coefficients for different products (based on product series), different regions and different clients can be different, and the adjustment information table shown as follows is formed:
product series | Region (zone) | Client and method for providing a customer with a service | Adjustment coefficient |
RBD cloud host | South China | tenant015 | 0.7 |
RBD cloud host | South China | tenant022 | 0.5 |
RBD cloud host | East China | tenant015 | 0.9 |
RBD cloud host | East China | tenant022 | 0.88 |
SSD Yun Cipan | South China | tenant015 | 0.92 |
SSD Yun Cipan | South China | tenant022 | 0.65 |
SSD Yun Cipan | East China | tenant015 | 0.9 |
SSD Yun Cipan | East China | tenant022 | 0.98 |
…… | …… | …… | …… |
The final customer information is obtained by performing a cartesian product operation on the reference information table and the adjustment information table, for example, if the pricing of the product specifications under the two RBD cloud host product series of esc.hqc.clm2 and ecs.ra.c4m4 in the reference information is A, B, the following final customer information can be obtained after performing a cartesian product operation on the adjustment information table:
In this embodiment, the terminal devices of the business points in the area where the client belongs can be used as terminal devices for processing the client information, have the authority to set the client information, and establish communication connection with the server (the implementation subject of this embodiment) for managing the client information, as shown in fig. 1.
In order to improve the security of communication, in this embodiment, a symmetric encryption communication mode is adopted, when a terminal device and a server communicate, a sender encrypts a communication content by using a key, and a receiver decrypts the communication content by using the same key after receiving the communication content. The symmetric encryption algorithm used in this embodiment includes, but is not limited to, DES, 3DES, TDEA, blowfish, RC, RC4, RC5, IDEA, SKIPJACK, AES, and the like.
In the prior art, the key used in most scenes is unchanged for a long time, but the security is lower, and the key is easy to crack by a third party in the long-term use process, in order to solve the problem, in the embodiment, a periodically changing key processing mode is adopted, namely, a server redistributes a new key to the terminal equipment in communication with the server at regular intervals, but the server needs to frequently send the new key to the terminal equipment in the mode, so that the risk of capturing the key in the transmission process is greatly increased.
In this case, in this embodiment, when the server needs to reassign a new key to the terminal device at regular intervals, a first value may be first generated by a preset random number generation algorithm and sent to the first terminal device. The first terminal device may be any terminal device having a right to set client information, and the random number generation algorithm may be any random number generation algorithm in the prior art, which is not specifically limited in this embodiment.
Then, the server and the first terminal device will each calculate a key corresponding to the first terminal according to the following formula:
KEY=HashFunc(RdmNm1)
wherein RdmNm1 is the first value, hashFunc is a preset hash function, and the specific algorithm based on which the hash function used in this embodiment may include, but is not limited to, MD4, MD5, SHA1 and other commonly used hash algorithms, and KEY is a KEY corresponding to the first terminal.
By the method, under the condition that the secret key is not directly transmitted, the server and the first terminal equipment generate the same secret key respectively and use the secret key to communicate, and even if a third party intercepts a first numerical value sent by the server, the third party cannot determine the secret key according to the first numerical value, so that the communication safety is greatly improved.
In order to further increase the security of the communication, in another specific implementation of the present embodiment, instead of using a single hash function, a set of hash functions composed of two or more different hash functions (i.e., candidate hash functions) is used, and each time a key is generated, a different hash function is used.
The number of candidate hash functions included in the hash function set is denoted FcNum, the candidate hash functions are respectively ordered according to serial numbers of 1, 2, 3, …, f, … and FcNum, wherein f is equal to or greater than 1 and is equal to or less than FcNum, and when the hash functions are selected, a server can generate a second numerical value through the random number generation algorithm and send the second numerical value to the first terminal equipment.
Then, the server and the first terminal device will each select a candidate hash function from the set of hash functions as the hash function for performing the key calculation according to the following formula:
FcSeq=MOD(RdmNm2,FcNum)+1
wherein MOD is a remainder function, rdmNm2 is the second value, fcSeq is a sequence number of the hash function selected to perform key calculation in the hash function set.
In order to further increase the security of communication, in another specific implementation of the present embodiment, before calculating the key corresponding to the first terminal, the server may generate a third value by using the random number generation algorithm, and send the third value to the first terminal device.
Then, the server and the first terminal device will each calculate the number of bits of the shift operation according to the following formula:
ShiftLen=MOD(RdmNm3,Len)
wherein RdmNm3 is the third value, len is the total number of bits in binary form of the first value, and ShiftLen is the number of bits of the shift operation.
Then, the server and the first terminal device will each perform a shift operation on the first value according to the following formula:
NewRdmNm1=RdmNm1<<ShiftLen
or (b)
NewRdmNm1=RdmNm1>>ShiftLen
Wherein < is a left shift operator, > > is a right shift operator, and NewRdmNm1 is a first value after the shift operation.
The formula for calculating the key will become: key=hashfunc (NewRdmNm 1).
In the process of communication between the server and the terminal equipment by using the secret key generated by the method, the server extracts the client identification and the client information setting content of the time from the dynamic client information setting request reported by the terminal equipment every time the server receives the dynamic client information setting request, and stores the client identification and the client information setting content in a preset database in the form of a client information setting record for subsequent management and inquiry. However, customer information set records may accumulate gradually over time, and the records of the same customer may appear in a cluttered distribution in the database.
For example, the terminal device 1 sets client information of a client in 2018, 1 and 1, and stores the client information into a database through a server, wherein the stored record number is #196;
the terminal equipment 2 sets the client information of the client in 2018, 2 nd and 1 st, and stores the client information into a database through a server, wherein the stored record serial number is #58267;
the terminal equipment 3 sets the client information of the client in 2018, 3 and 1 days, and stores the client information into a database through a server, wherein the stored record serial number is #206579;
.................
and so on, the customer information setting records of the customer are scattered throughout the database in a cluttered manner, as shown in fig. 2.
Each time the customer information of the customer needs to be queried, the customer information setting record containing the customer identifier needs to be searched in the whole database, and even if the customer information of the customer is searched, the customer information cannot be determined to be complete, and the complete customer information of the customer can be finally obtained after the whole database is traversed. Thus, each query takes a significant amount of time, and the database becomes increasingly large over time, and the time of the query becomes increasingly long.
In order to solve such a problem, the present embodiment adopts a client information management method as shown in fig. 3, which specifically includes:
step S301, a client information setting request sent by a first terminal device is received, and a first client identifier and a client information setting content in the client information setting request are extracted.
When the first terminal device needs to set the client information of a certain client, a client information setting request may be sent to the server, where the client information setting request includes the client identifier of the client, and here, the client information setting request is recorded as a first client identifier and further includes the client information setting content.
Step S302, constructing a new client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number to the new client information setting record.
After the server constructs the newly added client information setting record, the server may assign a record serial number to the newly added client information setting record, in this embodiment, the server may number the newly added client information setting record according to the sequence of generating the client information setting record, for example, the record serial number of the record assignment #1 is set for the 1 st generated client information, the record serial number of the record assignment #2 is set for the 2 nd generated client information, and so on.
Step S303, inquiring a first anchor point record sequence number in a preset client list according to the first client identifier.
The first anchor point record serial number is the record serial number of the last piece of client information (namely, the piece closest to the current moment) corresponding to the first client identifier stored in the database.
And recording the record serial numbers of the last customer information setting record corresponding to each customer identifier in the customer list, and if a certain customer does not have any customer information setting record, setting the record serial number of the last customer information setting record corresponding to the customer identifier is empty. It should be noted that since new customer information setting records are continuously stored in the database, the newly added customer information setting record will replace the last customer information setting record and become the last customer information setting record, and thus the customer list is continuously updated.
Step S304, judging whether the first anchor point record sequence number is empty.
If the first anchor point record sequence number is not null, step S305 and step S306 are executed, and if the first anchor point record sequence number is null, step S305 is not executed any more, and step S306 is executed directly.
Step S305, adding the first anchor point record serial number to the newly added client information setting record.
Step S306, the newly added client information setting record is stored in the database, and the first anchor point record serial number in the client list is changed into the record serial number of the newly added client information setting record.
Thus, when a new client information setting record is added to a certain client, the record serial number of the last client information setting record of the client is added to the record, which is equivalent to the index of jumping to the previous record left in the newly added client information setting record, in this way, all records of the same client which are in disordered distribution can be connected into a complete record chain, as shown in fig. 4.
In this case, when it is necessary to query the client information of a certain client, quick query can be performed by the following procedure:
firstly, the server receives a client information inquiry request sent by the second terminal equipment, and extracts a second client identifier in the client information inquiry request.
The second terminal device may be any terminal device having a setting authority for the client information. The second terminal device and the first terminal device may be the same terminal device or different terminal devices. When the second terminal device needs to query the client information of a certain client, a client information query request can be sent to the server, wherein the client information query request comprises the client identifier of the client, and the client information query request is marked as a second client identifier.
And then, the server inquires a second anchor point record sequence number in the client list according to the second client identifier, wherein the second anchor point record sequence number is the record sequence number of the last piece of client information corresponding to the second client identifier stored in the database.
If the second anchor point record serial number is null, it indicates that the client information setting record corresponding to the second client identifier does not exist in the database, and at this time, the server may send a notification message to the second terminal device, where the notification message is not queried for the client information setting record.
If the second anchor point record sequence number is not null, the server searches for the 1 st selected record in the database according to the second anchor point record sequence number, wherein the selected record is a client information setting record corresponding to the second client identifier.
Then, the client information setting content corresponding to the second client identifier and the record serial number of the (i+1) th selected record are extracted from the (i) th selected record, i is greater than or equal to 1, and in the initial state, i=1 can be set.
If the record sequence number of the (i+1) th selected record is not null, searching the (i+1) th selected record in the database according to the record sequence number of the (i+1) th selected record.
And adding a counting unit to the i, and returning to execute the step of extracting the client information setting content corresponding to the second client identifier and the recording serial number of the i+1th selected record from the i selected record until the recording serial number of the i+1th selected record is empty.
And if the record sequence number of the (i+1) th selected record is empty, the server transmits a client information set content set to the second terminal equipment, wherein the client information set content set comprises client information set contents respectively extracted from all the selected records.
Namely, firstly searching a latest customer information setting record of the customer in a database through a customer identifier, then quickly searching a last customer information setting record according to the record identifier of the last customer information setting record contained in the record, … …, and continuously repeating the process until the record identifier of the last customer information setting record contained in the customer information setting record is empty (i.e. no earlier customer information setting record exists), wherein the whole process directly jumps and searches through indexes, thereby greatly reducing the time required by inquiry.
The final queried set of customer information settings may be as follows:
Wherein each piece of client information setting content comprises a first date, a second date, a third date and client information, the dates are used for controlling the effective period of the client information, and the effective rule of the client information is shown in fig. 5, namely if the client confirmation date falls in the time range from the first date to the second date of a certain piece of client information setting content, the effective period of the client information in the client information setting content is in the time range from the client confirmation date to the third date.
For example, if the client confirmation date is 1 month 2 days, only the client information in the first piece of client information setting content is validated, and the validation period thereof is 1 month 2 days to 12 months 31 days, if the client confirmation date is 3 months 20 days, only the client information in the second piece of client information setting content is validated, and the validation period thereof is 3 months 20 days to 5 months 31 days, and if the client confirmation date is 2 months 10 days, the client information in the first piece of client information setting content and the client information in the second piece of client information setting content are validated, wherein the validation period of the client information in the first piece of client information setting content is 2 months 10 days to 12 months 31 days, and the validation period of the client information in the second piece of client information setting content is 2 months 10 days to 5 months 31 days.
Under the condition that the client information in the set content of the plurality of client information is effective, the server selects one client information which is effective actually according to the push-stack push-off logic, namely the earliest set client information is pushed into the stack at the earliest, the latest push-stack is carried out (namely the selected priority is the lowest), and the latest configured client information is pushed into the stack at the latest, namely the selected priority is the highest.
Still for example, if the client information in the first set of client information and the second set of client information are both validated, but the setting time of the former is later than the setting time of the latter, the client information in the first set of client information is preferentially used, and the validation period thereof is up to 12 months and 31 days, and at this time, the validation period of the client information in the second set of client information has also elapsed. If the setting time of the former is earlier than the setting time of the latter, the client information in the content is set by the second piece of client information preferentially, the effective period of the client information in the content is stopped to 5 months and 31 days, and at the moment, the effective period of the client information in the first piece of client information is not passed, and the client information in the content is set by the first piece of client information continuously until the effective period of the client information in the content is ended in 12 months and 31 days.
In summary, the embodiment of the present invention firstly receives a client information setting request sent by a first terminal device, extracts a first client identifier and a client information setting content in the client information setting request, constructs a new client information setting record according to the first client identifier and the client information setting content, allocates a recording sequence number to the new client information setting record, then queries a first anchor point recording sequence number in a preset client list according to the first client identifier, wherein the first anchor point recording sequence number is a recording sequence number of a last client information setting record corresponding to the first client identifier stored in a preset database, if the first anchor point recording sequence number is not null, adds the first anchor point recording sequence number into the new client information setting record, stores the new client information setting record into the database, and finally changes the first anchor point recording sequence number in the client list into the recording sequence number of the new client information setting record. According to the embodiment of the invention, when a new customer information setting record is added for a certain customer, the record serial number of the last customer information setting record of the customer is added into the record, which is equivalent to the index of jumping to the previous record left in the newly added customer information setting record.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Fig. 6 shows a block diagram of an embodiment of a client information management apparatus according to an embodiment of the present invention, corresponding to a client information management method described in the above embodiment.
In this embodiment, a client information management apparatus may include:
a setting request receiving module 601, configured to receive a client information setting request sent by a first terminal device, and extract a first client identifier and a client information setting content in the client information setting request;
a record construction module 602, configured to construct a new client information setting record according to the first client identifier and the client information setting content, and allocate a record serial number to the new client information setting record;
a first sequence number query module 603, configured to query a preset client list for a first anchor point record sequence number according to the first client identifier, where the first anchor point record sequence number is a record sequence number of a last piece of client information setup record corresponding to the first client identifier stored in a preset database;
A record sequence number adding module 604, configured to add the first anchor point record sequence number to the newly added client information setting record if the first anchor point record sequence number is not null;
the record storage module 605 is configured to store the new added client information setting record in the database, and change the first anchor point record serial number in the client list to the record serial number of the new added client information setting record.
Further, the client information management apparatus may further include:
the query request receiving module is used for receiving a client information query request sent by the second terminal equipment and extracting a second client identifier in the client information query request;
the second serial number query module is used for querying a second anchor point record serial number in the client list according to the second client identifier, wherein the second anchor point record serial number is a record serial number of a last piece of client information setting record corresponding to the second client identifier stored in the database;
the first selected record searching module is used for searching a 1 st selected record in the database according to the second anchor point record sequence number if the second anchor point record sequence number is not null, wherein the selected record is a client information setting record corresponding to the second client identifier;
The information extraction module is used for extracting client information setting content corresponding to the second client identifier and the record serial number of the (i+1) th selected record from the (i) th selected record, wherein i is more than or equal to 1;
the second selected record searching module is used for searching the (i+1) th selected record in the database according to the (i+1) th selected record if the record serial number of the (i+1) th selected record is not empty;
the self-increasing module is used for increasing the i by one counting unit;
and the content set sending module is used for sending a client information set content set to the second terminal equipment if the record serial number of the (i+1) th selected record is empty, wherein the client information set content set comprises client information set contents respectively extracted from all the selected records.
Further, the client information management apparatus may further include:
the first numerical value generation module is used for generating a first numerical value through a preset random number generation algorithm and sending the first numerical value to the first terminal equipment;
a key calculation module, configured to calculate a key corresponding to the first terminal according to the following formula:
KEY=HashFunc(RdmNm1)
wherein RdmNm1 is the first value, hashFunc is a preset hash function, and KEY is a KEY corresponding to the first terminal.
Further, the client information management apparatus may further include:
the second numerical value generation module is used for generating a second numerical value through the random number generation algorithm and sending the second numerical value to the first terminal equipment;
the hash function selection module is used for selecting a candidate hash function from a preset hash function set as a hash function for key calculation according to the following steps:
FcSeq=MOD(RdmNm2,FcNum)+1
the hash function set comprises more than two candidate hash functions, MOD is a residual function, rdmNm2 is the second numerical value, fcNum is the number of the candidate hash functions in the hash function set, and FcSeq is the sequence number of the hash function selected for key calculation in the hash function set.
Further, the client information management apparatus may further include:
the third value generation module is used for generating a third value through the random number generation algorithm and sending the third value to the first terminal equipment;
a bit number calculation module for calculating the bit number of the shift operation according to the following formula:
ShiftLen=MOD(RdmNm3,Len)
wherein RdmNm3 is the third value, len is the total number of bits in binary form of the first value, and ShiftLen is the number of bits of the shift operation;
The shift operation module is used for performing shift operation on the first numerical value according to the following formula:
NewRdmNm1=RdmNm1<<ShiftLen
or (b)
NewRdmNm1=RdmNm1>>ShiftLen
Wherein < is a left shift operator, > > is a right shift operator, and NewRdmNm1 is a first value after the shift operation.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described apparatus, modules and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Fig. 7 shows a schematic block diagram of a server according to an embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown.
In this embodiment, the server 7 may include: a processor 70, a memory 71, and computer readable instructions 72 stored in the memory 71 and executable on the processor 70, such as computer readable instructions for performing the customer information management method described above. The processor 70, when executing the computer readable instructions 72, implements the steps of the various client information management method embodiments described above, such as steps S301 through S306 shown in fig. 1. Alternatively, the processor 70, when executing the computer readable instructions 72, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of modules 601-605 of fig. 6.
Illustratively, the computer readable instructions 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing a specific function describing the execution of the computer readable instructions 72 in the server 7.
The processor 70 may be a central processing unit (Central Processing Unit, CPU) or may be another general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the server 7, such as a hard disk or a memory of the server 7. The memory 71 may be an external storage device of the server 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the server 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the server 7. The memory 71 is used for storing the computer readable instructions as well as other instructions and data required by the server 7. The memory 71 may also be used for temporarily storing data that has been output or is to be output.
The functional units in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, comprising a number of computer readable instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing computer readable instructions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (8)
1. A client information management method, comprising:
receiving a client information setting request sent by first terminal equipment, and extracting a first client identifier and client information setting content in the client information setting request;
constructing a newly added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number to the newly added client information setting record;
inquiring a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the first client identifier stored in a preset database;
If the first anchor point record sequence number is not null, adding the first anchor point record sequence number into the newly-added client information setting record;
storing the newly added client information setting record into the database, and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record;
receiving a client information inquiry request sent by second terminal equipment, and extracting a second client identifier in the client information inquiry request;
inquiring a second anchor point record sequence number in the client list according to the second client identifier, wherein the second anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the second client identifier stored in the database;
if the second anchor point record sequence number is not null, searching a 1 st selected record in the database according to the second anchor point record sequence number, wherein the selected record is a client information setting record corresponding to the second client identifier;
extracting client information setting content corresponding to the second client identifier and a record sequence number of the (i+1) th selected record from the (i) th selected record, wherein i is more than or equal to 1;
If the record sequence number of the (i+1) th selected record is not empty, searching the (i+1) th selected record in the database according to the record sequence number of the (i+1) th selected record;
adding a counting unit to i, and returning to execute the step of extracting the client information setting content corresponding to the second client identifier and the recording serial number of the (i+1) th selected record from the (i) th selected record until the recording serial number of the (i+1) th selected record is empty;
and if the record sequence number of the (i+1) th selected record is empty, transmitting a client information set content set to the second terminal equipment, wherein the client information set content set comprises client information set contents respectively extracted from all the selected records.
2. The client information management method according to claim 1, further comprising, before receiving the client information setting request transmitted by the first terminal device:
generating a first numerical value through a preset random number generation algorithm, and sending the first numerical value to the first terminal equipment;
calculating a key corresponding to the first terminal according to the following formula:
KEY=HashFunc(RdmNm1)
wherein RdmNm1 is the first value, hashFunc is a preset hash function, and KEY is a KEY corresponding to the first terminal.
3. The client information management method according to claim 2, characterized by further comprising, before calculating the key corresponding to the first terminal:
generating a second numerical value through the random number generation algorithm, and sending the second numerical value to the first terminal equipment;
selecting a candidate hash function from a preset hash function set to serve as a hash function for key calculation according to the following formula:
FcSeq=MOD(RdmNm2,FcNum)+1
the hash function set comprises more than two candidate hash functions, MOD is a residual function, rdmNm2 is the second numerical value, fcNum is the number of the candidate hash functions in the hash function set, and FcSeq is the sequence number of the hash function selected for key calculation in the hash function set.
4. The client information management method according to claim 2, characterized by further comprising, before calculating the key corresponding to the first terminal:
generating a third numerical value through the random number generation algorithm, and sending the third numerical value to the first terminal equipment;
the number of bits of the shift operation is calculated according to the following formula:
ShiftLen=MOD(RdmNm3,Len)
wherein RdmNm3 is the third value, len is the total number of bits in binary form of the first value, and ShiftLen is the number of bits of the shift operation;
Performing a shift operation on the first value according to the following formula:
NewRdmNm1=RdmNm1<<ShiftLen
or (b)
NewRdmNm1=RdmNm1>>ShiftLen
Wherein < is a left shift operator, > > is a right shift operator, and NewRdmNm1 is a first value after the shift operation.
5. A client information management apparatus, comprising:
a setting request receiving module, configured to receive a client information setting request sent by a first terminal device, and extract a first client identifier and a client information setting content in the client information setting request;
the record construction module is used for constructing a newly-added client information setting record according to the first client identifier and the client information setting content, and distributing a record serial number for the newly-added client information setting record;
the first sequence number inquiring module is used for inquiring a first anchor point record sequence number in a preset client list according to the first client identifier, wherein the first anchor point record sequence number is a record sequence number of a last piece of client information setting record corresponding to the first client identifier stored in a preset database;
the record sequence number adding module is used for adding the first anchor point record sequence number into the newly-added client information setting record if the first anchor point record sequence number is not null;
The record storage module is used for storing the newly added client information setting record into the database and changing the first anchor point record serial number in the client list into the record serial number of the newly added client information setting record;
the query request receiving module is used for receiving a client information query request sent by the second terminal equipment and extracting a second client identifier in the client information query request;
the second serial number query module is used for querying a second anchor point record serial number in the client list according to the second client identifier, wherein the second anchor point record serial number is a record serial number of a last piece of client information setting record corresponding to the second client identifier stored in the database;
the first selected record searching module is used for searching a 1 st selected record in the database according to the second anchor point record sequence number if the second anchor point record sequence number is not null, wherein the selected record is a client information setting record corresponding to the second client identifier;
the information extraction module is used for extracting client information setting content corresponding to the second client identifier and the record serial number of the (i+1) th selected record from the (i) th selected record, wherein i is more than or equal to 1;
The second selected record searching module is used for searching the (i+1) th selected record in the database according to the (i+1) th selected record if the record serial number of the (i+1) th selected record is not empty;
the self-increasing module is used for increasing the i by one counting unit;
and the content set sending module is used for sending a client information set content set to the second terminal equipment if the record serial number of the (i+1) th selected record is empty, wherein the client information set content set comprises client information set contents respectively extracted from all the selected records.
6. The client information management apparatus according to claim 5, further comprising:
the first numerical value generation module is used for generating a first numerical value through a preset random number generation algorithm and sending the first numerical value to the first terminal equipment;
a key calculation module, configured to calculate a key corresponding to the first terminal according to the following formula:
KEY=HashFunc(RdmNm1)
wherein RdmNm1 is the first value, hashFunc is a preset hash function, and KEY is a KEY corresponding to the first terminal.
7. A computer readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the customer information management method according to any one of claims 1 to 4.
8. A server comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, implements the steps of the customer information management method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910634157.2A CN110490636B (en) | 2019-07-15 | 2019-07-15 | Client information management method, device, computer readable storage medium and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910634157.2A CN110490636B (en) | 2019-07-15 | 2019-07-15 | Client information management method, device, computer readable storage medium and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110490636A CN110490636A (en) | 2019-11-22 |
CN110490636B true CN110490636B (en) | 2023-07-11 |
Family
ID=68547087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910634157.2A Active CN110490636B (en) | 2019-07-15 | 2019-07-15 | Client information management method, device, computer readable storage medium and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110490636B (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5061166B2 (en) * | 2009-09-04 | 2012-10-31 | Kii株式会社 | Data synchronization system and data synchronization method |
JP5838791B2 (en) * | 2011-12-22 | 2016-01-06 | 富士通株式会社 | Program, image processing apparatus and image processing method |
CN106973099B (en) * | 2017-03-28 | 2019-08-06 | Oppo广东移动通信有限公司 | A kind of data-updating method, apparatus and system |
-
2019
- 2019-07-15 CN CN201910634157.2A patent/CN110490636B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110490636A (en) | 2019-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220021527A1 (en) | Secure data distribution protocol using blockchains | |
CN109034809B (en) | Block chain generation method and device, block chain node and storage medium | |
US10091230B1 (en) | Aggregating identity data from multiple sources for user controlled distribution to trusted risk engines | |
CN110224808B (en) | Bank data sharing method and device based on block chain, computer equipment and storage medium | |
CN111448781A (en) | Shared blockchain data storage | |
CN104765749B (en) | A kind of date storage method and device | |
CN108667717B (en) | Block chain processing method, medium, device and computing equipment based on instant messaging message record | |
US20190229931A1 (en) | Distributed telephone number ledger and register | |
US8955143B1 (en) | Use of decoy data in a data store | |
CN112131227A (en) | Data query method and device based on alliance chain | |
US20210158353A1 (en) | Methods, systems, apparatuses, and devices for processing request in consortium blockchain | |
EP3709568A1 (en) | Deleting user data from a blockchain | |
CN108874803A (en) | Date storage method, device and storage medium | |
CN113261024A (en) | Method for routing to mesh network content using block chaining techniques | |
US10326742B1 (en) | Cryptographically enforced data exchange | |
CN104283975A (en) | File distribution method and device | |
CN104902010A (en) | Cloud storage method and system for file | |
WO2020222840A1 (en) | Privacy preserving data collection and analysis | |
US20190372825A1 (en) | Communication apparatus, communication method, and recording medium | |
CN110378753A (en) | A kind of advertisement serving policy determines method and device | |
KR101428649B1 (en) | Encryption system for mass private information based on map reduce and operating method for the same | |
CN110490636B (en) | Client information management method, device, computer readable storage medium and server | |
WO2023087760A1 (en) | Data sharing method and apparatus, device, and storage medium | |
CN103827862A (en) | Data processing device, data management system, data processing method, and program | |
CN103138922A (en) | Method, system and device for transmitting digital contents |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |