An information retrieval method, server, and storage medium
By generating an index table and determining the target index address based on the customer number, and obtaining customer information from the target data source server, the problem of low query efficiency in the existing technology is solved, and efficient query and resource conservation are achieved.
Patent Information
- Application Number
- CN202011022330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2040-09-25
AI Technical Summary
In the prior art, when querying customer information from a database, structured query statements are used to traverse the query, resulting in long query time, low efficiency and serious resource consumption.
By generating an index table, the target index address is determined based on the customer number, and the customer information is directly obtained from the target data source server, avoiding traversal queries.
Shorten the query time, improve query efficiency, reduce resource consumption, and optimize the query process.
Smart Images

Figure CN112162951B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information retrieval technology, and particularly to an information retrieval method, a server, and a storage medium. Background Art
[0002] With the rapid development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology. In the field of Fintech, customer information is particularly important, and how to effectively manage customer information has become a technical problem that urgently needs to be solved. Currently, after obtaining customer information from a third-party data source, the customer relationship management (CRM) system parses and processes the received customer information in a certain format to obtain the required customer information content and saves it to the corresponding relational model in the database (DB). When retrieving information about a specified customer, a structured query statement is used to traverse and query the database to obtain a query result, and the query result is fed back.
[0003] Currently, when using a structured query statement to traverse and query data, a traversal method is used for querying, which requires accessing a large amount of data content, resulting in a long query time, low query efficiency, and relatively serious resource consumption.
[0004] Application Content
[0005] To solve the above technical problems, embodiments of this application are expected to provide an information retrieval method, a server, and a storage medium, which solve the problem of low query efficiency when querying data currently, shorten the query time, improve the query efficiency, and reduce resource consumption.
[0006] The technical solution of this application is implemented as follows:
[0007] In a first aspect, an information retrieval method, the method is applied to a customer relationship management CRM server, and the method includes:
[0008] Receiving a first acquisition request including a customer number sent by a client device;
[0009] Obtaining index tables corresponding to at least one data source to obtain at least one index table;
[0010] Based on the customer number and the at least one index table, determining a target index address of customer target information corresponding to the customer number; wherein, the target index address is used to point to the storage location of the customer target information in a target data source server;
[0011] Send a second acquisition request including the target index address to the target data source server;
[0012] Receive the customer target information sent by the target data source server; wherein, the customer target information is obtained by the target data source server from the storage location corresponding to the target index address;
[0013] In response to the first acquisition request, send the customer target information to the client device.
[0014] In a second aspect, an information retrieval method is applied to a data source server, and the method includes:
[0015] Determine the customer information stored in the data source server;
[0016] Perform grouping processing on the customer information to obtain m groups of files, and determine the file identifier of each group of files; wherein, m is an integer greater than or equal to 1;
[0017] Determine the line offset corresponding to each customer information included in each file in the m groups of files; wherein, each customer information is stored in units of lines;
[0018] Count the column offset corresponding to each information content of each customer information;
[0019] Generate an index table based on the file identifier, the line offset, and the column offset, and send the index table to the CRM server;
[0020] If a second acquisition request including a target index address sent by the CRM server is received, in response to the second acquisition request, obtain customer target information from the storage location corresponding to the target index address, and send the customer target information to the CRM server; wherein, the customer target information belongs to the customer information, and the customer target information is used to be sent to the client device through the CRM server.
[0021] In a third aspect, a CRM server includes: a first memory, a first processor, and a first communication bus; wherein:
[0022] The first memory is used to store executable instructions;
[0023] The first communication bus is used to realize the communication connection between the first processor and the first memory;
[0024] The first processor is used to execute the information retrieval method stored in the first memory to implement the steps of the information retrieval method as described in any one of the above.
[0025] In a fourth aspect, a data source server, the server comprising: a second memory, a second processor, and a second communication bus; wherein:
[0026] The second memory is used for storing executable instructions;
[0027] The second communication bus is used for implementing a communication connection between the second processor and the second memory;
[0028] The second processor is used for executing the information retrieval method stored in the second memory, and implementing the steps of the information retrieval method as described above.
[0029] In a fifth aspect, a storage medium, on which an information retrieval program is stored, and when the information retrieval program is executed by a processor, the steps of the information retrieval method as described in any one of the above are implemented.
[0030] In the embodiments of the present application, the data source server performs grouping processing on the customer information stored by itself, determines the file identifier of each group of files, as well as the row offset corresponding to each customer information included in each file and the column offset corresponding to each information content of each customer information, generates an index table based on the file identifier, row offset, and column offset, and sends it to the CRM server. After the CRM service determines the target index address of the customer target information corresponding to the customer number in the first acquisition request sent by the client device based on at least one index table sent by at least one data source server, it sends the target index address to the target data source server, so that the target data source server can obtain the customer target information from the storage location corresponding to the target index address and send it to the CRM server, and further enables the CRM server to send the obtained customer target information to the client device. In this way, by determining the target index address through the index method and obtaining the corresponding customer target information from the target index address, the problem of low query efficiency when querying data currently is solved, the query time is shortened, the query efficiency is improved, and the resource consumption is reduced. Description of the Drawings
[0031] Figure 1 It is a schematic flowchart of an information retrieval method provided by an embodiment of the present application;
[0032] Figure 2 It is a schematic flowchart of another information retrieval method provided by an embodiment of the present application;
[0033] Figure 3 It is a schematic flowchart of yet another information retrieval method provided by an embodiment of the present application;
[0034] Figure 4 It is a schematic structural diagram of a customer number provided by an embodiment of the present application;
[0035] Figure 5 A schematic diagram for determining a file identifier in an index table based on the position of a file identifier in a customer number provided by an embodiment of the present application;
[0036] Figure 6 A schematic diagram for determining a target index address provided by an embodiment of the present application;
[0037] Figure 7 A schematic diagram for disk storage of a file system provided by an embodiment of the present application;
[0038] Figure 8 A schematic diagram of the structure of a CRM server provided by an embodiment of the present application;
[0039] Figure 9 A schematic diagram of the structure of a data source server provided by an embodiment of the present application. Detailed implementation manners
[0040] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application.
[0041] An embodiment of the present application provides an information retrieval method. Referring to Figure 1 as shown, the method is applied to a customer relationship management (CRM) server, and the method includes the following steps:
[0042] Step 101: Receive a first acquisition request including a customer number sent by a client device.
[0043] In an embodiment of the present application, the client device is a device that can access a web page corresponding to a customer relationship management (CRM) system or can install and run a CRM system application program, such as a computer device, a laptop computer, a tablet computer, a smart phone, or even an in-vehicle computer and other devices.
[0044] A user operates the client device through a corresponding input device such as a keyboard, a voice input device (i.e., a microphone) or a touch screen, etc., and inputs a customer number to expect to obtain customer target information corresponding to the customer number. After receiving the customer number input by the user, the client device generates a first acquisition request for obtaining customer target information corresponding to the customer number through the first acquisition request from the CRM server.
[0045] Step 102: Obtain index tables corresponding to at least one data source to obtain at least one index table.
[0046] In an embodiment of the present application, a CRM server can access at least one data source, that is, a CRM server establishes data business interactions of customer information with at least one data source server, so as to provide customer information for the CRM server through at least one data source server. Among them, one data source corresponds to one index table.
[0047] The CRM server can obtain the index tables corresponding to at least one data source from its own corresponding storage unit. Among them, the at least one index table stored in the storage unit corresponding to the CRM server itself can be the index table generated by the data source server according to its own customer information and the corresponding storage location and sent to the CRM server when the CRM server and the data source server establish a communication link.
[0048] Step 103: Based on the customer number and at least one index table, determine the target index address of the customer target information corresponding to the customer number.
[0049] Among them, the target index address is used to point to the storage location of the customer target information in the target data source server.
[0050] In an embodiment of the present application, the CRM server analyzes at least one index table using the customer number, and determines the target index address of the customer target information corresponding to the customer number from at least one index table.
[0051] Step 104: Send a second acquisition request including the target index address to the target data source server.
[0052] In an embodiment of the present application, after the CRM server determines the target index address, it generates a second acquisition request based on the target index address and sends the second acquisition request to the target data source server. Among them, the target index address points to the storage area of the target data source server.
[0053] Step 105: Receive the customer target information sent by the target data source server.
[0054] Among them, the customer target information is obtained by the target data source server from the storage location corresponding to the target index address.
[0055] In an embodiment of the present application, after the target data source server receives the second acquisition request, it responds to the second acquisition request, obtains the corresponding customer target information from the storage location corresponding to the target index address, and sends the obtained customer target information to the CRM server.
[0056] Step 106: Respond to the first acquisition request and send the customer target information to the client device.
[0057] In an embodiment of the present application, the CRM server responds to the first acquisition request and sends the customer target information sent by the target data source server to the client device, so that the client device performs corresponding processing on the received customer target information. For example, the received customer target information can be displayed in a corresponding display area. In some application scenarios, the CRM server can also perform corresponding analysis processing on the received customer target information and send the analyzed customer target information to the client device.
[0058] In an embodiment of the present application, after receiving the first acquisition request including the customer number sent by the client device, the CRM server determines the target index address of the customer target information corresponding to the customer number from the index tables corresponding to at least one data source, and sends the target index address to the target data source server through the second acquisition request. After receiving the customer target information obtained and sent by the target data source server from the storage location corresponding to the target index address, the CRM server sends the customer target information to the client device. In this way, by using the indexing method to determine the target index address and obtaining the corresponding customer target information from the target index address, the problem of low query efficiency when querying data at present is solved, the query time is shortened, the query efficiency is improved, and the resource consumption is reduced.
[0059] Based on the foregoing embodiments, an embodiment of the present application provides an information retrieval method. Refer to Figure 2 As shown, the method is applied to a data source server, and the method includes the following steps:
[0060] Step 201: Determine the customer information stored in the data source server.
[0061] In an embodiment of the present application, the data source server determines all the customer information stored in itself, or the data source server determines the corresponding incremental customer information relative to the most recent feedback of the index table to the CRM server.
[0062] Step 202: Group the customer information to obtain m groups of files, and determine the file identifier of each group of files.
[0063] Wherein, m is an integer greater than or equal to 1.
[0064] In the embodiments of the present application, the data source server may not actually change the storage location of the customer information stored in itself, but only perform statistical grouping processing on the stored customer information, group the stored customer information to obtain m files, and identify each group of files according to the requirements for naming the files, and determine the file identifier of each group of files. Alternatively, after the data source server collects the customer information, it stores the customer information in the form of files. In this way, the data source server can directly determine the currently stored m groups of files and determine the file identifier of each group of files. It should be noted that the file identifier is identification information used to uniquely identify each group of files.
[0065] Exemplarily, for example, when there are 1000 pieces of customer information in the data source server, the 1000 pieces of customer information are grouped. For example, the customer information from the 0th to the 99th is used as the file content of the file with the file identifier of file 1, the customer information from the 100th to the 199th is used as the file content of the file with the file identifier of file 2, the customer information from the 200th to the 299th is used as the file content of the file with the file identifier of file 3, and so on until the customer information from the 900th to the 999th is used as the file content of the file with the file identifier of file 10, thus obtaining 10 groups of files with m being 10. Alternatively, when the data source server receives the customer information, it stores the customer information in the file with the file identifier of file 1. When there are 100 pieces of customer information stored in file 1, it creates a file with the file identifier of file 2 and stores the other customer information collected in file 2. When there are 100 pieces of customer information stored in file 2, it then creates a file with the file identifier of file 3 and stores the customer information collected in file 3, and so on for repeated operations.
[0066] Step 203: Determine the line offset corresponding to each customer information included in each of the m files.
[0067] Among them, each customer information is stored in units of lines.
[0068] In the embodiments of the present application, in each file, each customer information is stored and recorded in units of lines, that is, one line of information is the customer information of one customer. Among them, each line is further divided into at least one column, and each column is an information content in each customer information. The line offset is determined for the file header of each file.
[0069] Step 204: Statistically calculate the column offset corresponding to each information content of each customer information.
[0070] In the embodiments of the present application, the column offset is determined for the header of each line. In some application scenarios, the column offset of the first column of each line is recorded as 0.
[0071] Step 205: Generate an index table based on the file identifier, line offset, and column offset, and send the index table to the CRM server.
[0072] In the embodiment of the present application, the index table is used to record the storage location corresponding to each file identifier, the storage location corresponding to each line offset in each file identifier, and the storage location corresponding to each column offset in each line. In some application scenarios, when the data source server sends the index table to the CRM server, it can be sent regularly according to a preset period or at a fixed time. The corresponding index table can be an index table including all customer information or an index table corresponding to incremental customer information.
[0073] Step 206: If a second acquisition request including a target index address sent by the CRM server is received, respond to the second acquisition request, acquire the customer target information from the storage location corresponding to the target index address, and send the customer target information to the CRM server.
[0074] Among them, the customer target information belongs to customer information and is used to be sent to the client device through the CRM server.
[0075] In the embodiment of the present application, after the data source server receives the second acquisition request sent by the CRM server, it parses the target index address from the second acquisition request, then acquires the customer target information from the storage location corresponding to the target index address, and sends the customer target information to the CRM server. In this way, the data source server does not need to send all customer information to the CRM server, but only needs to send the customer target information required by the CRM server to the CRM server, effectively reducing the resource consumption of the storage unit in the CRM server and also reducing the consumption of the communication network resources between the data source server and the CRM server.
[0076] In the embodiment of the present application, the data source server groups the customer information stored in itself to obtain m groups of files, determines the file identifier of each group of files, as well as the line offset corresponding to each customer information included in each group of files and the column offset corresponding to each information content of each customer information. Then, an index table is generated based on the file identifier, line offset, and column offset, and the index table is sent to the CRM server. When a second acquisition request including a target index address sent by the CRM server is received, the customer target information is acquired from the storage location corresponding to the target index address, and the customer target information is sent to the CRM server. In this way, the target index address is determined by the index method, and the corresponding customer target information is acquired from the target index address, solving the problem of low query efficiency when querying data currently, shortening the query time, improving the query efficiency, and reducing the resource consumption.
[0077] Based on the foregoing embodiments, an embodiment of the present application provides an information retrieval method. Referring to Figure 3 as shown, the method includes the following steps:
[0078] Step 301: The data source server determines the customer information stored in the data source server.
[0079] In the embodiment of the present application, taking the customer information stored in the data source server determined by the data source server as the most recent incremental customer information as an example, the data source server determines the current incremental customer information.
[0080] Step 302: The data source server performs grouping processing on the customer information to obtain m groups of files, and determines the file identifier of each group of files.
[0081] Wherein, m is an integer greater than or equal to 1.
[0082] In the embodiment of the present application, taking the way that the data source server performs grouping processing on the customer information as an example that the collected customer information is stored in the form of files, the data source server determines the m files in which the incremental customer information is stored, and determines the file identifiers of these m files.
[0083] Step 303: The data source server determines the line offset corresponding to each customer information included in each file in the m groups of files.
[0084] Wherein, each customer information is stored in units of rows.
[0085] Step 304: The data source server counts the column offset corresponding to each information content of each customer information.
[0086] Step 305: The data source server generates an index table based on the file identifier, line offset, and column offset, and sends the index table to the CRM server.
[0087] In the embodiment of the present application, taking the data source server sending the updated index table to the CRM server regularly every day as an example, the data source server updates the index table of the data source server based on the file identifier, line offset, and column offset to obtain the updated index table, and sends the updated index table to the CRM server at the time agreed with the CRM server, such as 6:00 am every day.
[0088] Step 306: The CRM server receives the index table sent by the data source server and stores the index table.
[0089] In the embodiment of the present application, after the CRM server receives the index table sent by the data source server, it stores the index table in the storage unit corresponding to the CRM server. In some application scenarios, after the CRM server receives the index table sent by the data source server, it can delete the historical index table corresponding to the data source server that is stored. Or in some application scenarios, it can compare the received index table sent by the data source server with the historical index table corresponding to the data source server to determine whether the content of the index table has been updated. If the content of the index table has been updated, the historical index table is deleted, and the index table just sent by the data source server this time is stored.
[0090] Step 307: The CRM server receives a first acquisition request including a customer number sent by the client device.
[0091] In the embodiment of the present application, the customer number is identification information agreed upon between the CRM server and the client device to name customer information in a certain format. The customer number can be represented by letters and / or numbers, or a combination of letters and / or numbers and character symbols. When the customer number is represented by numbers, it can be in binary form, decimal form, or hexadecimal form.
[0092] In other embodiments of the present application, after the CRM server executes step 307, it can also choose to execute the following steps: If the format of the customer number does not match the preset number format, the CRM server sends a prompt message to the client device.
[0093] Among them, the prompt message is used to prompt the user that the customer number is incorrect.
[0094] In the embodiment of the present application, the CRM server makes a preliminary judgment on the received customer number to determine whether the customer number is legal, that is, whether the format of the customer number matches the preset number format; if the format of the customer number matches the preset number format, the subsequent relevant steps are continued; if the format of the customer number does not match the preset number format, the CRM server can send a prompt message to the client device, so that after the client device receives the prompt message, it displays the prompt message to prompt the user that the input customer number is incorrect and needs to re-enter the correct customer number.
[0095] Step 308: The CRM server obtains index tables corresponding to at least one data source to obtain at least one index table.
[0096] Step 309: The CRM server parses the customer number to determine the target file identifier, the target line offset, and the target column offset.
[0097] Among them, the length of the target file identifier in the customer number is the first preset number of digits, the length of the target row offset is the second preset number of digits, and the length of the column offset is the third preset number of digits.
[0098] In the embodiments of the present application, the customer number at least includes a target file identifier, a target row offset, and a target column offset. The CRM server parses the customer number to determine the target file identifier, target row offset, and target column offset included in the customer number. In some application scenarios, the customer number can be recorded as, for example, the target file identifier - the target row offset - the target column offset, or (the target file identifier, the target row offset, the target column offset). In some application scenarios, the operation on the customer number can also include an operation of converting the number system, such as converting the decimal data in the customer number into binary data, etc.
[0099] The first preset number of digits, the second preset number of digits, and the third preset number of digits are empirical values, which can be specifically set according to actual needs. The larger the first preset number of digits, the second preset number of digits, and the third preset number of digits are, the larger the capacities of the corresponding CRM server and data source server are, that is, the more customer information can be stored.
[0100] Step 310: The CRM server determines the target data source server identifier based on the customer number.
[0101] In the embodiments of the present application, the CRM server can determine the target data source server identifier according to the format of the customer number, that is, for different data source servers, the formats of the corresponding customer numbers can be different. The CRM server can also identify the data source server identifier included in the customer number to determine the target data source server identifier.
[0102] Step 311: The CRM server determines the target index table that matches the target data source server identifier from at least one index table.
[0103] Step 312: The CRM server determines the target index address from the target index table based on the target file identifier, the target row offset, and the target column offset.
[0104] Among them, the target index address is used to point to the storage location of the customer target information in the target data source server.
[0105] In other embodiments of the present application, step 312 can be implemented by step a11, or steps a12 - a13, or steps a14 - a16:
[0106] Step a11: If the target file identifier is not empty and both the target row offset and the target column offset are empty, the CRM server determines, from the target index table, the storage address corresponding to the target file identifier as the target index address.
[0107] In the embodiment of the present application, that the target file identifier is not empty and both the target row offset and the target column offset are empty indicates that the customer information required by the client device is all the customer information in the target file corresponding to the entire target file identifier.
[0108] Step a12: If the target file identifier and the target row offset are not empty and the target column offset is empty, the CRM server determines, from the target index table, the first sub-index table corresponding to the target file identifier.
[0109] In the embodiment of the present application, that the target file identifier and the target row offset are not empty and the target column offset is empty indicates that what the client device needs is the entire customer target information corresponding to the target row offset in the target file corresponding to the target file identifier.
[0110] Step a13: The CRM server determines, from the first sub-index table, the storage address corresponding to the target row offset as the target index address.
[0111] Step a14: If the target file identifier, the target row offset, and the target column offset are all not empty, the CRM server determines, from the target index table, the second sub-index table corresponding to the target file identifier.
[0112] In the embodiment of the present application, that the target file identifier, the target row offset, and the target column offset are all not empty indicates that what the client device needs is the customer target information corresponding to the information after the target column offset corresponding to the target row offset in the target file corresponding to the target file identifier.
[0113] Step a15: The CRM server determines, from the second sub-index table, the reference row corresponding to the target row offset.
[0114] Step a16: The CRM server determines, from the reference row, the reference position corresponding to the target column offset plus 1 to the last column as the target index address.
[0115] Step 313: The CRM server sends a second acquisition request including the target index address to the target data source server.
[0116] Step 314: If receiving the second acquisition request including the target index address sent by the CRM server, the data source server responds to the second acquisition request, acquires the customer target information from the storage location corresponding to the target index address, and sends the customer target information to the CRM server.
[0117] Among them, the customer target information belongs to the customer information, and the customer target information is used to be sent to the client device through the CRM server.
[0118] In the embodiment of the present application, if the data source server receives a second acquisition request including the target index address sent by the CRM server, then it can be determined that the data source server is the target data source server determined for the CRM server.
[0119] Step 315: The CRM server receives the customer target information sent by the target data source server.
[0120] Among them, the customer target information is obtained by the target data source server from the storage location corresponding to the target index address.
[0121] Step 316: The CRM server responds to the first acquisition request and sends the customer target information to the client device.
[0122] It should be noted that there is at least one data source server that establishes a communication link with the CRM server. The operation processes of other data source servers can refer to the operation process of the data source server in this embodiment, and will not be elaborated here.
[0123] Based on the foregoing embodiment, this embodiment provides an information retrieval method. Among them, the defined customer number format can be as Figure 4 shown. The total length of the customer number can be 64 bits, for example. Among them, the first 20 bits can be defined as the position A where the file identifier is located, the middle 30 bits can be defined as the position B where the line offset is located, and the last 14 bits can be defined as the position C where the column offset is located. That is, bits 0 to 13 are the positions where the column offset is located, bits 14 to 43 are the positions where the line offset is located, and bits 44 to 63 are the positions where the file identifier is located. In this way, M can be used to represent the file identifier, N is used to represent the line offset, and Q represents the column offset. The M part refers to the index to the customer file. M is interpreted as an unsigned integer. M occupies 20 bits and theoretically can support 2 20 files. N is the line offset within the file. N occupies 30 bits and theoretically a single file can support 2 30 lines of customer information. Q is the column field offset within the customer information line. Q occupies 14 bits and theoretically a piece of customer information can accommodate 2 14 column fields. Based on the definition of this customer number, the specific steps of the information retrieval method provided in this embodiment can be as follows:
[0124] Step 1: The customer number input by the user through the client device is: 0000000000000000001100000000000000000000100000000000000000001111. The client device sends the received customer number to the CRM server.
[0125] Step 2: The CRM server checks the format of the received customer number.
[0126] Step 3: If it is detected that the format of the customer number does not meet the predefined customer number format, the CRM server sends a prompt message indicating a customer number error to the client device, so that the client device further prompts that the customer number entered by the user is incorrect.
[0127] Step 4: If it is detected that the format of the customer number meets the predefined customer number format, the CRM server determines that the first 20 - bit binary number in the customer number is the file identifier, the middle 30 - bit binary number is the file line offset, and the last 14 - bit binary number is the column offset of the corresponding row. Through the first 20 - bit file identifier, a specific file can be determined.
[0128] Exemplarily, as Figure 5 shown, the index table includes n files. The value of M corresponding to bit A where the file identifier in the customer number entered by the customer is located is 00000000000000000011. Therefore, it can be determined that the selected file has a file identifier of 3.
[0129] Step 5: Since the CRM server has determined in Step 4 that the file identifier of the specific file is 3, the specific row in the specific file can be located through the row offset scalar.
[0130] Exemplarily, as Figure 6 shown, the value of N corresponding to bit B where the row offset in the customer number is located is 000000000000000000001000000000. Therefore, it can be determined that the selected row record information is the 1024th row in the file with a file identifier of 3. Among them, the record information corresponding to each row represents a complete customer information.
[0131] Step 6: Since the CRM server has determined in Step 5 that the specific row in the file with a file identifier of 3 is the 1024th row record information, in this way, the specific column information can be filtered through the column offset.
[0132] Exemplarily, as Figure 6 shown, the value of Q corresponding to bit C where the column offset in the customer number is located is 00000000001111. Therefore, it can be determined to skip the first 15 columns. As Figure 6 shown by the arrow, the column field information from the next column after the 16th column to the last column of this 1024th row is the customer target information. Therefore, the target index address corresponding to the column field information of the last column of this 1024th row can be determined.
[0133] Step 7: The CRM server sends the determined target index address to the third-party data source server, so that the third-party data source server determines the corresponding storage location according to the target index address, obtains the corresponding customer target information from this storage location, and then sends the obtained customer target information to the CRM server. Among them, the third-party data source server can map the disk file numbered 3 to the memory by using the Memory-Mapped (MMP) mechanism.
[0134] Among them, Figure 7 The following shows the disk storage form of the file system in the third-party data source server. Each block stores customer information, and the storage location corresponding to the corresponding target index address corresponds to Figure 7 one or several of the blocks. In this way, the third-party data source server can obtain the corresponding customer target information from the blocks corresponding to this target index address. Among them, Figure 7 only 16 blocks are shown, and the size of each block can be 4 kilobytes (KB). In actual application scenarios, the number of blocks divided by each file system disk is more than 16 blocks, Figure 7 only for illustration.
[0135] Step 8: End.
[0136] In this way, taking the total length of the customer number as 64 bits as an example, where the first 20 bits are the bits where the file identifier is located, the middle 30 bits are the bits where the row offset is located, and the last 14 bits are the bits where the column offset is located, it can be determined that the maximum supported customer data volume is: 20-bit file identifier bits = 2 20 = 1,048,576 files, 30-bit row offset = 2 30 = 1,073,741,824 rows of customer information, 14-bit column offset = 2 14 = 16,384 column fields. The corresponding total number of row customer information that can be supported is: S = m * n = 1,048,576 * 1,073,741,824 = 11,258,999,068,426,24.
[0137] It should be noted that for the description of the same steps and the same content in this embodiment and other embodiments, reference can be made to the description in other embodiments, and details are not described here again.
[0138] In the embodiment of the present application, the data source server groups the customer information stored by itself, determines the file identifier of each group of files, as well as the row offset corresponding to each customer information included in each file and the column offset corresponding to each information content of each customer information. An index table is generated based on the file identifier, row offset, and column offset and sent to the CRM server. After determining the target index address of the customer target information corresponding to the customer number in the first acquisition request sent by the client device based on at least one index table sent by at least one data source server, the CRM server sends the target index address to the target data source server, so that the target data source server can obtain the customer target information from the storage location corresponding to the target index address and send it to the CRM server, and then the CRM server sends the obtained customer target information to the client device. In this way, by using the index method to determine the target index address and obtaining the corresponding customer target information from the target index address, the problem of low query efficiency in current data query is solved, the query time is shortened, the query efficiency is improved, and the resource consumption is reduced. Moreover, it is not necessary for the data source servers to send all customer information or incremental customer information to the CRM server every time, and the CRM server does not need to store a large amount of customer information. Instead, the data source server sends the customer target information required by the CRM server to the CRM server, effectively reducing the consumption of network resources between the servers and also reducing the storage resources in the CRM server. And when the data fields in the data source server change, the impact on the parsing process of the CRM server is relatively small.
[0139] Based on the foregoing embodiments, an embodiment of the present application provides a CRM server. Referring to Figure 8 as shown, the CRM server 4 may include: a first processor 41, a first memory 42, and a first communication bus 43, where:
[0140] The first memory 42 is used to store executable instructions;
[0141] The first communication bus 43 is used to implement the communication connection between the first processor 41 and the first memory 42;
[0142] The first processor 41 is used to execute the information retrieval program stored in the first memory 42 to implement the following steps:
[0143] Receive a first acquisition request including a customer number sent by a client device;
[0144] Obtain at least one index table corresponding to at least one data source to obtain at least one index table;
[0145] Based on the customer number and at least one index table, determine the target index address corresponding to the customer target information of the customer number; wherein, the target index address is used to point to the storage location of the customer target information in the target data source server;
[0146] Send a second acquisition request including the target index address to the target data source server;
[0147] Receive the customer target information sent by the target data source server; wherein, the customer target information is obtained by the target data source server from the storage location corresponding to the target index address;
[0148] In response to the first acquisition request, send the customer target information to the client device.
[0149] In other embodiments of the present application, when the first processor executes the step of determining the target index address corresponding to the customer target information of the customer number based on the customer number and at least one index table, it can be implemented through the following steps:
[0150] Analyze the customer number to determine the target file identifier, the target row offset, and the target column offset;
[0151] Based on the customer number, determine the target data source server identifier;
[0152] From at least one index table, determine the target index table that matches the target data source server identifier;
[0153] Based on the target file identifier, the target row offset, and the target column offset, determine the target index address from the target index table.
[0154] In other embodiments of the present application, when the first processor executes the step of determining the target index address from the target index table based on the target file identifier, the target row offset, and the target column offset, it can be implemented through the following steps:
[0155] If the target file identifier is not empty and both the target row offset and the target column offset are empty, determine the storage address corresponding to the target file identifier in the target index table as the target index address;
[0156] If the target file identifier and the target row offset are not empty and the target column offset is empty, determine the first sub-index table corresponding to the target file identifier from the target index table;
[0157] From the first sub-index table, determine the storage address corresponding to the target row offset as the target index address.
[0158] In other embodiments of the present application, when the first processor executes the step of determining the target index address from the target index table based on the target file identifier, the target row offset, and the target column offset, it can also be implemented through the following steps:
[0159] If the target file identifier, the target line offset, and the target column offset are all not empty, determine a second sub-index table corresponding to the target file identifier from the target index table;
[0160] Determine a reference line corresponding to the target line offset from the second sub-index table;
[0161] Determine that the reference position corresponding to the target column offset plus 1 to the last column in the reference line is the target index address.
[0162] In other embodiments of the present application, the length of the target file identifier in the customer number stored in the first memory is a first preset number of bits, the length of the target line offset is a second preset number of bits, and the length of the column offset is a third preset number of bits.
[0163] In other embodiments of the present application, after the first processor executes the step of receiving the first acquisition request including the customer number sent by the client device, it is further configured to execute the following steps:
[0164] If the format of the customer number does not match the preset number format, send a prompt message to the client device; wherein, the prompt message is used to prompt the user that the customer number is incorrect.
[0165] It should be noted that for the specific implementation process of information interaction between units and modules in the CRM server in this embodiment, reference can be made to Figure 1 and Figure 3 the implementation process in the information retrieval method provided in the corresponding embodiment, which will not be elaborated here.
[0166] In the embodiment of the present application, after the CRM server receives a first acquisition request including a customer number sent by a client device, it determines a target index address of customer target information corresponding to the customer number from an index table corresponding to at least one data source, and sends the target index address to the target data source server through a second acquisition request. After receiving the customer target information acquired and sent by the target data source server from the storage location corresponding to the target index address, it sends the customer target information to the client device. In this way, by using the indexing method to determine the target index address and acquiring the corresponding customer target information from the target index address, the problem of low query efficiency in current data query is solved, the query time is shortened, the query efficiency is improved, and the resource consumption is reduced. Moreover, it is not necessary for data source servers to send all customer information or incremental customer information to the CRM server each time, and the CRM server does not need to store a large amount of customer information. Instead, the data source server sends the customer target information required by the CRM server to the CRM server, effectively reducing the consumption of network resources between servers and also reducing the storage resources in the CRM server. And when the data fields in the data source server change, the impact on the parsing process of the CRM server is relatively small.
[0167] Based on the foregoing embodiments, an embodiment of the present application provides a data source server. Referring to Figure 9 as shown, the data source server 5 may include: a second processor 51, a second memory 52, and a second communication bus 53, where:
[0168] The second memory 52 is used to store executable instructions;
[0169] The second communication bus 53 is used to implement the communication connection between the second processor 51 and the second memory 52;
[0170] The second processor 51 is used to execute an information retrieval program stored in the second memory 52 to implement the following steps:
[0171] Determine the customer information stored in the data source server;
[0172] Group the customer information to obtain m groups of files, and determine the file identifier of each group of files; where m is an integer greater than or equal to 1;
[0173] Determine the line offset corresponding to each customer information included in each file in the m groups of files; where each customer information is stored in units of lines;
[0174] Statistically calculate the column offset corresponding to each information content of each customer information;
[0175] Generate an index table based on the file identifier, line offset, and column offset, and send the index table to the CRM server;
[0176] If a second acquisition request including a target index address sent by the CRM server is received, in response to the second acquisition request, obtain customer target information from the storage location corresponding to the target index address, and send the customer target information to the CRM server; wherein, the customer target information belongs to customer information, and the customer target information is used to be sent to the client device through the CRM server.
[0177] It should be noted that for the specific implementation process of information interaction between units and modules in the data source server in this embodiment, reference can be made to Figures 2 - 3 the implementation process in the information retrieval method provided in the corresponding embodiment, which will not be elaborated here.
[0178] In the embodiment of the present application, the data source server performs grouping processing on the customer information stored by itself to obtain m groups of files, and determines the file identifier of each group of files, as well as the row offset corresponding to each customer information included in each group of files, and the column offset corresponding to each information content of each customer information. Then, an index table is generated based on the file identifier, row offset, and column offset, and the index table is sent to the CRM server. When a second acquisition request including a target index address sent by the CRM server is received, obtain customer target information from the storage location corresponding to the target index address, and send the customer target information to the CRM server. In this way, the target index address is determined by the index method, and the corresponding customer target information is obtained from the target index address, solving the problem of low query efficiency when querying data currently, shortening the query time, improving the query efficiency, and reducing the resource consumption.
[0179] Based on the foregoing embodiments, an embodiment of the present application provides a computer-readable storage medium, simply referred to as a storage medium. The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement as Figure 1 and Figure 3 or Figures 2 - 3 the implementation process of the information retrieval method provided in the corresponding embodiment, which will not be elaborated here.
[0180] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0181] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0182] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0184] As described above, it is only a preferred embodiment of the present application and is not used to limit the protection scope of the present application.
Claims
1. An information retrieval method, characterized in that, The method is applied to a Customer Relationship Management (CRM) server, and the method includes: Receiving a first acquisition request including a customer number sent by a client device; Obtaining index tables corresponding to at least one data source to get at least one index table; Based on the customer number and the at least one index table, determining a target index address of customer target information corresponding to the customer number; wherein the target index address is used to point to the storage location of the customer target information in a target data source server; Sending a second acquisition request including the target index address to the target data source server; Receiving the customer target information sent by the target data source server; wherein the customer target information is obtained by the target data source server from the storage location corresponding to the target index address; In response to the first acquisition request, sending the customer target information to the client device; The determining the target index address of the customer target information corresponding to the customer number based on the customer number and the at least one index table includes: Parsing the customer number, and determining a target file identifier, a target row offset, and a target column offset from the customer number; Based on the customer number, determining a target data source server identifier; Determining a target index table that matches the target data source server identifier from the at least one index table; Based on the target file identifier, the target row offset, and the target column offset, determining the target index address from the target index table; The determining the target index address from the target index table based on the target file identifier, the target row offset, and the target column offset includes: If the target file identifier is not empty and both the target row offset and the target column offset are empty, determining the storage address corresponding to the target file identifier in the target index table as the target index address; If the target file identifier and the target row offset are not empty and the target column offset is empty, determining a first sub-index table corresponding to the target file identifier from the target index table; Determining the storage address corresponding to the target row offset in the first sub-index table as the target index address.
2. The method according to claim 1, wherein The determining the target index address from the target index table based on the target file identifier, the target row offset, and the target column offset further includes: If the target file identifier, the target row offset, and the target column offset are all not empty, determining a second sub-index table corresponding to the target file identifier from the target index table; Determining a reference row corresponding to the target row offset from the second sub-index table; Determining the reference position corresponding to the target column offset plus 1 to the last column in the reference row as the target index address.
3. The method according to any one of claims 1 to 2, characterized in that The length of the target file identifier in the customer number is a first preset number of digits, the length of the target row offset is a second preset number of digits, and the length of the column offset is a third preset number of digits.
4. The method according to claim 1, wherein After receiving the first acquisition request including the customer number sent by the client device, the method further includes: If the format of the customer number does not match the preset number format, send a prompt message to the client device; wherein, the prompt message is used to prompt the user that the customer number is incorrect.
5. An information retrieval method, characterized in that, The method is applied to a data source server, and the method includes: Determine the customer information stored in the data source server; Perform grouping processing on the customer information to obtain m groups of files, and determine the file identifier of each group of files; wherein, m is an integer greater than or equal to 1; Determine the line offset corresponding to each customer information included in each of the m groups of files; wherein, each customer information is stored in units of lines; Statistically calculate the column offset corresponding to each information content of each customer information; Generate an index table based on the file identifier, the line offset, and the column offset, and send the index table to the CRM server; If a second acquisition request including a target index address sent by the CRM server is received, respond to the second acquisition request, acquire customer target information from the storage location corresponding to the target index address, and send the customer target information to the CRM server; wherein, the customer target information belongs to the customer information, and the customer target information is used to be sent to the client device through the CRM server.
6. A CRM server, characterized in that, The server includes: a first memory, a first processor, and a first communication bus; wherein: The first memory is used to store executable instructions; The first communication bus is used to implement the communication connection between the first processor and the first memory; The first processor is used to execute the information retrieval method stored in the first memory to implement the steps of the information retrieval method as described in any one of claims 1 to 4.
7. A data source server, characterized in that, The server includes: a second memory, a second processor, and a second communication bus; wherein: The second memory is used to store executable instructions; The second communication bus is used to implement the communication connection between the second processor and the second memory; The second processor is used to execute the information retrieval method stored in the second memory to implement the steps of the information retrieval method as described in claim 5.
8. A storage medium, characterized in that, An information retrieval program is stored on the storage medium, and when the information retrieval program is executed by a processor, the steps of the information retrieval method as described in any one of claims 1 to 4 or claim 5 are implemented.
Citation Information
Patent Citations
Data cloud storage system, client terminal, storage server and application method
CN106850710A