Personalized data reading method
By synchronously writing mapping relational table records in relational databases to non-relational databases, and querying and filtering through non-relational databases when reading data, the problems of association query and global sorting in large data volume data are solved, real-time and accurate data reading are achieved, and user experience and system performance are improved.
Patent Information
- Application Number
- CN202510436204.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-05-06
AI Technical Summary
The existing data reading method cannot be applied to data reading with large data volumes, and there are natural defects in correlated queries and global sorting. Quasi-real-time data reading of search engines cannot guarantee the return of the latest data in real time, resulting in data distortion and poor user experience.
By obtaining the many-to-many first and second subject tables, and the mapping relationship tables between them, the records of the mapping relationship table are written to the non-relational database through data double-write synchronization, and the field unique values are assembled through the core fields of the business scenario when data is read, and the non-relational database is queried to obtain and filter the information content to be displayed.
Real-time reading of large data volumes is realized, meeting the real-time requirements of C-end user scenarios for data response, ensuring data accuracy and referenceability, improving user experience, and saving additional data storage and consistency guarantee costs.
Smart Images

Figure CN119938725A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a personalized data reading method. Background Art
[0002] With the development of technology, data processing of large amounts of data has become a key challenge and an important part of the field of modern information technology. For example, in environments such as big data and real-time network applications that require fast read and write operations, data processing of billions of orders of magnitude puts extremely high demands on the management system. The existing technology uses the technology of sub-library and sub-table when storing data in the database to complete the data storage, and then realizes quasi-real-time data reading through the search engine, such as the Elasticsearch search engine index construction method and device disclosed in the Chinese patent (Announcement No.: CN113672627B). In this patented technology, the Flink cluster is used to periodically export the full index target data from the database and create a new index library; the near-real-time index service listens to the business data change message notification, reads the latest data from the database and updates it to the existing index library, and It detects whether batch index construction is in progress and updates the batch index data to the newly created index library; it switches the Elasticsearch index to an alias and points the index target to the newly created index library, which improves data synchronization efficiency and ensures data consistency during and after the index batch construction process. However, in actual work, based on the natural defects of the database and table sharding technology in associated queries and global sorting, it can only achieve data statistics and analysis in related scenarios through additional costs such as data redundancy. At the same time, the search engine's quasi-real-time data reading cannot guarantee the real-time return of the user's latest data, which can easily lead to data distortion. At the same time, when the above technical solution is used to realize personalized reading of large amounts of data, its low retrieval efficiency makes it impossible to return the required data in time during associated queries, resulting in an inability to properly divide the information that needs to be displayed and the information that does not need to be displayed, and a poor user experience. Summary of the invention
[0003] The technical problem to be solved by the present invention is as follows: the existing data reading method is not applicable to the data reading work of large amount of data, and has natural defects in associated query and global sorting. At the same time, the quasi-real-time data reading of the search engine cannot guarantee the real-time return of the latest data to the user, which easily leads to data distortion and poor personalized data reading experience.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solution: a personalized data reading method, comprising the following steps: S1: Obtain a many-to-many first subject table and a second subject table of two different data magnitudes, and a mapping relationship table between records of the first subject table and records of the second subject table; S2: Write the records of the mapping relationship table stored in the relational database into the non-relational database through data double writing synchronization, take the record ID in the first subject table as the subject through the core field of the business scenario, obtain the record ID of the second subject table associated with the record in the mapping relationship table, generate records through integration and store them in the non-relational database; S3: When reading data, the core fields of the business scenario are used to assemble unique field values, query the non-relational database, obtain the corresponding records, parse the records to filter out the information to be displayed, and return it to the user.
[0005] When the present invention is working, the records of the mapping relationship table stored in the relational database are synchronously written into the non-relational database through data double writing to assist in the real-time reading of extremely large amounts of data, thereby meeting the requirements of the C-end user scenario for real-time data response, while ensuring that the latest and accurate data can be obtained in real time, improving the referenceability of the data, and at the same time, through the timely returned records, the information content that needs to be displayed can be screened in real time when the information is displayed and returned to the customer, with good personalized data reading performance, which greatly improves the user experience.
[0006] Preferably, in step S2, when the records of the mapping relationship table stored in the relational database are synchronously written into the non-relational database through data double writing, the following steps are adopted to process only a single user request when triggering data double writing, and update a single record in the non-relational database.
[0007] Preferably, in step S2, the record ID in the first main table is taken as the main body through the core field of the business scenario, and the record ID of the second main table associated with the record in the mapping relationship table is obtained. When the record is generated through integration and stored in a non-relational database, the following steps are adopted: in the non-relational database, the record ID in the first main table is taken as the main body, and a field unique value is created through the core field of the business scenario when reading data, and the record ID of the second main table associated with the record in the mapping relationship table is obtained and set to several elements. The array corresponding to the record is obtained through integration, and the array is stored in the non-relational database to generate a corresponding record.
[0008] When the present invention works, it can ensure the flexibility and accuracy of statistics and analysis of data after billions of data are stored, and fully support the joint table query, aggregate query, and global sorting of mainstream databases, saving additional technical costs such as data storage and data consistency assurance. At the same time, there is no need to additionally process the association logic and modify the table structure. When adding an associated element, only the array content of the record needs to be adjusted. It is suitable for dynamic business scenarios. At the same time, the integrated array structure is adopted. When reading personalized data, there is no need to manually assemble the associated data, which reduces JOIN operations, reduces I / O overhead and network round trip times, and greatly improves the query performance of large data volumes.
[0009] Preferably, the step S2 further includes the following steps: generating derived relationships and propagation paths of records by establishing a bloodline map index of the records, and optimizing and sorting the records stored in the non-relational database according to the associated information of the records.
[0010] Preferably, in step S2, when generating the derived relationship and propagation path of the record by establishing the bloodline map index of the record, the following steps are adopted: A1: Obtain several records stored in a non-relational database, extract key features of several records after data preprocessing, and construct association keys of related records among the several records; A2: According to the association key of the associated record, key features are extracted and aggregated through the records in the first main table, the records in the second main table, and the core fields of the business scenario in turn to obtain the associated information of the record; A3: Establish a bloodline map index of several records through the associated information of the records to obtain the derived relationship and propagation path of the records.
[0011] Preferably, in step S2, when optimizing and sorting the records stored in the non-relational database according to the associated information of the records, the following steps are adopted: B1: Divide storage blocks according to the data size in the non-relational database; B2: Calculate the adjacency of the associated records through the associated information of the records, and store the associated records whose adjacency is greater than a preset threshold into the corresponding storage block; B3: In the storage block, the derived relationship and propagation path of the record are obtained, and the comprehensive score of each record is calculated and output after weight distribution. According to the comprehensive scores of the records in the storage block, several records are optimized and sorted.
[0012] Preferably, in step B3, when obtaining the derivative relationship and propagation path of the record and calculating and outputting the comprehensive score of each record after weight allocation, the following steps are adopted to obtain the derivative relationship and propagation path of the record, and obtain the real-time heat of each record, and after weight allocation, calculate and output the comprehensive score of each record based on the importance of the derivative relationship of the record, the length of the propagation path and the real-time heat value of the record.
[0013] When the present invention is working, it establishes a bloodline map index according to key features and association keys in a non-relational database to clearly identify the source, derivative path and dependency of the record, so as to facilitate the centralized storage of highly associated records in the corresponding storage blocks, reduce the disk addressing time of cross-block queries, and realize multi-hop association queries at the same time, which can further improve the update efficiency of the record, and realize automatic stratification of hot and cold data, reduce redundant calculations, and is suitable for queue update records.
[0014] Preferably, in step S3, when reading data, the field unique value is assembled through the core field of the business scenario, the non-relational database is queried, the corresponding record is obtained, and the information content to be displayed is filtered out by parsing the record. When returning it to the user, the following steps are adopted: the field unique value is assembled through the core field of the business scenario, the non-relational database is queried, and the corresponding record is obtained. After that, the record is parsed to obtain several corresponding records in the second main table, and data is screened in the preset data set to be displayed, the information content to be displayed is obtained, and it is returned to the user.
[0015] Preferably, in step S2, the following steps are also included: C1: When a data mapping relationship between a record in the first main table and a record in the second main table is added, the records defining the newly added data mapping relationship are the first record and the second record respectively; C2: Get the ID of the first record and the ID of the second record, open the synchronization lock, write the associated record of the first record and the second record in the mapping relationship table, generate the unique value of the field in combination with the ID of the first record, query in the non-relational database, get the corresponding record, and after parsing the array, store the ID and related information of the second record in the array, and update the corresponding record; C3: Determine whether the writing is successful. If the writing is unsuccessful, roll back the non-relational database and roll back the relational database. Otherwise, release the synchronization lock and end the adding operation.
[0016] Preferably, in step S2, the following steps are also included: D1: When deleting the data mapping relationship between the record in the first main table and the record in the second main table, define the associated record of the data mapping relationship to be deleted as the first record, open the synchronization lock, and query the mapping relationship table to obtain the second record and the third record associated with the first record; D2: Generate a unique field value based on the ID of the second record and query in the non-relational database to obtain the corresponding record. After parsing the array, delete the ID and related information of the third record in the array, update the corresponding record, and delete the first record in the mapping relationship table. D3: Determine whether the deletion is successful. If the deletion is not successful, roll back the relational database and roll back the non-relational database. Otherwise, release the synchronization lock and end the deletion operation.
[0017] The beneficial technical effects of the present invention include: 1. The present invention assists in the real-time reading of extremely large amounts of data by writing the records of the mapping relationship table stored in the relational database into the non-relational database through data double-write synchronization, thereby meeting the requirements of the C-end user scenario for real-time data response, while ensuring that the latest and accurate data can be obtained in real time, improving the referenceability of the data, and at the same time, through the timely returned records, the information content that needs to be displayed can be screened out in real time during information display and returned to the customer, with good personalized data reading performance, which greatly improves the user experience.
[0018] 2. The present invention can ensure the flexibility and accuracy of statistics and analysis of data after billions of data are stored, and fully supports the joint table query, aggregate query, and global sorting of mainstream databases, saving additional technical costs such as data storage and data consistency assurance. At the same time, there is no need to additionally process the association logic and modify the table structure. When adding an associated element, only the array content of the record needs to be adjusted. It is suitable for dynamic business scenarios. At the same time, the integrated array structure is adopted. When reading personalized data, there is no need to manually assemble the associated data, which reduces JOIN operations, reduces I / O overhead and network round trip times, and greatly improves the query performance of large data volumes.
[0019] 3. The present invention establishes a bloodline map index based on key features and association keys in a non-relational database to clearly identify the source, derivative path and dependency of the record, facilitates the centralized storage of highly associated records in the corresponding storage blocks, reduces the disk addressing time of cross-block queries, and can also realize multi-hop association queries, which can further improve the update efficiency of records, and can also realize automatic stratification of hot and cold data, reducing redundant calculations, and is suitable for queue update records.
[0020] Other features and advantages of the present invention will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 A workflow diagram for a personalized data reading method; Figure 2 The workflow of step S2 in a personalized data reading method Figure 1 ; Figure 3 The workflow of step S2 in a personalized data reading method Figure 2 ; Figure 4 A workflow diagram for adding a data mapping relationship between records in the first main table and records in the second main table; Figure 5 A workflow diagram for deleting the data mapping relationship between records in the first main table and records in the second main table. DETAILED DESCRIPTION
[0022] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0023] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operate in a specific direction. Therefore, it should not be understood as a limitation of the present invention. Embodiment 1:
[0024] See also Figure 1 , this embodiment discloses a personalized data reading method, comprising the following steps: S1: Obtain a many-to-many first subject table and a second subject table of two different data magnitudes, and a mapping relationship table between records of the first subject table and records of the second subject table; S2: Write the records of the mapping relationship table stored in the relational database into the non-relational database through data double writing synchronization, take the record ID in the first subject table as the subject through the core field of the business scenario, obtain the record ID of the second subject table associated with the record in the mapping relationship table, generate records through integration and store them in the non-relational database; S3: When reading data, the core fields of the business scenario are used to assemble unique field values, query the non-relational database, obtain the corresponding records, parse the records to filter out the information to be displayed, and return it to the user.
[0025] When this embodiment is working, the records of the mapping relationship table stored in the relational database are written into the non-relational database through data double-write synchronization to assist in the real-time reading of extremely large amounts of data, thereby meeting the requirements of the C-end user scenario for real-time data response, while ensuring that the latest and accurate data can be obtained in real time, improving the referenceability of the data, and at the same time, through the timely returned records, the information content that needs to be displayed can be filtered out in real time when the information is displayed and returned to the customer, with good personalized data reading performance, which greatly improves the user experience.
[0026] As a further improvement of the present embodiment, in the step S2, the record ID in the first main table is taken as the main body through the core field of the business scenario, and the record ID of the second main table associated with the record in the mapping relationship table is obtained. When the record is generated by integration and stored in the non-relational database, the following steps are adopted: in the non-relational database, the record ID in the first main table is taken as the main body, and a field unique value is created through the core field of the business scenario when reading data, and the record ID of the second main table associated with the record in the mapping relationship table is obtained and set to several elements, and the array corresponding to the record is obtained through integration, and the array is stored in the non-relational database to generate corresponding records. When working, the field unique value created by the core field of the business scenario is used as an anchor point, and the associated records are pre-integrated, which can ensure the logical consistency of the records at the business level, and at the same time avoid the cross-table business requirements of the sub-library and sub-table method, and can truly realize real-time reading of data.
[0027] When this embodiment is working, it can ensure the flexibility and accuracy of statistics and analysis of data after billions of data are stored, and fully support the joint table query, aggregate query, and global sorting of mainstream databases, saving additional technical costs such as data storage and data consistency assurance. At the same time, there is no need to additionally process the association logic and modify the table structure. When adding an associated element, only the array content of the record needs to be adjusted. It is suitable for dynamic business scenarios. At the same time, the integrated array structure is used. When reading personalized data, there is no need to manually assemble associated data, which reduces JOIN operations, reduces I / O overhead and network round trip times, and greatly improves the query performance of large data volumes.
[0028] Preferably, in step S3, when reading data, the field unique value is assembled through the core field of the business scenario, the non-relational database is queried, the corresponding record is obtained, and the information content to be displayed is screened out by parsing the record. When returning it to the user, the following steps are adopted: the field unique value is assembled through the core field of the business scenario, the non-relational database is queried, and the corresponding record is obtained, and the record is parsed to obtain several corresponding records in the second main table, and data is screened in the preset data set to be displayed to obtain the information content to be displayed, and returned to the user. When working, the information content to be displayed is screened out in the personalized data reading service through the real-time returned records, which can avoid the display of erroneous information caused by label-based filtering of display information. For example, in the e-commerce business scenario, the personalized recommendation of homepage information can only return the homepage information that matches the customer to the customer by adopting the technical solution of this embodiment, so that users with different label combinations can see different personalized recommendation information. Embodiment 2:
[0029] This embodiment provides a personalized data reading method, and the similarities with other embodiments are not repeated here, and the differences are described in detail below.
[0030] See also Figures 2 to 5 In this embodiment, in step S2, when the records of the mapping relationship table stored in the relational database are synchronously written into the non-relational database through data double writing, the following steps are adopted. When the data double writing is triggered, only a single user request is processed, and a single record in the non-relational database is updated, which can avoid the risk of data conflict or returning erroneous data when updating the record.
[0031] In the specific implementation, in the step S2, the following steps are also included: C1: When a data mapping relationship between a record in the first main table and a record in the second main table is added, the records defining the newly added data mapping relationship are the first record and the second record respectively; C2: Get the ID of the first record and the ID of the second record, open the synchronization lock, write the associated record of the first record and the second record in the mapping relationship table, generate the unique value of the field in combination with the ID of the first record, query in the non-relational database, get the corresponding record, and after parsing the array, store the ID and related information of the second record in the array, and update the corresponding record; C3: Determine whether the writing is successful. If the writing is unsuccessful, roll back the non-relational database and roll back the relational database. Otherwise, release the synchronization lock and end the adding operation.
[0032] Preferably, in step S2, the following steps are also included: D1: When deleting the data mapping relationship between the record in the first main table and the record in the second main table, define the associated record of the data mapping relationship to be deleted as the first record, open the synchronization lock, and query the mapping relationship table to obtain the second record and the third record associated with the first record; D2: Generate a unique field value based on the ID of the second record and query in the non-relational database to obtain the corresponding record. After parsing the array, delete the ID and related information of the third record in the array, update the corresponding record, and delete the first record in the mapping relationship table. D3: Determine whether the deletion is successful. If the deletion is not successful, roll back the relational database and roll back the non-relational database. Otherwise, release the synchronization lock and end the deletion operation.
[0033] As a further improvement of this embodiment, in order to cope with the processing of large amounts of data, such as the preference information management of billions of people, the volunteer service records of hundreds of millions of people, etc., it is also necessary to ensure the real-time updating of records. Therefore, in the step S2, the following steps are also included, generating the derived relationships and propagation paths of the records by establishing a bloodline map index of the records, and optimizing the sorting of the records stored in the non-relational database according to the associated information of the records.
[0034] Preferably, in step S2, when generating the derived relationship and propagation path of the record by establishing the bloodline map index of the record, the following steps are adopted: A1: Obtain several records stored in a non-relational database, extract key features of several records after data preprocessing, and construct association keys of related records among the several records; A2: According to the association key of the associated record, key features are extracted and aggregated through the records in the first main table, the records in the second main table, and the core fields of the business scenario in turn to obtain the associated information of the record; A3: By using the associated information of the records, a number of lineage map indexes are established to obtain the derived relationships and propagation paths of the records, thereby realizing the lineage tracing of the data. Without adding additional annotations, the fusion of related records and the manifestation of implicit relationships can be achieved, which can assist in the block storage of data in non-relational databases.
[0035] In specific implementation, in step S2, when optimizing and sorting the records stored in the non-relational database according to the associated information of the records, the following steps are adopted: B1: Divide storage blocks according to the data size in the non-relational database; B2: Calculate the adjacency of the associated records through the associated information of the records, and store the associated records whose adjacency is greater than a preset threshold into the corresponding storage block; B3: In the storage block, the derived relationship and propagation path of the record are obtained, and the comprehensive score of each record is calculated and output after weight distribution. According to the comprehensive scores of the records in the storage block, several records are optimized and sorted.
[0036] In the specific implementation, in the step B2, when calculating the adjacency of the associated records through the associated information of the records, the following calculation formula is used: ; in: is the adjacency between record A and record B, k is the attenuation coefficient, and in specific implementation, it is generally taken as 0.05 to 0.2. In a non-relational database with large amounts of data, the update frequency of a large number of records stored previously will gradually decrease until it remains unchanged. In order to achieve time isolation from previously stored records, the physical distance calculation item between records is introduced, so that when updating records, the influence of previous records on the speed of forming new storage blocks can be reduced. Without additional settings, time and space isolation between records can be achieved, which improves the update efficiency of records. It can be dynamically adjusted according to the difference information between record A and record B. For example, when there are mutually exclusive common fields between record A and record B, k needs to use a larger value. When the time and space correlation between record A and record B is high, k needs to use a smaller value. To calculate the similarity between record A and record B, in specific implementation, it is necessary to select a suitable calculation method according to the actual stored content and specifications, such as the Levenshtein algorithm or Jaro-Winkler, etc. is the storage position deviation between record A and record B.
[0037] As a further improvement of this embodiment, in step B3, the derivative relationship and propagation path of the record are obtained, and the comprehensive score of each record is calculated and output after weight allocation. The following steps are adopted to obtain the derivative relationship and propagation path of the record, and obtain the real-time popularity of each record. After weight allocation, the comprehensive score of each record is calculated and output according to the importance of the derivative relationship of the record, the length of the propagation path and the real-time popularity value of the record. In specific implementation, the dynamic adjustment of the comprehensive score can be achieved by dynamically assigning weights to the importance of the derivative relationship, the length of the propagation path and the real-time popularity value of the record according to the business scenarios of actual applications, which can further improve the efficiency of record updating without increasing the steps of record updating and occupying less computing power resources.
[0038] When this embodiment is working, a bloodline map index is established in a non-relational database according to key features and association keys to clearly identify the source, derivative path and dependency of the record, so as to facilitate the centralized storage of highly associated records in the corresponding storage blocks, reduce the disk addressing time of cross-block queries, and realize multi-hop association queries, which can further improve the update efficiency of records, and realize automatic stratification of hot and cold data, reduce redundant calculations, and is suitable for queue update records.
[0039] The beneficial technical effects of this embodiment include: the present invention assists in the real-time reading of extremely large amounts of data by synchronously writing the records of the mapping relationship table stored in the relational database into the non-relational database through data double-write, thereby meeting the requirements of the C-end user scenario for real-time data response, while ensuring that the latest and accurate data can be obtained in real time, improving the referenceability of the data, and at the same time, through the timely returned records, it is possible to filter out the information content that needs to be displayed in real time when the information is displayed and return it to the customer, with good personalized data reading performance, greatly improving the user experience.
[0040] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that the present invention includes but is not limited to the contents described in the drawings and the above specific embodiments. Any modification that does not deviate from the functional and structural principles of the present invention will be included in the scope of the claims.
Claims
1. A personalized data reading method, characterized in that: The following steps are involved: S1: Obtain a many-to-many first subject table and a second subject table of two different data magnitudes, and a mapping relationship table between records of the first subject table and records of the second subject table; S2: Write the records of the mapping relationship table stored in the relational database into the non-relational database through data double writing synchronization, take the record ID in the first subject table as the subject through the core field of the business scenario, obtain the record ID of the second subject table associated with the record in the mapping relationship table, generate records through integration and store them in the non-relational database; S3: When reading data, the core fields of the business scenario are used to assemble unique field values, query the non-relational database, obtain the corresponding records, parse the records to filter out the information to be displayed, and return it to the user.
2. A personalized data reading method according to claim 1, characterized in that: In step S2, when the records of the mapping relationship table stored in the relational database are synchronously written into the non-relational database through data double writing, the following steps are adopted to process only a single user request when triggering data double writing, and update a single record in the non-relational database.
3. A personalized data reading method according to claim 1, characterized in that: In the step S2, the record ID in the first main table is taken as the main body through the core field of the business scenario, and the record ID of the second main table associated with the record in the mapping relationship table is obtained. When the record is generated by integration and stored in the non-relational database, the following steps are adopted: in the non-relational database, the record ID in the first main table is taken as the main body, and a field unique value is created through the core field of the business scenario when reading data, and the record ID of the second main table associated with the record in the mapping relationship table is obtained and set to a number of elements. The array corresponding to the record is obtained through integration, and the array is stored in the non-relational database to generate a corresponding record.
4. A personalized data reading method according to claim 1, characterized in that: In the step S2, the following steps are also included, generating the derived relationship and propagation path of the record by establishing the bloodline map index of the record, and optimizing the sorting of the records stored in the non-relational database according to the associated information of the record.
5. A personalized data reading method according to claim 4, characterized in that: In step S2, when generating the derived relationship and propagation path of the record by establishing the bloodline map index of the record, the following steps are adopted: A1: Obtain several records stored in a non-relational database, extract key features of several records after data preprocessing, and construct association keys of related records among the several records; A2: According to the association key of the associated record, key features are extracted and aggregated through the records in the first main table, the records in the second main table, and the core fields of the business scenario in turn to obtain the associated information of the record; A3: Establish a bloodline map index of several records through the associated information of the records to obtain the derived relationship and propagation path of the records.
6. A personalized data reading method according to claim 5, characterized in that: In step S2, when optimizing and sorting the records stored in the non-relational database according to the associated information of the records, the following steps are adopted: B1: Divide storage blocks according to the data size in the non-relational database; B2: Calculate the adjacency of the associated records through the associated information of the records, and store the associated records whose adjacency is greater than a preset threshold into the corresponding storage block; B3: In the storage block, the derived relationship and propagation path of the record are obtained, and the comprehensive score of each record is calculated and output after weight distribution. According to the comprehensive scores of the records in the storage block, several records are optimized and sorted.
7. A personalized data reading method according to claim 6, characterized in that: In step B3, the derivative relationship and propagation path of the record are obtained, and the comprehensive score of each record is calculated and output after weight allocation. The following steps are adopted to obtain the derivative relationship and propagation path of the record, and obtain the real-time heat of each record. After weight allocation, the comprehensive score of each record is calculated and output based on the importance of the derivative relationship of the record, the length of the propagation path and the real-time heat value of the record.
8. A personalized data reading method according to claim 1, characterized in that: In step S3, when reading data, the field unique value is assembled through the core field of the business scenario, the non-relational database is queried, the corresponding record is obtained, and the information content to be displayed is screened out by parsing the record. When returning it to the user, the following steps are adopted: the field unique value is assembled through the core field of the business scenario, the non-relational database is queried, and the corresponding record is obtained. After that, the record is parsed to obtain several corresponding records in the second main table, and data is screened in the preset data set to be displayed to obtain the information content to be displayed, and return it to the user.
9. The personalized data reading method according to claim 1, characterized in that: In the step S2, the following steps are also included: C1: When a data mapping relationship between a record in the first main table and a record in the second main table is added, the records defining the newly added data mapping relationship are the first record and the second record respectively; C2: Get the ID of the first record and the ID of the second record, open the synchronization lock, write the associated record of the first record and the second record in the mapping relationship table, generate the unique value of the field in combination with the ID of the first record, query in the non-relational database, get the corresponding record, and after parsing the array, store the ID and related information of the second record in the array, and update the corresponding record; C3: Determine whether the writing is successful. If the writing is unsuccessful, roll back the non-relational database and roll back the relational database. Otherwise, release the synchronization lock and end the adding operation.
10. The personalized data reading method according to claim 1, characterized in that: In the step S2, the following steps are also included: D1: When deleting the data mapping relationship between the record in the first main table and the record in the second main table, define the associated record of the data mapping relationship to be deleted as the first record, open the synchronization lock, and query the mapping relationship table to obtain the second record and the third record associated with the first record; D2: Generate a unique field value based on the ID of the second record and query in the non-relational database to obtain the corresponding record. After parsing the array, delete the ID and related information of the third record in the array, update the corresponding record, and delete the first record in the mapping relationship table. D3: Determine whether the deletion is successful. If the deletion is not successful, roll back the relational database and roll back the non-relational database. Otherwise, release the synchronization lock and end the deletion operation.
Citation Information
Patent Citations
Elasticsearch Search Engine Index Building Method and Device
CN113672627B
Data identification method based on consanguinity association and data identification
CN117688191A
Data statistics method based on large data volume
CN119474176A