A service data index construction method and system

CN111078682BActive Publication Date: 2026-10-13BEIKE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910989756.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-17
Publication Date
2026-10-13
Estimated Expiration
2039-10-17

AI Technical Summary

Technical Problem

但是,现有的索引构建技术中,索引数据与业务数据耦合太严重,业务方不仅需要关注数据变更是否成功,还需要关注索引数据是否正常变更,由此造成索引构建的实时性和扩展性较差

Benefits of technology

[0017]本发明实施例提供的业务数据索引构建方法及系统,通过获取业务数据更新事件获取发生信息变更的数据源信息,通过回调数据业务模块的增量接口获取对应的索引基本信息并构建或更新索引数据,实现了业务数据和索引数据的解耦,提高了索引数据构建的实时性和可扩展性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111078682B_ABST
    Figure CN111078682B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of service data index construction method and system, the method comprises: index construction module obtains the service data update event of data service module, and according to service data update event, obtain the data source information of information change, data source information includes service data coding, service data coding and data source one-to-one correspondence;According to service data coding, callback the incremental interface provided by data service module, obtain the index basic information corresponding to service data coding, and according to index basic information, construct index data or update index data.The service data index construction method and system provided by the embodiment of the present application, by obtaining service data update event, obtain the data source information of information change, by callback the incremental interface of data service module, obtain corresponding index basic information and construct or update index data, realize the decoupling of service data and index data, improve the real-time performance and scalability of index data construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, specifically to a method and system for constructing a business data index. Background Technology

[0002] Retrieving business data is a common application scenario. For example, existing real estate companies provide property search and retrieval services based on the data they display to the public. These general retrieval data rely on the indexing of the underlying data. Most existing indexing methods follow this approach: after business data changes and is stored in a local database, the business side queries the database for the changed data according to its own business requirements, builds the corresponding index data according to its own business rules, and then provides data retrieval services to the public.

[0003] In existing technologies, business users construct corresponding index data according to their own business rules. For example, they construct corresponding index data based on the calculation rules for low, middle, and high floors. If the enumeration of floors changes, such as adding low and top floors, the construction rules for the index data must be changed accordingly.

[0004] In theory, updates to the data itself should not be coupled with updates to the index data; the business side only needs to ensure that its own business data changes normally. However, in existing index building technologies, index data and business data are too tightly coupled. The business side not only needs to pay attention to whether the data changes are successful, but also whether the index data changes normally, resulting in poor real-time performance and scalability of index building.

[0005] On the one hand, business data changes and index changes are intertwined. Numerous data changes can lead to untimely index updates; furthermore, if a change on one side fails, data updates will also fail, further exacerbating the untimely updates and even data loss. On the other hand, index construction heavily relies on the business database. Changes to the database format or field enumeration necessitate modifications to the index construction method, resulting in poor scalability. Summary of the Invention

[0006] To address the problems in the prior art, embodiments of the present invention provide a method and system for constructing a business data index.

[0007] In a first aspect, embodiments of the present invention provide a method for constructing a business data index. The method includes: an index construction module acquiring a business data update event from a data business module, and acquiring data source information of the data source where the information has changed based on the business data update event, wherein the data source information includes a business data code, and the business data code corresponds one-to-one with the data source; the index construction module calling back an incremental interface provided by the data business module based on the business data code, acquiring basic index information corresponding to the business data code through the incremental interface, and constructing or updating index data based on the basic index information.

[0008] Furthermore, the index building module obtains the business data update events of the data service module by: listening to the business data update events of the data service module through the event listening service module, and storing the business data update events in an intermediate storage medium; the index building module obtains the business data update events by listening to the intermediate storage medium.

[0009] Furthermore, before the index building module obtains the business data update event from the data service module, the method further includes: the index building module obtaining full business data encoding information by calling the full interface provided by the data service module, wherein the full business data encoding information includes the business data encoding information of all data sources; calling the incremental interface to obtain the basic index information of all data sources based on the full business data encoding information; and constructing full index data based on the basic index information of all data sources.

[0010] Furthermore, the method also includes: the data service module generating or updating the basic index information of the corresponding data source based on the changes in the data source information.

[0011] Furthermore, the method also includes: the business data module recording the first time of the change in data source information and recording the second time of the index building module calling back the incremental interface to obtain the corresponding basic index information; if the second time is earlier than the first time, the business data module waits for the next incremental interface callback of the index building module by updating the data source information of the corresponding data source again; repeating the above steps until the second time is later than the first time.

[0012] Secondly, embodiments of the present invention provide a business data index construction system, comprising: an index construction module, the index construction module being configured to: acquire business data update events from a data business module, and acquire data source information of the data source where information changes have occurred based on the business data update events, the data source information including a business data code, the business data code corresponding one-to-one with the data source; call back an incremental interface provided by the data business module based on the business data code, acquire basic index information corresponding to the business data code through the incremental interface, and construct or update index data based on the basic index information.

[0013] Furthermore, the system also includes an event listening service module, which is used to: listen to the business data update events of the data service module and store the business data update events in an intermediate storage medium; when the index building module is used to obtain the business data update events of the data service module, it is specifically used to: obtain the business data update events by listening to the intermediate storage medium.

[0014] Furthermore, the index building module is also used to: obtain full business data encoding information by calling the full interface provided by the data service module, wherein the full business data encoding information includes the business data encoding information of all data sources; call the incremental interface to obtain the basic index information of all data sources based on the full business data encoding information; and build full index data based on the basic index information of all data sources.

[0015] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method provided in the first aspect.

[0016] Fourthly, embodiments of the present invention provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect.

[0017] The business data index construction method and system provided in this invention obtains data source information where information changes occur by acquiring business data update events, and obtains corresponding basic index information by calling the incremental interface of the data business module and constructing or updating index data. This decouples business data and index data, and improves the real-time performance and scalability of index data construction. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of the business data index construction method provided in the embodiments of the present invention;

[0020] Figure 2 This is a schematic diagram illustrating the principle of the business data index construction method provided in this embodiment of the invention;

[0021] Figure 3 This is a schematic diagram of the business data index construction system provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of the business data index construction system provided in another embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Figure 1 This is a flowchart of the business data index construction method provided in an embodiment of the present invention. Figure 1 As shown, the method includes:

[0025] Step 101: The index building module obtains the business data update event of the data business module, and obtains the data source information of the information change based on the business data update event. The data source information includes the business data code, and the business data code corresponds one-to-one with the data source.

[0026] The index building module is used to build index data, while the business data module stores business data. The index building module can operate independently of the business data module, and their programs can run on different servers. For example, the index building module program can run on the server of the C-end application, while the data business module program can run on the data server, etc.

[0027] To update the index in real time based on changes in business data, it is first necessary to obtain information about these updates. The index building module can acquire business data update events from the data business module through listening. These events include information about the data source where the information has changed, and the data source information includes a business data code. This business data code is a unique identifier for the data source and corresponds one-to-one with each data source.

[0028] The data source is used to distinguish data from different entities. For example, different properties can be considered different data sources, and the business data from different data sources is distinguished by the business data encoding.

[0029] The index building module only needs to obtain the information of the property code whose information has changed through the business data update event. For example, taking property data as an example, if the price of a property changes, the index building module does not need to know whether the price or the area has changed; it only needs to know which property information has changed.

[0030] Step 102: The index building module calls back the incremental interface provided by the data service module according to the business data code, obtains the basic index information corresponding to the business data code through the incremental interface, and builds or updates the index data according to the basic index information.

[0031] The incremental interface is used to obtain basic index information of the data source, and this basic index information corresponds one-to-one with the business data code. Therefore, the index building module calls back the incremental interface provided by the data service module based on the business data code to obtain the basic index information corresponding to the business data code.

[0032] The basic index information is used for retrieval. The actual user of the retrieval is typically a user terminal. The user terminal enters relevant search criteria on the search page, such as "middle floor" and "facing south," and then executes the search. During the retrieval, the user's search criteria are converted into specific codes. For example, "middle floor" is converted to A=2, where A represents the floor level and A=2 represents the middle floor; "facing south" is converted to B=1, where B represents the orientation and B=1 represents the orientation south.

[0033] The index building module needs to pre-agree with the data service module on the format of the index fields. For example, as mentioned above, A represents the floor and B represents the orientation. The data service module needs to ensure that the format of this index field does not change, or if it does change, it needs to be synchronized to the index building module in a timely manner. The format of the index fields needs to be agreed upon to prevent the inability to find the corresponding property information when searching using the corresponding index fields.

[0034] The content of the index fields can be arbitrarily changed by the data business module without informing the index building module. The data business module only needs to focus on its own business data; changes to the database field content or enumeration do not require notification to the index builder. For example, if the index field "Floor A" is changed from A=1, A=2, A=3 representing low, middle, and high floors respectively, to A=1, A=2, A=3, A=4, A=5 representing low, middle, high, ground, and top floors respectively, then the enumeration of field A has changed. After this change, the data business module will obtain the corresponding basic index information for each property. For example, if a property is on the ground floor, then A=4, and this information will be stored as the basic index information for that property. Therefore, when the information for a property changes, the index building module, when retrieving the basic index information for that property through the incremental callback interface, only needs to obtain the value of the floor field A as 4 for the floor information.

[0035] For example, if the index field C represents the price, and C=1, C=2, and C=3 represent prices of 1-2 million, 2-3 million, and 3-4 million respectively, then if the price of a property changes (i.e., the field content changes), there's no need to inform the index builder of the specific changes. After the property information changes, the business data module updates the corresponding basic index information. For instance, if C=3 for a property is updated to C=2, the index builder can obtain the basic index data of the property with this change and determine that the price field C should now be 2.

[0036] Therefore, the basic index data includes information about the values ​​of each index field.

[0037] After obtaining the basic index information corresponding to the business data code, the index building module builds index data based on the basic index information if the corresponding data source has not yet established index data; if the corresponding data source has already established index data, it updates the index data based on the basic index information. Specifically, building the index data includes storing the basic index information of each data source in a one-to-one correspondence with the corresponding data source; updating the index data includes updating the value of a certain index field of the corresponding data source.

[0038] In traditional methods, index data is constructed based on business rules. For example, if there are more than 10 layers (high-level), less than 4 layers (low-level), and the rest (middle-level), the index data is constructed according to these rules. If a low-level or top-level layer is added, the index data construction rules must be changed accordingly. Therefore, changes to business data and index data construction are tightly coupled, requiring knowledge of the specific changes to each field when constructing the index data.

[0039] In this embodiment of the invention, the data service provider updates the corresponding basic index information according to the change information of the data source and represents it with corresponding codes or symbols. The index builder only needs to obtain the basic index information represented by the codes or symbols, without needing to know the specific change information of the fields, thus achieving decoupling of business data and index data.

[0040] This invention employs a decoupling approach between business data and index data, enabling index construction to be independent of the business database and allowing for real-time, flexible index updates. The data business module only needs to focus on its own business data; changes to database fields and enumerations do not require notification to the index construction module. Similarly, the index construction module does not need to worry about changes in business data; it only requires the business side to ensure that the format of the index fields remains unchanged, while the content of the index fields can be freely modified. The index construction scheme provided by this invention guarantees 100% successful index construction, with high real-time performance and scalability. This invention is particularly suitable for platforms and businesses requiring rapid real-time index construction, such as real estate platforms and e-commerce platforms.

[0041] This invention obtains data source information where information changes occur by acquiring business data update events, and obtains corresponding basic index information by calling the incremental interface of the data business module to build or update index data. This decouples business data and index data, and improves the real-time performance and scalability of index data construction.

[0042] Furthermore, based on the above embodiments, the index building module obtains the business data update events of the data service module by: listening to the business data update events of the data service module through the event listening service module, and storing the business data update events in an intermediate storage medium; the index building module obtains the business data update events by listening to the intermediate storage medium.

[0043] The index building module can directly obtain business data update events from the data business module by listening to the business database, or it can obtain them through a third party. The third party refers to the event listening service module, whose program can run on a device independent of both the index building module and the data business module.

[0044] The event listening service module listens for the business data update events of the data service module and stores the business data update events in an intermediate storage medium (such as a disk); the index building module obtains the business data update events by listening to the intermediate storage medium.

[0045] Since the index building module can run on the server side of multiple user terminals to provide indexing services for multiple user terminals—for example, in the real estate industry, it can provide indexing services for client-side apps and agent-side apps—these apps all need to obtain property data from the property database to perform indexing. Therefore, by utilizing the intermediate module—the event listening service module—to listen for and store the business data update events of the data business module, each index building module only needs to listen for new business data update events in the intermediate storage medium. This eliminates the need for all index building modules to listen for business data update events from the data business module, thereby enabling data reuse and avoiding waste of computing resources.

[0046] Based on the above embodiments, this embodiment of the invention utilizes an event listening service module to listen to business data update events of the data service module and store them in an intermediate storage medium. The index building module obtains business data update events by listening to the intermediate storage medium. This enables the reuse of information after obtaining business data update events by running the listening service, thus avoiding the waste of computing resources.

[0047] Furthermore, based on the above embodiments, before the index building module obtains the business data update event of the data service module, the method further includes: the index building module obtaining full business data encoding information by calling the full interface provided by the data service module, the full business data encoding information including the business data encoding information of all data sources; calling the incremental interface to obtain the index basic information of all data sources according to the full business data encoding information; and constructing full index data according to the index basic information of all data sources.

[0048] The incremental interface provided by the data service module is used to obtain basic index information. In addition, the data service module also needs to provide a full interface to obtain the full business data encoding. The full business data encoding information includes the business data encoding information of all data sources. When individual indexes are lost or a full index needs to be created (such as when building an index for the first time), the index building module obtains the full business data encoding by calling the full interface, and then uses the full business data encoding to call the incremental interface to obtain the basic index information of all data sources and build the full index data.

[0049] Given the current level of technology, the interface cannot provide large amounts of data at once. Therefore, to obtain the basic index information of all data sources by calling the incremental interface based on the full business data encoding information, it needs to be implemented in batches.

[0050] When building a full index when the indexed data is not being built for the first time, since historical index data exists, you only need to overwrite the original index data. For example, you can delete the original index data.

[0051] Based on the above embodiments, this embodiment of the invention obtains full business data encoding information by calling the full interface provided by the data service module, obtains basic index information of all data sources by calling the incremental interface based on the full business data encoding information, and constructs full index data, thereby realizing the construction of index data of all data sources.

[0052] Furthermore, based on the above embodiments, the method further includes: the data service module generating or updating the basic index information of the corresponding data source according to the changes in the data source information.

[0053] For a data source that is establishing the basic index information for the first time, the data service module needs to generate the corresponding basic index information for the data source based on the changes in the data source information (all content); for a data source that already has basic index information but whose data source information has changed, the basic index information needs to be updated.

[0054] The basic information of the index includes the codes and values ​​of the index fields used. Index fields, such as building area, orientation, floor, building age, decoration, elevator, and housing type, can be represented by different codes (e.g., letters). For different data sources, each index field may have different values, which can be represented by predefined characters or numbers.

[0055] The data service module generates or updates the basic index information of the corresponding data source based on the changes in the data source information, and stores the basic index information in a one-to-one correspondence with the business data code, so that the index building module can obtain the basic index information of the corresponding data source when calling the incremental interface.

[0056] Based on the above embodiments, the data service module of this embodiment generates or updates the basic index information of the corresponding data source according to the changes in the data source information, providing a basis for obtaining the basic index information of the corresponding data source through the incremental interface.

[0057] Furthermore, based on the above embodiments, the method further includes: the business data module recording the first time of the change in data source information and recording the second time of the index building module calling back the incremental interface to obtain the corresponding basic index information; if the second time is earlier than the first time, the business data module waits for the next incremental interface callback of the index building module by updating the data source information of the corresponding data source again; repeating the above steps until the second time is later than the first time.

[0058] The data service module ensures 100% index data construction through a compensation mechanism. When data source information changes, the data service module records the change time. Then, when the index building module calls back the incremental interface to retrieve basic index information from the data source, the data service module records the time when that information was retrieved. The data service module compares these two times using a delayed service. If it finds that the index callback retrieval time is earlier than the business data change time, it considers that the data source information was not indexed in a timely manner after the change. The data service module then updates the corresponding data source information again, waiting for the next index data callback. At this point, updating the data source information does not require updating the actual content of the data source; it only needs to change the data itself. For example, adding a meaningless field to trigger a business data update event is sufficient.

[0059] If, after updating the data source information, it is still found that the time for the index callback to obtain information is earlier than the time for the business data change, then the data source information needs to be updated again, and the next index data callback needs to be waited for until the time for the index building module to call back the incremental interface to obtain the corresponding basic index information is later than the time for the corresponding data source information change. This indicates that the index data update has been effectively achieved after the data source information change.

[0060] Based on the above embodiments, this embodiment of the invention compares the time of data source information change with the time of index callback. When the time of index callback is earlier than the time of data source information change, the data source information is actively updated again, thus ensuring the reliability and stability of index construction.

[0061] Figure 2 This is a schematic diagram illustrating the principle of the housing index construction method provided in this embodiment of the invention. The following is in conjunction with... Figure 2 The basic principle of the business data index construction method provided in this embodiment of the invention is further explained as follows:

[0062] 1. When business data changes, the event listening service receives a database update event and pushes it to the intermediate storage medium. This process is transparent to the data service provider; they only need to focus on the successful saving of data to the database.

[0063] 2. The index building service provider listens to the intermediate storage medium to obtain update events from the data business provider. For example, if the price of a property changes, the index building service provider doesn't need to know whether it's a price or area change; it only needs to know that the property information has changed. After obtaining the change event, it parses out the property's primary key (the business data code corresponding to the property) and calls back the incremental index data interface (incremental interface) provided by the data business provider to obtain the basic data (index basic information) related to the property's primary key. The format and content of this property data (index basic information) are encoded and provided by the data business provider itself.

[0064] 3. The index building service provider will construct the obtained basic index information into index data and store it in the index medium.

[0065] 4. The incremental interface provided by the data service provider is used to obtain basic index information. It also needs to provide a full interface to obtain the full business data code. When individual indexes are lost or a full index needs to be created, the index building service provider obtains the full business data code by calling the full interface, and then uses the full business data code to call the incremental interface to obtain the basic index information of all data sources and build the full index data.

[0066] 5. The data service provider ensures 100% index data construction through a compensation mechanism. After business data changes, the data service provider records the change time. Then, when the index building service provider retrieves the basic index information from the data source via a callback interface, the data service provider records the time of retrieval of the basic index information. The data service provider compares these two times using a delayed service. If the time of the index callback retrieval is earlier than the time of the business data change, it is considered that the data was not indexed in a timely manner after the change. The data service provider then updates the business data again and waits for the next index data callback. Thus, the data service provider only needs to focus on business data and provide incremental and full data retrieval interfaces. All index data encapsulation logic is flexibly built by the data service provider. The index building service provider only needs to obtain the basic index information through the event callback interface (incremental interface) to quickly build the index and ensure real-time and efficient index updates.

[0067] The data service provider can be the data service module, and the index building service provider can be the index building module. Figure 2 In this context, the incremental information interface is the incremental interface, and the full encoding interface is the full interface.

[0068] The embodiments of the present invention implement a decoupling method between business data and index data, supporting flexible real-time index construction; and the delayed confirmation service ensures the reliability and stability of index construction.

[0069] Figure 3 This is a schematic diagram of the housing index construction system provided in an embodiment of the present invention. Figure 3 As shown, the system includes an index building module 10, which is used to: obtain business data update events from the data service module, and obtain data source information of the changed information based on the business data update events, wherein the data source information includes a business data code, and the business data code corresponds one-to-one with the data source; call back the incremental interface provided by the data service module based on the business data code, obtain the basic index information corresponding to the business data code through the incremental interface, and build or update index data based on the basic index information.

[0070] This invention obtains data source information where information changes occur by acquiring business data update events, and obtains corresponding basic index information by calling the incremental interface of the data business module to build or update index data. This decouples business data and index data, and improves the real-time performance and scalability of index data construction.

[0071] Figure 4 This is a schematic diagram of a housing index construction system provided in another embodiment of the present invention. Figure 4 As shown, the housing index building system also includes an event listening service module 20. The event listening service module 20 is used to: listen to the business data update events of the data service module and store the business data update events in an intermediate storage medium; when the index building module is used to obtain the business data update events of the data service module, it is specifically used to: obtain the business data update events by listening to the intermediate storage medium.

[0072] Based on the above embodiments, this embodiment of the invention utilizes an event listening service module to listen to business data update events of the data service module and store them in an intermediate storage medium. The index building module obtains business data update events by listening to the intermediate storage medium. This enables the reuse of information after obtaining business data update events by running the listening service, thus avoiding the waste of computing resources.

[0073] Furthermore, based on the above embodiments, the index building module 10 is also configured to: obtain full business data encoding information by calling the full interface provided by the data service module, wherein the full business data encoding information includes the business data encoding information of all data sources; obtain the index basic information of all data sources by calling the incremental interface according to the full business data encoding information; and construct full index data according to the index basic information of all data sources.

[0074] Based on the above embodiments, this embodiment of the invention obtains full business data encoding information by calling the full interface provided by the data service module, obtains basic index information of all data sources by calling the incremental interface based on the full business data encoding information, and constructs full index data, thereby realizing the construction of index data of all data sources.

[0075] Furthermore, such as Figure 2 As shown, the housing index building system also includes a data service module 30, which is used to generate or update the basic index information of the corresponding data source based on the changes in the data source information.

[0076] Based on the above embodiments, the data service module of this embodiment generates or updates the basic index information of the corresponding data source according to the changes in the data source information, providing a basis for obtaining the basic index information of the corresponding data source through the incremental interface.

[0077] Furthermore, based on the above embodiments, the data service module 30 is also used to: record the first time of the change of data source information, and record the second time of the index building module calling back the incremental interface to obtain the corresponding basic index information; if the second time is earlier than the first time, wait for the next incremental interface callback of the index building module by updating the data source information of the corresponding data source again; repeat the above steps until the second time is later than the first time.

[0078] Based on the above embodiments, this embodiment of the invention compares the time of data source information change with the time of index callback. When the time of index callback is earlier than the time of data source information change, the data source information is actively updated again, thus ensuring the reliability and stability of index construction.

[0079] The system provided in this embodiment of the invention is used for the above method. The specific functions can be referred to the above method flow, and will not be repeated here.

[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing a business data index, characterized in that, include: The index building module obtains the business data update event of the data business module, and obtains the data source information of the information change based on the business data update event. The data source information includes the business data code, and the business data code corresponds one-to-one with the data source. The index building module calls back the incremental interface provided by the data service module based on the business data code of the data source information where the information has changed. Through the incremental interface, it only obtains the basic index information corresponding to the business data code, and builds or updates index data based on the basic index information. The basic index information includes the values ​​of each index field represented by numbers, and the values ​​are used to represent the business data of the corresponding index field. The index building module obtains business data update events from the data service module by: listening to the business data update events of the data service module through the event listening service module and storing the business data update events in an intermediate storage medium; and the index building module obtains the business data update events by listening to the intermediate storage medium. The method further includes: After the data source information changes, the data service module records the first time the data source information changes. When the index building module calls back the incremental interface to obtain the basic index information of the data source, the data service module records the second time the index building module calls back the incremental interface to obtain the corresponding basic index information. If the second time is earlier than the first time, the data service module waits for the next incremental interface callback from the index building module by updating the data source information of the corresponding data source again. The above steps are repeated until the second time is later than the first time. In this case, the data service module does not need to update the actual content of the data source by updating the data source information of the corresponding data source again, but only needs to make the data of the corresponding data source change to generate a business data update event. The method further includes: the data service module generating or updating the basic index information of the corresponding data source based on the changes in the data source information; The index building module and the data service module agree on the format of the index fields in advance, and the data service module ensures that the format of the index fields will not change. Business modules can change the content data of indexed fields without informing the index building module.

2. The business data index construction method according to claim 1, characterized in that, Before the index building module obtains the business data update event from the data service module, the method further includes: The index building module obtains full business data encoding information by calling the full interface provided by the data service module. The full business data encoding information includes the business data encoding information of all data sources. Based on the full business data encoding information, the incremental interface is called to obtain the basic index information of all data sources; The full index data is constructed based on the basic index information of all the data sources.

3. A business data indexing and construction system, characterized in that, include: An index building module, wherein the index building module is used for: The system acquires business data update events from the data service module and obtains data source information where information changes have occurred based on these events. The data source information includes a business data code, which corresponds one-to-one with the data source. Based on the business data code of the data source information where information changes, the system calls back the incremental interface provided by the data service module. Through this incremental interface, it only acquires the basic index information corresponding to the business data code and constructs or updates index data based on this basic index information. The basic index information includes the numerical values ​​of each index field, which represent the business data of the corresponding index field. The system also includes an event listening service module, which is used to: listen for the business data update event of the data service module and store the business data update event in an intermediate storage medium; When the index building module is used to obtain business data update events from the data service module, it is specifically used to: obtain the business data update events by listening to the intermediate storage medium; Specifically, after the data source information changes, the data service module records the first time the data source information changes. When the index building module calls back the incremental interface to obtain the basic index information of the data source, the data service module records the second time the index building module calls back the incremental interface to obtain the corresponding basic index information. If the second time is earlier than the first time, the data service module waits for the next incremental interface callback from the index building module by updating the data source information of the corresponding data source again. The above steps are repeated until the second time is later than the first time. In this case, the data service module does not need to update the actual content of the data source by updating the data source information of the corresponding data source again; it only needs to make the data of the corresponding data source change to generate a business data update event. The data service module generates or updates the basic index information of the corresponding data source based on the changes in the data source information; The index building module and the data service module agree on the format of the index fields in advance, and the data service module ensures that the format of the index fields will not change. Business modules can change the content data of indexed fields without informing the index building module.

4. The business data index construction system according to claim 3, characterized in that, The index building module is also used for: The full business data encoding information is obtained by calling the full interface provided by the data service module. The full business data encoding information includes the business data encoding information of all data sources. The incremental interface is called based on the full business data encoding information to obtain the basic index information of all data sources. The full index data is constructed based on the basic index information of all data sources.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the business data index construction method as described in claim 1 or 2.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the business data index construction method as described in claim 1 or 2.

Citation Information

Patent Citations

  • Cardinal number estimating method and cardinal number estimating device under multi-section query condition of big data

    CN103544258A

  • Mixed updating method e-commerce index file based on Solr

    CN108280215A

  • Business data retrieval method and apparatus

    CN108681593A