Index switching method and apparatus, and computer-readable storage medium
By introducing index switching methods in the subject screening, the problem of screening business interruption and unreliable results caused by the index change, and achieve efficient index switching and reliable screening results.
Patent Information
- Application Number
- PCT/CN2024/100972
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-14
- Filing Date
- 2024-06-24
- Publication Date
- 2025-01-23
AI Technical Summary
During the main screening process, index changes lead to interruption of screening business, and the data imported from new indexes takes a long time, affecting the reliability of screening results.
Provide a method of index switching. By obtaining the first relationship to be referenced, it is switched to the second relationship. The second index is calculated based on the first index and index change rules. The first data is the same as the second data. The content of the data is consistent.
Improved the efficiency of index changes, avoided the interruption of screening business, and improved the reliability of screening results.
Smart Images

Figure CN2024100972_23012025_PF_FP_ABST
Abstract
Description
Index switching method and device and computer-readable storage medium
[0001] This application claims priority to Chinese patent application No. 202310871689.4, filed on July 14, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of computer technology, and in particular to an index switching method and device, and a computer-readable storage medium. Background Art
[0003] Currently, companies often conduct party screening to avoid collaborating with restricted parties, which could impact business operations. Restricted parties primarily refer to organizations, individuals, and devices that pose legal or integrity risks. Party screening primarily identifies the risk profile of the party to be screened based on known restricted parties.
[0004] Subject screening can be implemented using the Zentity plugin for the distributed search engine (Elastic Search, ES). This involves creating an index and importing data, defining an entity model, and performing entity resolution. Creating an index and importing data establishes relationships between the index and known restricted subjects, providing a data foundation for subsequent searches. Defining the entity model primarily determines the search method, such as the search algorithm. Entity resolution is used to perform searches based on the index and search method determined by the entity model.
[0005] Summary of the Invention
[0006] In one aspect, an index switching method is provided, the method comprising: obtaining a first relationship to be referenced, the first relationship being used to indicate one or more first indexes and first data associated with each of the one or more first indexes; and switching the first relationship to a second relationship, the second relationship being used to indicate one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and an index change rule, and the first data is the same as the second data.
[0007] In another aspect, an index switching device is provided, comprising at least a management module and an execution module. The management module is configured to send a change instruction to the execution module, the change instruction instructing the execution module to update a first relationship, wherein the first relationship indicates one or more first indexes and first data associated with each of the one or more first indexes. The execution module is configured to switch the first relationship to a second relationship, wherein the second relationship indicates one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and an index change rule, and the first data is identical to the second data.
[0008] In another aspect, a computing device is provided, the computing device comprising: an acquisition unit configured to acquire a first relationship to be referenced, the first relationship indicating one or more first indexes and first data associated with each of the one or more first indexes; and a processing unit configured to switch the first relationship to a second relationship indicating one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and an index change rule, and the first data is the same as the second data.
[0009] In another aspect, a screening system is provided, comprising at least a management device and an execution device. The management device is configured to send a change instruction to the execution device, the change instruction instructing an update of a first relationship, wherein the first relationship indicates one or more first indexes and first data associated with each of the one or more first indexes; and the execution device is configured to switch the first relationship to a second relationship, wherein the second relationship indicates one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and an index change rule, and the first data is identical to the second data.
[0010] In another aspect, a computing device is provided, comprising: a memory and a processor. The memory is coupled to the processor; the memory is used to store a computer program; and the processor implements the above-mentioned index switching method when executing the computer program.
[0011] On the other hand, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned index switching method is implemented.
[0012] In yet another aspect, a computer program product is provided. The computer program product includes computer program instructions, and when the computer program instructions are executed by a processor, the index switching method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the present disclosure, the following briefly introduces the drawings required for use in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0014] FIG1 is a schematic diagram of a subject screening application scenario according to some embodiments of the present disclosure.
[0015] FIG2 is a flow chart of an index switching method according to some embodiments of the present disclosure.
[0016] FIG3 is a flowchart of another index switching method according to some embodiments of the present disclosure.
[0017] FIG4 is a flowchart of another index switching method according to some embodiments of the present disclosure.
[0018] FIG5 is a schematic diagram of a scenario of storing change progress according to some embodiments of the present disclosure.
[0019] FIG6 is a schematic diagram illustrating the composition of a computing device according to some embodiments of the present disclosure.
[0020] FIG7 is a schematic diagram showing the composition of an index switching device according to some embodiments of the present disclosure.
[0021] FIG8 is a schematic structural diagram of a communication device according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0022] The following will clearly and completely describe the technical solutions of this disclosure in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of this disclosure without making any creative efforts shall fall within the scope of protection of this disclosure.
[0023] It should be noted that in this disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this disclosure as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0024] In the following, the terms "first," "second," etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," etc. may explicitly or implicitly include one or more of the features.
[0025] In the description of this disclosure, unless otherwise specified, " / " means "or." For example, A / B can mean A or B. "And / or" herein is merely a description of an association relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: only A, only B, and both A and B. Furthermore, "at least one" means one or more, and "a plurality" means two or more.
[0026] Currently, companies usually conduct party screening to avoid the impact on business operations caused by cooperation with restricted parties. Party screening can be applied to various fields such as export control, national security monitoring, customs affairs, etc. Restricted parties mainly refer to organizations (such as companies), individuals and terminal equipment (such as ships, aircraft), etc. that have legal risks. Party screening is mainly based on known restricted parties to determine the risk situation of the subject to be screened. For example, by searching for information on the subject to be screened in the information of known restricted parties, if there is the same or similar information, the subject to be screened is considered to be a restricted subject. The above information can be address information, such as the country, city or street to which the subject belongs, longitude and latitude information, etc.
[0027] The above subject screening process can be implemented based on the scenario shown in Figure 1, which includes a management platform and a distributed search engine (elastic search, ES). The management platform primarily facilitates interaction between users and ES. For example, a user enters information about the subject to be screened through the management platform, which then sends it to ES, instructing it to perform a search. ES then returns the search results to the management platform.
[0028] In Figure 1, the above screening method is implemented through the interaction of two devices. In practical applications, the functions of the management platform and ES can also be integrated into the same device, without limitation. For example, the device can be a screening device that can obtain information about the subject to be screened through user interaction or other means, then call the ES to perform a search and output the search results.
[0029] Whether it is ES as an independent device or ES integrated in a screening device, when performing subject screening, it can be implemented through the zentity plug-in. For example, subject screening includes the following three steps: creating an index and importing data, defining an entity model, and performing entity resolution. The purpose of creating an index and importing data is to establish an association between the information of known restricted subjects and the index, and to establish a data foundation for subsequent searches. The purpose of defining an entity model is to determine the search method, such as defining a search algorithm. Performing entity resolution refers to the process of searching based on the index and search algorithm determined by the above search method. For example, you can search for entities in the ES index through the zentity application programming interface (API), and confirm the similarity through confidence assessment. It can also be understood as the above-mentioned subject screening process.
[0030] However, if the index changes, you need to delete the old index, re-establish the index, and import the data according to the above steps. Because the search algorithm defined in the entity model is associated with the index, it is necessary to update the entity model based on the newly created index and apply the updated entity model to the screening service. In this case, the old index has been deleted, which may cause the current screening service to be interrupted. The process of importing data into the new index is time-consuming, and the screening services performed during this period will affect the reliability of the screening results.
[0031] To address this issue, the present disclosure provides an index switching method for improving index change efficiency, avoiding screening service interruptions, and improving the reliability of screening results. As shown in FIG2 , the method is applied to a search engine or a computing device including a search engine. The following description uses a computing device as an example. The index switching method includes the following steps S201 and S202 .
[0032] In S201 , the computing device obtains a first relationship to be referenced, where the first relationship is used to indicate one or more first indexes and first data associated with each of the one or more first indexes.
[0033] In one implementation, the computing device obtains the first relationship by obtaining one or more first index names, where each first index name is used to indicate a corresponding first index.
[0034] Exemplarily, the computing device obtains a first index name that is input by a user and needs to be updated, and determines a corresponding first index based on the first index name.
[0035] In S202, the computing device switches the first relationship to a second relationship, where the second relationship indicates one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and the index change rule, and the first data is the same as the second data.
[0036] It should be noted that the first data and the second data being the same means that the data contents are the same. For example, the second data may be a copy of the first data.
[0037] In some embodiments, before the above S202, the index switching method further includes: the computing device creating a second relationship based on the first relationship. For example, the process of creating the second relationship includes the following S11 to S13.
[0038] In S11 , the computing device determines a second index name.
[0039] In one implementation, the computing device calculates the second index name based on the first index name and the index change rule.
[0040] The index name is used to identify the index, the first index name is used to identify the first index, and the second index name is used to identify the second index.
[0041] It is understood that in the embodiments of the present disclosure, the first index and the second index can coexist, and therefore, the second index name is different from the first index name. In the related art, when a second index is created after deleting the first index, the newly created second index name will usually use the same name as the first index.
[0042] The index change rule is used to define the rule for calculating the second index name based on the first index name. For example, the index change rule is to add a suffix to the first index name to obtain the second index name. For example, the first index name is index a and the second index name is a'.
[0043] It should be noted that the above index change rules are merely examples. In actual applications, the first index name and the second index name can be different, and there are no restrictions on the index change rules. Furthermore, the above index change rules can be preset in the computing device, obtained by the computing device from another device, or input by the user into the computing device, without limitation.
[0044] In another implementation, the computing device obtains the second index name.
[0045] Exemplarily, the computing device obtains the second index name through user input. For example, the user may input the first index name and the second index name at the same time in the above S201.
[0046] In S12 , the computing device creates a second index based on the second index name.
[0047] In one implementation, before S12, the method further includes: deleting the second index based on the second index name.
[0048] For example, the first index is named index a, and the second index is named index a'. The computing device may attempt to delete the index corresponding to index a', and then create the index corresponding to index a'.
[0049] It is understandable that if an index in the created indexes has the same name as the second index, that is, if an index created with the second index name already exists, it will result in failure to create a second index based on the second index name. Therefore, before creating a second index based on the second index name, you can try to delete the index corresponding to the second index name to improve the success rate of creating the second index.
[0050] In S13 , the computing device imports second data for the second index.
[0051] The second data is the same as the first data. For example, the second data is a copy of the first data.
[0052] Based on the above S11 to S13, the computing device creates the second relationship. Since the first relationship is retained during the creation process, it helps to continue the screening business and avoid interruption.
[0053] It is understandable that in the process of performing the screening business, it is necessary to search based on the index and its associated data. During the above-mentioned second relationship creation process, the computing device performs the screening business based on the first relationship; when the above-mentioned second relationship is created, the first relationship is switched to the second relationship, and the computing device performs the screening business based on the second relationship. The switching process is relatively rapid and has little impact on the screening business. For example, during the switching process, the computing device may be unable to obtain the first relationship. At this time, the computing device will automatically retry to obtain the first relationship to perform the search, and the switching between the first relationship and the second relationship can be completed in this process, and the computing device can re-acquire the second relationship to perform the search. Under normal circumstances, the user cannot perceive the above process, so the screening business is not interrupted. Compared with the index update method of creating an index and importing data, this method greatly reduces the impact on the screening business and improves the operating efficiency of the overall system. In addition, since the data content before and after the switch is the same, the reliability of the screening results can be guaranteed.
[0054] In some embodiments, the above S201 includes, for example: the computing device obtains an index alias, and obtains the first relationship based on the index alias.
[0055] An index alias can be understood as a type of index name. An index alias is associated with one or more first indexes. This means that one or more first index names are obtained based on the index alias, and these one or more first index names are used to indicate the corresponding first indexes. These one or more first index names can also be referred to as an associated index list.
[0056] In one implementation, the index alias can be used as a prefix of the index name associated with it. For example, assuming the index alias is INDEX, the first index name associated with it can be INDEX a. Combined with the above example of creating a second index name, the second index name can be INDEX a'.
[0057] In some embodiments, when the first relationship is obtained using an index alias, the above S202 switches the first relationship to a second relationship. For example, the switching process includes: associating the index alias with one or more first indexes, and updating the index alias to associate with one or more second indexes.
[0058] It's understandable that since the current entity model is directly associated with the index, changes to the index will affect the entity model. The aforementioned index alias can be used to associate the entity model with the index. Therefore, after an index is updated, only the association between the index and the index alias needs to be updated, without having to update the index alias in the entity model. This helps improve index update efficiency. Furthermore, when an index alias is associated with multiple indexes, it facilitates batch processing of indexes.
[0059] In some embodiments, after the above S202, the index switching method further includes: updating the entity model.
[0060] It's understood that the entity model defines the search algorithm and references the index name / index alias. (The search algorithm uses the configuration information in the index associated with the index alias, such as attributes, fields, and analyzers.) When the index changes, the entity model is updated accordingly. Attributes refer to characteristics of the restricted entities, such as addresses and names. Analyzers refer to text analysis algorithms, such as those that analyze the input information of the entity to be screened.
[0061] In one implementation, the computing device obtains an update rule for the entity model and performs an update, wherein the update rule includes content of the entity model update or includes the updated entity model.
[0062] Exemplarily, the computing device obtains the update rule through user input or other devices. For example, in the above S201, when obtaining one or more first indexes that need to be updated, the update rule of the entity model is obtained.
[0063] The above steps help the computing device to update the entity model after the index is changed, avoiding subsequent screening business interruptions due to the inability to match the entity model with the updated index, thereby improving business reliability.
[0064] In another implementation, the computing device obtains a change impact identifier, and updates the entity model if the change impact identifier indicates that the entity model is affected.
[0065] In some embodiments, the computing device determines the information indicated by the change impact indicator based on the information input by the user. For example, when the user inputs the first index name to be changed in S201 above, it further indicates whether the index change requires updating the entity model.
[0066] It is understandable that this approach helps determine the corresponding update action based on whether the index change affects the entity model, so that when the entity model is not affected, there is no need to update the entity model, saving computing resources.
[0067] It should be noted that when a change impact flag is set but no indication information is obtained, a default value may be used. For example, the default value indicates an impact on the entity model, and the update is performed according to the default value.
[0068] In some embodiments, after the above S202, the index switching method provided by this embodiment further includes: deleting the first index.
[0069] It is understood that since the first relationship has been switched to the second relationship, the computing device may delete the first index and its associated first data in the first relationship, thereby providing more storage space for storing the index and data during subsequent index updates. Furthermore, since the first index has been deleted, a new first index based on the first index name can be recreated during subsequent index updates. Therefore, deleting the first index facilitates resource reuse during subsequent updates.
[0070] It should be noted that the computing device may not delete the first index to facilitate update rollback, that is, the second relationship is switched to the first relationship, and there is no restriction on this.
[0071] It should be noted that the above index switching method can be applied to various objects of model change, such as attributes, fields, analyzers and other objects defined in the model.
[0072] The embodiment of the present disclosure also provides an index switching method, which is applied to a computing device including the above-mentioned search engine and a management platform. The computing device can be called an index switching device. The management platform is the management module in the index switching device, and the search engine is the execution module in the index switching device. The management module and the execution module can communicate based on the hypertext transfer protocol (HTTP) or the hypertext transfer protocol secure (HTTPS). In this embodiment, the management module and the execution module implement index switching through instruction interaction, as shown in Figure 3. For example, the index switching process includes the following S301 and S302.
[0073] In S301 , the management module sends a change instruction to the execution module.
[0074] The change instruction is used to instruct an update of a first relationship, where the first relationship is used to indicate one or more first indexes and first data associated with each of the one or more first indexes.
[0075] In one implementation, the management module generates a change instruction based on a user's instruction and sends the change instruction to the execution module. For example, the user inputs a first index name to be changed, and the management module determines the first index to be changed based on the first index name and generates a change instruction to instruct the execution module to change the first index.
[0076] In another implementation, the management module generates a change instruction based on change information sent by other devices. The change information includes at least the name of the index to be changed, and may also include other information such as index change rules.
[0077] It is understandable that the management module can obtain the index information that needs to be changed in any manner to generate a corresponding change instruction.
[0078] In S302 , the execution module switches the first relationship to the second relationship according to the change instruction.
[0079] The second relationship is used to indicate one or more second indexes and second data associated with each of the one or more second indexes, the second index is calculated based on the first index and the index change rule, and the first data is the same as the second data.
[0080] In this way, combined with the current application scenario, the management module is used to realize the interaction between the user and the execution module, so that the execution module can switch the index based on the instructions of the management module, improve the efficiency of index switching, and improve the reliability of the overall business.
[0081] As shown in FIG4 , it is an implementation of the above S301 and S302 , including the following S401 to S406 .
[0082] In S401 , the management module sends a first change instruction to the execution module.
[0083] The first change instruction is used to instruct the execution module to create a second relationship.
[0084] In one implementation, the first change instruction includes one or more first index names that need to be changed, and an index change rule.
[0085] In S402 , the execution module creates a second relationship according to the first change instruction.
[0086] In one implementation, the execution module determines the corresponding first index and the associated first data based on each first index name in the first change instruction; calculates the second index name based on the first index name and the index change rule; creates the second index based on the second index name and imports the second data for the second index.
[0087] In some embodiments, the above S401 and S402 can be split into the following S401a to S409a for implementation.
[0088] In S401a, the management module sends a first instruction to the execution module.
[0089] The first instruction is used to instruct the execution module to calculate one or more second index names.
[0090] In one implementation, the first instruction includes one or more first index names that need to be changed and an index change rule.
[0091] In S402a, the execution module receives the first instruction and calculates one or more second index names according to the first instruction.
[0092] Exemplarily, the execution module may create one or more corresponding second index names according to the index change rule and the one or more first index names.
[0093] The method for the execution module to calculate and obtain the second index name can be referred to the description of S11 above and will not be repeated here.
[0094] In S403a, the execution module sends a first response to the management module.
[0095] The first response is used to indicate whether the one or more second index names are created successfully.
[0096] For example, if the execution module successfully creates one or more second index names, the first response includes the one or more second index names; if the execution module fails, the execution module returns an indication of the creation failure. Alternatively, if the execution module successfully creates one or more second index names, the first response includes an indication of the creation success.
[0097] In some embodiments, when the management module instructs the creation of multiple second index names in S401a, the execution module can create the second index names one by one and provide feedback on the first responses one by one. This approach helps improve the reliability of creating the second index names. Failed creation of index names can be fed back to the management module, allowing the management module to instruct the creation of the second index names again or cancel the creation.
[0098] In some embodiments, when the management module instructs to create multiple second index names in S401a, the execution module can uniformly feedback the change result of whether the creation is successful or failed to the management module after all the second index names are created. This method helps to reduce the communication resources occupied by the interaction.
[0099] It should be noted that in S401a above, when multiple second index names need to be created, the management module may also send multiple instructions to the execution module one by one. For example, the management module instructs the creation of a second index name for index a, the execution module calculates index a', and feeds index a' back to the management module; the management module then instructs the creation of a second index name for index b, the execution module calculates index b', and feeds index b' back to the management module.
[0100] In S404a, the management module sends a second instruction to the execution module based on the first response.
[0101] The second instruction is used to instruct creation of one or more corresponding second indexes based on the one or more second index names.
[0102] Exemplarily, when the first response indicates that the one or more second index names are successfully created, the management module sends a second instruction to the execution module.
[0103] It is understood that when the management module receives the first response indicating that creation of one or more second index names has failed, it indicates that creation of the corresponding index based on the second index name cannot be achieved. In response, the management module can resend the first instruction to instruct the execution module to retry creation of the one or more second index names.
[0104] It should be noted that the manner of sending the second instruction in S404a can refer to the description in S403a. For example, the management module may instruct the creation of corresponding second indexes one by one based on the second index names, or the management module may instruct the creation of corresponding second indexes based on multiple second index names, without limitation.
[0105] It should be noted that the manner in which the second instruction is sent does not directly correspond to the manner in which the first instruction is sent or the first response is received. That is, the management module can send the first instruction to the execution module one by one or in multiples, and the execution module can feed back the first response to the management module one by one or in multiples. Similarly, the management module can send the second instruction to the execution module one by one or in multiples. The three can correspond to each other, for example, all sent one by one or in multiples, or there can be no correspondence between the three, and there is no limitation on this.
[0106] In S405a, the execution module creates one or more second indexes according to the second instruction.
[0107] Please refer to the description of S12 above.
[0108] In S406a, the execution module feeds back a second response to the management module.
[0109] The second response is used to indicate whether the second index is successfully created.
[0110] Exemplarily, when the second instruction instructs the creation of second indexes one by one, the execution module creates a second index according to the indicated second index and feeds back the creation result of the second index to the management module; when the second instruction instructs the creation of multiple second indexes, the execution module creates a second index according to the indicated multiple second indexes and feeds back the creation result of the second index to the management module one by one, or, after the creation of multiple second indexes is completed, the creation results of multiple second indexes are uniformly fed back to the management module.
[0111] In S407a, the management module sends a third instruction to the execution module.
[0112] The third instruction is used to instruct the execution module to import the second data into the second index.
[0113] For example, the second data may be a copy of the first data.
[0114] In S408a, the execution module receives the third instruction and imports the second data for the second index.
[0115] The second data can be obtained by creating a copy of the first data associated with the first index, or the computing device also includes a database that stores data content identical to the first data, and the second data can be obtained by creating a copy of the data content in the database.
[0116] In S409a, the execution module sends a third response to the management module.
[0117] The third response is used to indicate whether the second data is successfully imported into the second index.
[0118] The sending method of the third instruction and the third response can be referred to above and will not be repeated here.
[0119] It can be understood that the above-mentioned first response, second response and third response are used to feedback the execution results of the first instruction, the second instruction and the third instruction respectively, which helps the management module to know the execution results and give the next instruction.
[0120] Through the above manner, the second relationship is created based on the communication interaction between the management module and the execution module, providing a basis for the subsequent switching of the first relationship.
[0121] In S403 , the execution module feeds back a first change response to the management module.
[0122] The first change response is used to indicate whether the second relationship is successfully created.
[0123] It should be noted that when executing S401a to S409a above, S403 can be replaced by S409a above, that is, after the management module receives the result of the execution module importing data, it uses the result as the result of whether the second relationship is successfully created.
[0124] It is understood that the manner of sending the first change instruction and the first change response can also refer to the manner of sending the first response, the second response, and the third response. For example, the first change instruction instructs the creation of the second index one by one or multiple times, and the first change response feedbacks the change result of creating the second index one by one or multiple times.
[0125] In S404 , the management module sends a second change instruction to the execution module according to the first change response.
[0126] The second change instruction is used to instruct to switch the first relationship to the second relationship.
[0127] In S405 , the execution module switches the first relationship to a second relationship according to the second change instruction.
[0128] In S406 , the execution module sends a second change response to the management module.
[0129] Similarly, the second change instruction and the second change response may refer to the sending method of the first change instruction and the first change response, and will not be described in detail.
[0130] It is understandable that, through the above method, the management module and the execution module implement the switching of one or more indexes in an interactive manner. For example, it can be implemented step by step according to the index update content to improve the feasibility of the solution.
[0131] In some embodiments, before the above S301 or S401, the index switching method further includes: the management module obtains one or more first indexes.
[0132] In one implementation, the management module obtains one or more first index names and determines one or more corresponding first indexes based on the one or more first index names. For example, the management module receives the one or more first index names input by a user, or the management module obtains the one or more first index names through another device.
[0133] In another implementation, the management module obtains an index alias, and obtains one or more first indexes according to the index alias. The index alias is associated with the one or more first index names.
[0134] It is understandable that before indicating the change, the management module needs to determine the one or more first indexes to be changed. The above-mentioned index alias method is helpful for batch processing of multiple indexes, thereby improving the overall index switching efficiency.
[0135] For example, the management module may send an index alias to the execution module, and the execution module may determine one or more first index names based on the index alias and feedback the one or more first index names to the management module. Furthermore, the management module may determine a first change instruction based on the one or more first index names and send the first change instruction to the execution module.
[0136] The management module typically sends the first index name one by one, and waits for feedback from the execution module before sending the next first index name until one or more first index names have been changed. This approach helps the management module promptly identify index changes and, if an index change fails, promptly reports the fault location to technical personnel for adjustment or repair.
[0137] It should be noted that, in actual applications, the management module and the execution module can also perform batch processing. The above description is only an example and is not limited to this.
[0138] Associating multiple indexes with index aliases helps aggregate multiple indexes, allowing for subsequent screening operations based on massive amounts of data. Furthermore, updating indexes with these index aliases helps improve the efficiency of managing massive amounts of data.
[0139] In some embodiments, the index switching method further includes: the management module sending an update instruction to the execution module to instruct the entity model to be updated.
[0140] In one implementation, after determining that the second index is associated with the first data, the management module sends an update instruction to the execution module.
[0141] It is understandable that in order to avoid the entity model being unable to be applied to the current screening business due to index changes, the management module can adopt this method to match the entity model with the updated index, thereby improving system reliability.
[0142] In another implementation, the management module obtains a change impact identifier, and when the change impact identifier indicates that the entity model is affected, sends an update instruction to the execution module.
[0143] For information on how to obtain the change impact identifier, please refer to the above description and will not be repeated here.
[0144] This helps the management module determine the impact of index changes on the entity model with the help of other information.
[0145] In some embodiments, the index switching method described in FIG. 3 or FIG. 4 further includes: the management module storing the change result.
[0146] The change result refers to the result of the change based on the above-mentioned change instruction.
[0147] It is understandable that when index changes are made through the interaction between the management module and the execution module, the management module can obtain the change results fed back by the execution module. Further, the management module can store the change results to synchronously feed back the change results to the user as the change progress.
[0148] Exemplarily, the change result may also be referred to as the relationship change progress. In conjunction with the description of S401 to S406 above, the change result may include the result of creating the second index name, the result of creating the second index, and the result of index switching, that is, the content of the first response, the second response, and the third response.
[0149] For example, when the management module obtains the first response fed back by the execution module, the management module can know whether the second index name is successfully created, and further, the result can be stored. Similarly, when the management module obtains the second response fed back by the execution module, the management module can know whether the second index is successfully created, and further, the result can be stored. For another example, when the management module obtains the third response or the first change response, the management module can know whether the second data is successfully imported. If successful, it can also indicate that the second relationship is created, and further, the result can be stored. For another example, when the management module obtains the second change response, it can know whether the execution module successfully completes the switch between the first relationship and the second relationship, and further, the result can be stored.
[0150] It should be noted that the above management module can store the change results locally, such as in a database, or in other devices, without limitation.
[0151] In some embodiments, the index switching device further includes a message queue (MQ), and the management module stores the change result through the message queue.
[0152] The message queue uses an efficient and reliable asynchronous message mechanism to process messages one by one according to their generation time. The message queue and the management module can communicate based on the transmission control protocol (TCP).
[0153] In one implementation, after the management module obtains the change result, it feeds it back to the message queue. The message queue generates a message in the message queue based on the change result. The independent thread of the management module automatically extracts the message from the message queue according to the generation time of the message and stores the extracted message.
[0154] In another implementation method, after the management module obtains the change result, it directly stores it. If the storage fails, the change result is fed back to the message queue. Then, according to the above implementation method, the independent thread of the management module extracts the message according to the generation time of the message in the message queue and stores the extracted message.
[0155] For example, as shown in FIG5 , the management module directly stores the acquired change results in the database, or sends the change results to a message queue, which generates messages in a message list (such as change result 1 and change result 2 shown in FIG5 ). The management module extracts messages from the message list based on the generation time of the messages and stores the extracted messages in the database.
[0156] This approach helps reduce the resources occupied by communication interactions and improves overall processing efficiency.
[0157] It is understandable that currently only the change results are stored through the management module to indicate the progress of the change. However, since the processing progress of the execution module cannot be completely consistent with the change progress obtained by the management module, for example, when the management module fails to store, the execution module can continue with the current processing progress to perform the update. Therefore, since the two do not affect each other, that is, the processing of the execution module and the update of the change results by the management module are not atomic operations, data consistency issues may arise. When storing the change results through the message queue, the management module needs to process them one by one according to the generation time of the message, and repeatedly execute or alarm when a message fails to be stored, which helps to keep the change progress updated in the management module consistent with the execution module and improve data consistency.
[0158] In some embodiments, after updating the entity model, the management module may store the update result, for example, by using the message queue.
[0159] It should be noted that each module in the above-mentioned index switching device can be implemented by one or more processors, for example, by a single processor, or by each processor implementing the function of a module, or by integrating any two modules into one processor and integrating the remaining module into another processor, without limitation. In addition, each module can also be implemented as an independent entity through different devices, or any two modules can be integrated into one device and another module can be integrated into another device, for example, the above-mentioned management module and message queue can be implemented in one device, and the execution module can be implemented in another device, without limitation.
[0160] It is understandable that, in order to realize the above functions, the above-mentioned computing device or index switching device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the algorithm steps of each example described in the embodiments of the present disclosure, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present disclosure.
[0161] The embodiment of the present disclosure can divide the above-mentioned computing device or index switching device into functional modules according to the above-mentioned method embodiment. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one functional module. The above-mentioned integrated module can be implemented in the form of hardware or software. It should be noted that the division of modules in the embodiment of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.
[0162] In the case of dividing each functional module into corresponding functional modules, a schematic diagram of the structure of the computing device involved in the above embodiment is shown in FIG6 .
[0163] The acquisition unit 601 acquires a first relationship to be referenced, where the first relationship indicates one or more first indexes and first data associated with each of the one or more first indexes. For example, the acquisition unit 601 is configured to execute S201 in FIG2 .
[0164] Processing unit 602 is configured to switch the first relationship to a second relationship, where the second relationship indicates one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and an index change rule, and the first data is the same as the second data. For example, processing unit 602 is further configured to execute S202 in FIG. 2 .
[0165] In some examples, the acquisition unit 601 is used, for example, to: acquire an index alias, where the index alias is associated with one or more first indexes; and acquire the first relationship based on the index alias.
[0166] In some examples, the processing unit 602 is further configured to update the association of the index alias with the one or more first indexes to an association of the index alias with the one or more second indexes.
[0167] In some examples, the computing device 60 further includes a sending unit 603 configured to feed back the progress of the relationship change to the management platform. The management platform stores the progress of the relationship change from the first relationship to the second relationship via a message queue.
[0168] In some examples, the processing unit 602 is further configured to delete one or more second indexes.
[0169] In some examples, the acquisition unit 601 is further configured to acquire an update instruction for the entity model. The entity model includes an algorithm for screening based on the first data. The processing unit 602 is further configured to update the entity model according to the update instruction.
[0170] In some examples, the acquiring unit 601 is further configured to acquire a change impact identifier. The change impact identifier is used to indicate whether the switching of the first relationship affects the entity model. The processing unit 602 is further configured to update the entity model in response to the change impact identifier indicating that the entity model is affected.
[0171] In one example, the computing device 60 further includes a storage unit 604 for storing computer-executable instructions. Other units in the computing device can perform corresponding actions according to the computer-executable instructions stored in the storage unit 604.
[0172] For a detailed description of the above-mentioned manner, please refer to the aforementioned method embodiment, which will not be repeated here. In addition, the explanation of any of the computing devices 60 provided above and the description of the beneficial effects can refer to the aforementioned corresponding method embodiment, which will not be repeated here.
[0173] In the case of dividing each functional module into corresponding functional modules, another structural diagram of the index switching device involved in the above embodiment is shown in FIG7 . As shown in FIG7 , the index switching device 70 includes a management module 701 and an execution module 702 .
[0174] The management module 701 is configured to send a change instruction to the execution module, where the change instruction is configured to instruct the execution module to update a first relationship, where the first relationship is configured to indicate one or more first indexes and first data associated with each of the one or more first indexes. For example, the management module 701 is configured to execute S301 in FIG. 3 .
[0175] Execution module 702 is configured to switch the first relationship to a second relationship based on the change instruction, where the second relationship indicates one or more second indexes and second data associated with each of the one or more second indexes. The second index is calculated based on the first index and an index change rule, and the first data is the same as the second data. For example, execution module 702 is configured to execute S302 in FIG. 3 .
[0176] In some examples, the change instruction includes a first change instruction and a second change instruction, the first change instruction is used to instruct creation of one or more second indexes, and the second change instruction is used to instruct association of the first data with the one or more second indexes.
[0177] In some examples, the index switching device 70 further includes a message queue 703. The execution module 702 is further configured to provide feedback to the management module regarding a change result, where the change result indicates the result of the change based on the change instruction. The management module 701 is further configured to send the change result to the message queue. The message queue 703 is configured to receive the change result and generate a message in a message list. The management module 701 is further configured to extract messages from the message queue based on their generation time and store them in a database.
[0178] In one example, the index switching device 70 further includes a storage unit 704. The storage unit 704 is used to store computer-executable instructions, and other units in the index switching device can perform corresponding actions according to the computer-executable instructions stored in the storage unit 704.
[0179] For the detailed description of the above-mentioned manner, please refer to the aforementioned method embodiment, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the above-mentioned index switching devices 70 can refer to the corresponding method embodiment, which will not be repeated here.
[0180] In the case of implementing the functions of the above-mentioned integrated modules in hardware, the embodiments of the present disclosure provide another structure of a communication device, such as the computing device or index switching device mentioned in the above embodiments. As shown in Figure 8, the communication device 80 includes: a processor 802 and a bus 804. In some embodiments, the communication device may also include a memory 801. In some embodiments, the communication device may also include a communication interface 803.
[0181] The processor 802 may be configured to implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present disclosure. The processor 802 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof, and may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present disclosure. The processor 802 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP (digital signal processor) and a microprocessor, and the like. For example, the processor 802 is configured to execute S202 in FIG. 2 , S302 in FIG. 3 , and S402 and S405 in FIG. 4 .
[0182] The communication interface 803 is used to connect to other devices via a communication network. The communication network can be Ethernet, a wireless access network, a wireless local area network (WLAN), etc. For example, the communication interface 803 is used to execute S201 in Figure 2, S301 in Figure 3, and S401, S403, S404, and S406 in Figure 4.
[0183] The memory 801 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. For example, the memory 801 is used to store computer instructions so that the processor 802 executes the computer instructions to perform the above steps.
[0184] As an implementation, the memory 801 can exist independently of the processor 802. The memory 801 can be connected to the processor 802 via a bus 804 and used to store instructions or program codes. When the processor 802 calls and executes the instructions or program codes stored in the memory 801, the index switching method provided in the embodiment of the present disclosure can be implemented.
[0185] In another implementation, the memory 801 may also be integrated with the processor 802 .
[0186] Bus 804 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 804 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG8 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0187] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer, the computer executes the index switching method described in any of the above embodiments.
[0188] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes, etc.), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memories (EPROMs), cards, sticks, or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0189] An embodiment of the present disclosure provides a computer program product comprising instructions. When the computer program product is run on a computer, the computer is enabled to execute the index switching method described in any one of the above embodiments.
[0190] In the technical solution disclosed in the present invention, the second index and the second data associated with it are created based on the first index and the first data associated with it, which helps to perform the screening service based on the first index and the first data during the second index creation process, thereby effectively avoiding the interruption of the screening service by creating the second index after deleting the first index. In addition, when the first relationship is switched to the second relationship, the screening service will be implemented based on the second index for establishing the second relationship and the second data associated with it. Since the first data and the second data are the same before and after the switch, that is, the screening service is searched based on the complete data content, it can avoid the generation of unreliable screening results by performing the screening service based on incomplete data content during the process of creating the second index and importing the second data after deleting the first index, which helps to improve the reliability of the screening results.
[0191] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present disclosure shall be covered by the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.
Claims
1. An index switching method, comprising: Acquire a first relationship to be referenced, where the first relationship is used to indicate one or more first indexes and first data associated with each of the one or more first indexes; Switching the first relation to a second relation, where the second relation is used to indicate one or more second indexes and second data associated with each of the one or more second indexes; The second index is calculated based on the first index and an index change rule, and the first data is the same as the second data.
2. The method according to claim 1, wherein: The acquiring the first relationship to be referenced includes: Obtain an index alias, where the index alias is associated with the one or more first indexes; Based on the index alias, the first relationship is obtained.
3. The method according to claim 2, wherein: The switching the first relationship to the second relationship includes: The index alias is associated with the one or more first indexes, and updated so that the index alias is associated with the one or more second indexes.
4. The method according to any one of claims 1 to 3, further comprising: The progress of the relationship change is fed back to the management platform, and the management platform stores the progress of the relationship change from the first relationship to the second relationship through a message queue.
5. The method according to claim 1, wherein: Before switching the first relationship to the second relationship, the method further includes: The one or more second indexes are deleted.
6. The method according to any one of claims 1 to 3 and claim 5, further comprising: obtaining an update instruction for a physical model, wherein the physical model includes an algorithm for performing screening based on the first data; According to the update instruction, the entity model is updated.
7. The method according to claim 6, wherein: The updating of the entity model according to the update instruction includes: Acquire a change impact identifier, where the change impact identifier is used to indicate whether switching of the first relationship affects the entity model; In response to the change impact indicator indicating the impact on the entity model, the entity model is updated.
8. An index switching device, wherein: The index switching device at least includes a management module and an execution module. The management module is used to send a change instruction to the execution module, wherein the change instruction is used to instruct to update a first relationship, wherein the first relationship is used to indicate one or more first indexes and first data associated with each of the one or more first indexes; The execution module is used to switch the first relationship to a second relationship according to the change instruction, wherein the second relationship is used to indicate one or more second indexes and second data associated with each of the one or more second indexes, the second index is calculated based on the first index and the index change rule, and the first data is the same as the second data.
9. The device according to claim 8, wherein: The change instruction includes a first change instruction and a second change instruction, the first change instruction is used to instruct the creation of the one or more second indexes, and the second change instruction is used to instruct the association of the first data with the one or more second indexes.
10. The device according to claim 8 or 9, wherein: The index switching device also includes a message queue, The execution module is further used to feed back a change result to the management module, where the change result is used to indicate a result of a change based on the change instruction; The management module is further used to send the change result to the message queue; The message queue is used to receive the change result and generate a message in the message list; The management module is further used to extract the message based on the generation time of the message in the message queue and store the message in the database.
11. A computing device comprising: A memory and a processor, wherein the memory is coupled to the processor and is used to store a computer program; When the processor executes the computer program, the index switching method according to any one of claims 1 to 7 is implemented.
12. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the processor executes the index switching method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Index changing method and device
CN112507187A
Index reconstruction method and device, equipment, computer readable storage medium and product
CN112835980A
Service query method and device, computer equipment and readable storage medium
CN112883252A
Index switching method and device and computer readable storage medium
CN118210799A
Table and index communications channels
US10102228B1