Multilayer architecture tracking management platform and data access optimization method thereof

By using a multi-layer architecture and connection pool management mechanism in the tracking management platform, dynamically adjusting the connection channel weights, solving the inefficiency problem caused by frequent database connections, and achieving the stability and efficiency improvement of high concurrent access.

CN119127983APending Publication Date: 2024-12-13BEIJING MINGYA INSURANCE BROKERS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411151921.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

When facing a large number of access requests, the tracking management platform needs to frequently judge and establish database connections, resulting in response delays, task interruptions or paralysis, and inefficient.

Method used

A multi-layer architecture tracking management platform is adopted to manage multiple connection channels through a connection pool, and configure initial weights for them, dynamically adjust the weights to prioritize data retrieval, and optimize data access with the switching mechanism of active and dormant areas.

Benefits of technology

It improves the access efficiency of the tracking management platform, can cope with high concurrent requests, avoid delays and paralysis, and ensures stability and energy consumption management in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127983A_ABST
    Figure CN119127983A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-layer architecture tracking management platform and a data access optimization method thereof, and belongs to the technical field of data access, and the tracking management platform comprises a data access layer which comprises an access module and a connection pool, the access module is used for receiving an access request, the connection pool is internally provided with a plurality of connection channels, the connection channels are configured with initial weights, and the initial weights are used for receiving the access request; the initial weight reflects that before the connection channel executes the access task, the priority of the target data is called from the database, and the target data corresponds to the access request; and the display layer is connected with the data access layer and is used for receiving and displaying the target data output by the data access layer. According to the method and the device, the connection pool is set, the initial weight is set for the connection channel in the connection pool, and the required data is called from the database in sequence according to the priority reflected by the initial weight, so that access delay caused by high concurrency of access is avoided, namely, the method and the device have the effect of improving the access efficiency of the tracking management platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data access technology, and in particular to a multi-layer architecture tracking management platform and a data access optimization method thereof. Background Art

[0002] Tracking management platforms usually trigger to-do items, to-read items, and message notifications based on task rules, so tracking management platforms are often used in large enterprises or organizations to facilitate different users to track the progress of tasks on the tracking management platform.

[0003] There are often multiple databases set up in the tracking management platform. The types of data stored in different databases are different. For example, some databases store project matters, while some databases store task management or business data. Therefore, when the tracking management platform receives multiple access requests, it needs to retrieve the corresponding data from different databases in a targeted manner. However, with the surge in access requests or the long-term busyness of access requests, the tracking management platform not only needs to identify the data requested by the access request, but also needs to determine the connection status between the current tracking management platform and the database where the requested data is located. If the two are not connected, a connection needs to be established, or the connection needs to be converted from one database to another. These operations take time and become more frequent as the number of access requests increases, making it impossible for the tracking management platform to respond to user access requests in a timely manner, resulting in delays, interruptions or paralysis of access tasks, and reduced access efficiency. Summary of the invention

[0004] In order to solve the problem of low access efficiency of the tracking management platform, the present application provides a multi-layer architecture tracking management platform and a data access optimization method thereof.

[0005] In a first aspect of the present application, a multi-layer architecture tracking management platform is provided. The tracking management platform includes: The data access layer includes an access module and a connection pool, wherein the access module is used to receive access requests, and the connection pool is provided with a plurality of connection channels, wherein the connection channels are configured with initial weights, and the initial weights reflect the priority of the connection channels in retrieving target data from the database before executing the retrieval task, and the target data corresponds to the access request; The presentation layer is connected to the data access layer and is used to receive and display the target data output by the data access layer.

[0006] By adopting the above technical solution, a connection pool is first set up, and multiple connection channels are set up in the connection pool and an initial weight is configured for each connection channel, so that when a user has access needs, the connection channel in the connection pool retrieves the data required by the user from the database, without the need to build a new connection on the access end and the database end, and the access efficiency is improved. In addition, when there are multiple users accessing at the same time, the connection channel retrieves the data required by the user from the database in sequence according to the size of the initial weight, thereby ensuring that the tracking management platform can cope with high-concurrency access, avoiding access delays and paralysis, and further ensuring the efficiency of access.

[0007] In a possible implementation, the connection pool includes an active area and a dormant area, the active area is provided with a connection channel in a working state, the dormant area is provided with a connection channel in a dormant state, and the connection channel moves between the active area and the dormant area.

[0008] By adopting the above technical solution, the connection channel can move between the active area and the dormant area to switch between the working state and the dormant state, so that when the access requests increase, the connection channel in the dormant area can be continuously moved to the active area to support the surge in access requests. When the access requests decrease, the connection channel in the active area is moved to the dormant area to reduce the energy consumption of the tracking management platform and ensure the access efficiency of the tracking management platform in any scenario.

[0009] In a possible implementation manner: the connection channel in the active area enters a waiting state after executing the calling task, and when the connection channel does not receive an access request within a preset time period in the waiting state, the connection channel moves to the dormant area.

[0010] By adopting the above technical solution, after executing the retrieval task, the connection channel located in the active area needs to remain in the waiting state for a preset time period. Only when no access request is received within the preset time period, it will be moved to the sleep area. When an access request is received within the preset time period, the retrieval task will be restarted. In this way, when the same data type is frequently requested within a short period of time, the connection channels located in the active area are preferentially reused, so as to save the time spent on moving the connection channels and improve the access efficiency.

[0011] In a possible implementation, a control layer is also included, the control layer is connected to the data access layer, and the control layer is used to monitor and intercept abnormal access requests.

[0012] In a possible implementation: it also includes a service access layer, the service access layer is provided with multiple external interfaces and an internal interface, the external interface is used to support a protocol format, the internal interface is respectively connected to the multiple external interfaces, the internal interface is configured with a protocol conversion model, and the protocol conversion model is used to convert multiple protocol formats into a protocol format supported by the database.

[0013] By adopting the above technical solution, the service access layer receives data in multiple protocol formats, converts them uniformly into the protocol format supported by the database, and then stores them in the database, so as to achieve the purpose of continuously updating and improving the data in the database.

[0014] In a second aspect of the present application, a data access optimization method for a multi-layer architecture tracking management platform is provided. The method is applied to any of the multi-layer architecture tracking management platforms described above, and the method comprises: Receiving an access request and access data, wherein the access data includes a current access volume and a predicted access volume; Determine a target channel according to the access request, where the target channel is one of the connection channels in the connection pool; Adjusting the initial weight of the target channel according to the access data to obtain a real-time weight, wherein the real-time weight is used to reflect the priority of the target channel in retrieving the target data from the database when executing the retrieval task; The order in which the target channel retrieves target data from the database is determined according to the real-time weight, and the target data corresponds to the access request.

[0015] By adopting the above technical solution, when the connection channel executes the retrieval task, it dynamically adjusts the initial weight according to the access data to obtain the real-time weight, and uses the real-time weight as the basis for retrieving the target data from the database. When multiple users access the data at the same time, the connection channel retrieves the data required by the users from the database in sequence according to the size of the real-time weight, thereby ensuring that the tracking management platform can cope with high-concurrency access, avoiding access delays and paralysis, and ensuring the access efficiency of the tracking management platform.

[0016] In a possible implementation: before adjusting the initial weight of the target channel according to the access data to obtain the real-time weight, the method further includes: configuring an initial weight for the target channel; The configuring an initial weight for the target channel includes: Calculating an importance score of the target channel, wherein the importance score reflects the importance of the target data; Counting the usage frequency of the target channel; Calculate the product of the importance score and the usage frequency to obtain a comprehensive score; The ratio of the comprehensive score to the total score is calculated to obtain an initial weight, and the total score is the sum of the comprehensive scores of all connection channels in the activity area.

[0017] By adopting the above technical solution, the importance of the target data retrieved by the target channel and the usage frequency of the target channel are used as the basis for configuring the initial weights to ensure the accuracy of the obtained initial weights.

[0018] In a possible implementation manner, adjusting the initial weight of the target channel according to the access data to obtain the real-time weight includes: Determine whether the connection channels in the activity area meet the following conditions: 总 ≤M 阈 And m i ≤m 阈 , where M 总 is the number of connection channels in the activity area, M 阈 is the threshold of the number of connection channels in the active area, m i Refers to the number of all connection channels of the i-th data type, m 阈 Refers to the maximum number of connection channels that can be called for any data type; If yes, when the current page views are greater than the predicted page views, the difference between the current page views and the predicted page views is calculated to obtain a first difference, and the first difference is multiplied by the initial weight to obtain a real-time weight; If not, calculate the difference between the current number of visits and the predicted number of visits to obtain a first difference, the difference between the threshold number of connection channels in the active area and the number of connection channels to obtain a second difference, calculate the sum of the first difference and the second difference, and multiply the sum and the initial weight to obtain the real-time weight.

[0019] By adopting the above technical solution, in the process of executing the call task of the connection channel, the initial weight of the connection channel is dynamically adjusted to obtain the real-time weight. When adjusting, first determine M 总 and M 阈 The size relationship between them and m i and m 阈 The size relationship between them is 总 ≤M 阈 And m i ≤m 阈When , it means that the number of connection channels in the active area is small and the number of connection channels for retrieving each type of data is small. If you still blindly control the connection channels to retrieve data in the order of priority, it may lead to a decrease in access efficiency. Therefore, it is necessary to judge the current access volume and the predicted access volume. When the current access volume is greater than the predicted access volume, it means that the actual increase in access requests is greater than the predicted access requests. At this time, it is necessary to calculate the increase in the actual increase in access requests compared to the predicted access requests, and use this increase as the basis for adjusting the initial weight. The greater the difference between the two, the greater the difference between the real-time weight obtained by multiplying the difference between the two and the initial weight and the initial weight, so that it is easier to determine the final priority of retrieving data based on the real-time weight. On the contrary, when the connection channels in the active area do not meet M 总 ≤M 阈 or m i ≤m 阈 When M is too large, it means that there are too many connection channels in the active area or too many connection channels for accessing a certain type of data. In this case, we need to calculate not only the actual increase in access requests compared to the predicted increase in access requests, but also the M 阈 and M 总 The difference between the two is taken as the basis for adjusting the initial weight. When the sum of the two differences is larger, the difference between the real-time weight obtained by multiplying the sum and the initial weight is larger, so it is convenient to determine the final priority of retrieving data based on the real-time weight in the future, so as to distinguish the real-time weights of the connection channels in different scenarios, so as to adaptively adjust the priority of the connection channel to retrieve data, so as to more flexibly retrieve the data required by the user from the database.

[0020] In a possible implementation, the method further includes: If the connection channels in the activity area satisfy M 总 ≤M 阈 And m i ≤m 阈 , and when the current number of visits is less than or equal to the predicted number of visits, it includes: adjusting the initial weights of the connection channels in the active area to the same value to obtain the real-time weight.

[0021] By adopting the above technical solution, when the number of connection channels in the active area is small and the number of connection channels for retrieving each type of data is small, and the current access volume is less than or equal to the predicted access volume, the initial weights of the connection channels in the active area are adjusted to the same value, that is, the real-time weights of each connection channel in the active area are the same, and there is no restriction on the retrieval priority of the connection channels in the active area, so that multiple connection channels can retrieve corresponding data from the database at the same time, thereby ensuring the access efficiency of the tracking management platform.

[0022] In a possible implementation manner, determining the order in which the target channel retrieves the target data from the database according to the real-time weight includes: Determine whether the connection channels in the activity area meet the following conditions: n=1 or d≤D, where n is the number of connection channels with different real-time weight values, d is the difference between the maximum real-time weight and the minimum real-time weight, and D is the preset difference threshold; If so, adjusting the real-time weight of each of the connection channels in the activity area to the maximum real-time weight, the target channel belongs to one of the multiple connection channels, and the target channel and other connection channels synchronously retrieve target data from the database; If not, multiple data sets are obtained by classifying the data types retrieved by the connection channels. In each of the data sets, the priority of the connection channel in retrieving data from the database is set in descending order of real-time weight, and the target channel is a connection channel in one of the data sets.

[0023] By adopting the above technical solution, when n=1, it means that the number of connection channels in the active area is small and the number of connection channels for retrieving each type of data is small, and the current access volume is less than or equal to the predicted access volume, so the real-time weight of the connection channel in the active area is adjusted to the maximum real-time weight, so that multiple connection channels can retrieve the corresponding data from the database at the same time, ensuring the access efficiency of the tracking management platform. When d≤D, it means that the current access volume does not exceed the predicted access volume too much, so within the control range, the real-time weight of the connection channel in the active area is also adjusted to the maximum real-time weight, so that multiple connection channels can retrieve the corresponding data from the database at the same time, ensuring the access efficiency of the tracking management platform. When the connection channel does not meet n=1 or d≤D, first divide multiple connection channels according to the type of data retrieved to obtain a data set, and then control the order of each connection channel in each data set to retrieve data in the order of real-time weight from large to small, so as to realize the simultaneous execution of the retrieval task for multiple data sets, but the connection channels in each data set have priorities to ensure the access efficiency of the tracking management platform.

[0024] In summary, the present application includes at least one of the following beneficial technical effects: First, a connection pool is set up, in which multiple connection channels are set up and each connection channel is configured with an initial weight. Then, in the process of executing the call task of the connection channel, the initial weight of the connection channel is dynamically adjusted: First, determine M 总 and M 阈 The size relationship between them and m i and m 阈 The size relationship between them is 总 ≤M阈 And m i ≤m 阈 , it means that the number of connection channels in the active area is small and the number of connection channels for accessing each type of data is small. At this time, continue to judge the current access volume and the predicted access volume. When the current access volume is greater than the predicted access volume, calculate the actual increase in access requests compared to the predicted access requests, and use this increase as the basis for adjusting the initial weight; when the current access volume is less than or equal to the predicted access volume, adjust the initial weights of the connection channels in the active area to the same value. On the contrary, when the connection channels in the active area do not meet M 总 ≤M 阈 or m i ≤m 阈 When M is too large, it means that there are too many connection channels in the active area or too many connection channels for accessing a certain type of data. In this case, we need to calculate not only the actual increase in access requests compared to the predicted increase in access requests, but also the M 阈 and M 总 The difference between the two is used as the basis for adjusting the initial weight. Finally, the number of connection channels with different real-time weight values ​​and the difference between the maximum real-time weight and the minimum real-time weight are used to distinguish the connection channels in different scenarios, so as to adaptively adjust the priority of the connection channel to retrieve data, thereby ensuring the access efficiency of the tracking management platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a block diagram of a multi-layer architecture tracking management platform of an embodiment of the present application.

[0026] Figure 2 It is a flow chart of a data access optimization method of a multi-layer architecture tracking management platform according to an embodiment of the present application.

[0027] Explanation of the accompanying drawings: 1. Data access layer; 11. Access module; 12. Connection pool; 2. Control layer; 3. Presentation layer; 4. Service access layer; 5. Database. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] In large enterprises or organizations, there are often multiple users accessing enterprise-related data at the same time. In order to cope with such high-concurrency access, this application proposes a multi-layer architecture tracking management platform. Figure 1 As shown, the tracking management platform includes a data access layer 1, a control layer 2, a presentation layer 3 and a service access layer 4.

[0030] Among them, the data access layer 1 includes an access module 11 and a connection pool 12, and the access module 11 and the connection pool 12 are both virtual applications. The connection pool 12 includes an active area and a dormant area, wherein a connection channel in a working state is arranged in the active area, and a connection channel in a dormant state is arranged in the dormant area. The access module 11 is used to receive an access request input by a user, and bind a connection channel in the active area according to the access request, so as to retrieve the data required by the user from the database 5 according to the bound connection channel, that is, the database 5 stores data related to the enterprise, such as project matters, task management, business data, etc. In a specific example, multiple data of each type are placed in the same database 5, and the data in each database 5 are uniformly accessed by the connection channels in the active area.

[0031] The control layer 2 is connected to the data access layer 1. The control layer 2 is used to verify the access request and can mark the access request as an abnormal access request and perform an interception operation when the access request verification fails.

[0032] The presentation layer 3 is connected to the data access layer 1. There are multiple components in the presentation layer 3. The display effects obtained by combining different components are different. For example, some components can render the displayed pictures, while some components can dynamically display the pictures. In a specific example, the presentation layer 3 can dynamically load different components to display the data output by the data access layer 1 according to the roles and permissions of different users, thereby achieving a more flexible front-end page layout.

[0033] The service access layer 4 is provided with a plurality of external interfaces and an internal interface, wherein an external interface supports a protocol format, and the protocol formats supported by the plurality of external interfaces are different from each other, and the protocols supported by each of them can be customized, so that the plurality of external interfaces can support the input of data to be stored in a plurality of protocol formats. The internal interface is configured with a protocol conversion model, such as a rule-based conversion model, a data mapping-based conversion model, and a deep learning-based conversion model, wherein the rule-based conversion model is to convert the protocol data format by building a rule engine and performing predefined rules. The data mapping-based conversion model is to complete the conversion by developing a mapping tool and mapping the source protocol to the protocol supported by the database 5. The deep learning-based conversion model is to use a deep learning model, such as a recurrent neural network or a converter model, to learn and perform protocol conversion tasks. Therefore, the internal interface can use the protocol conversion model to convert the data to be stored imported by the plurality of external interfaces into a unified format, and then store it in the database 5, so as to continuously update and improve the data in the database 5.

[0034] Specifically, in order to enable the multi-layer architecture tracking management platform to cope with high concurrent access, the present application also proposes a data access optimization method for the multi-layer architecture tracking management platform. Figure 2 As shown, the main process of the data access optimization method is described as follows.

[0035] Step S100: receiving an access request and access data, where the access data includes a current access volume and a predicted access volume.

[0036] Before the user accesses the database 5, the user's identity information is first verified, that is, the user enters identity information such as name, age, department and position level. In a specific example, a blacklist is set in advance, and the blacklist stores users who do not have the authority to access the database 5. Therefore, after obtaining the user's identity information, the blacklist is retrieved and compared one by one. If the blacklist does not contain the identity information related to the user, it means that the user has the authority to access the database 5, which also means that the user's identity information has been verified.

[0037] Based on the user who has passed the identity verification, the access request input by the user to the data access layer 1 is received. The access request contains the data content that the user needs to access. For example, if the user needs to obtain the progress of project A, the access request is "query the progress of project A". It should be noted that the access request can be in the format of text, audio, picture, etc.

[0038] After receiving the access request input by the user, the access data is retrieved. Specifically, the access data includes the current access volume and the predicted access volume. The current access volume can be determined by recording the access requests currently received by the access module 11, that is, one access request is regarded as a access volume. The predicted access volume can be data input by an external server, or it can be calculated by a calculation program built into the access module 11. Specifically, the calculation process of the predicted access volume is as follows: retrieve the historical access requests of the access module 11, calculate the access volume of each time period according to the historical access requests, for example, take 24 hours as a cycle, calculate the average access volume of each time period in each cycle, and take the average access volume as the predicted access volume of the time period. In a specific example, one hour is taken as a time period, and in other examples, half an hour or other shorter durations can be taken as a time period.

[0039] Therefore, after receiving the current number of visits, the predicted number of visits in the same time period as the current moment is retrieved, and the two are combined into the visit data.

[0040] Step S200 , determining a target channel according to the access request, where the target channel is one of the connection channels in the connection pool 12 .

[0041] In this example, in order to avoid frequent switching of the connection channel between different databases 5, each connection channel is fixed to retrieve one type of data. However, each connection channel has the possibility of switching between the working state and the dormant state, that is, the connection channel moves between the active area and the dormant area. In a specific example, when the connection channel moves from the dormant area to the active area and executes the retrieval task, the connection channel still stays in the active area. At this time, the connection channel is in a waiting state. After the connection channel maintains the waiting state for a preset period of time, if it is not started within the preset period of time, that is, no access request is received to execute the retrieval task, it will move to the dormant area again, so as to realize the reuse of the connection channel. For the case of frequent requests to the same database 5 in a short period of time, the connection channel located in the active area is preferentially reused to reduce the overhead of the movement of the connection channel.

[0042] Therefore, after receiving the access request, it is determined whether there is a connection channel in the active area that specifically retrieves the data corresponding to the access request from the database 5, and whether these connection channels are in a waiting state. If there is a connection channel in a waiting state, the connection channel is used as the target channel, and if multiple connection channels are in a waiting state at the same time, the connection channel with the longest waiting time is selected from the connection channels in the waiting state as the target channel. If there is no connection channel in the active area that specifically retrieves the data corresponding to the access request from the database 5, a connection channel that specifically retrieves the data corresponding to the access request from the database 5 is selected from the dormant area, and the selected connection channel is first moved to the active area and then marked as the target channel.

[0043] In actual applications, although the user's identity information has been verified, so that the user has the right to access the database 5, some data in the database 5 has high confidentiality requirements, so for the access request input by the user, it is necessary to determine whether the user has the right to access the data corresponding to the access request. Specifically, according to the department and position level of the user, it is determined whether the user has the right to access the data corresponding to the access request. In other examples, other verification methods can also be used to determine whether the user has the right to access the data corresponding to the access request. Based on the fact that the user does not have the right to access the data corresponding to the access request, the control layer 2 marks the access request as an abnormal access request and intercepts it.

[0044] Step S300: adjusting the initial weight of the target channel according to the access data to obtain the real-time weight.

[0045] For the connection channels in the activity area, initial weights are configured, and the initial weights reflect the priority of the connection channels in retrieving data from the database 5 before executing the retrieval task. In a specific example, the initial weights are configured for the connection channels according to the type of data retrieved by the connection channels and the frequency of use of the connection channels. The specific configuration process is shown in steps S311 to S313.

[0046] Step S311, determine the importance score of the data. First, classify the data according to its importance. For example, it can be divided into three levels of "high", "medium" and "low", or a more detailed grading system can be used, such as 1-10 points. Then, assign a specific score to each level. For example, the "high" level may correspond to 10 points, the "medium" level corresponds to 5 points, and the "low" level corresponds to 1 point. If a more detailed grading system is used, each level corresponds to a different score. Because each connection channel fixedly retrieves one type of data, the importance score of the data is also considered to be the importance score of the connection channel.

[0047] Step S312: Count the usage frequency of the connection channel. First, record the number of times each connection channel is used within a period of time in the activity area, and then calculate the average usage frequency of each connection channel based on the collected data. For example, the number of times used per month or per week can be counted, and then divided by the corresponding time length to obtain the average usage frequency, and the average usage frequency is used as the usage frequency of the connection channel within the period of time.

[0048] Step S313: Calculate the initial weight based on the importance score and usage frequency of the connection channel. First, multiply the importance score of each connection channel by the usage frequency to get a comprehensive score, and then add the comprehensive scores of all connection channels in the activity area to get the total score. Then calculate the proportion of the comprehensive score of each connection channel to the total score, and use the proportion as the initial weight.

[0049] The initial weight is only a pre-sorting of the connection channels before executing the retrieval task. In the actual retrieval process, the initial weight needs to be dynamically adjusted to obtain the real-time weight. Finally, the connection channels are sorted in descending order of the real-time weight. The higher the sorting, the higher the priority of retrieving data from the database 5. Therefore, after the initial weight of each connection channel is obtained through the above steps S311 to S313, the process of steps S321 to S323 is continued to be executed to obtain the real-time weight of each connection channel.

[0050] Step S321: Determine whether the connection channels in the activity area meet the following conditions: 总 ≤M 阈 And m i ≤m 阈 , where M 总 is the number of all connection channels in the active area, M 阈 is the threshold of the number of connection channels in the preset activity area, which is the maximum number of connection channels that the activity area can bear, m i Refers to the number of all connection channels dedicated to calling the i-th data type, m 阈 It refers to the maximum number of connection channels that can be called for any data type, which is also preset in advance.

[0051] Step S322: If yes, continue to determine whether the access data satisfies: F i ≤F r , F i is the current number of visits, F r The predicted number of visits; If so, the initial weights of the connection channels in the activity area are adjusted to the same value, for example, all are adjusted to the preset maximum weight. At this time, the target channel is also located in the activity area, so the initial weight will also be adjusted to the maximum weight, that is, the real-time weight is the maximum weight. Therefore, all the connection channels in the activity area retrieve data from the database 5 at the same time without priority, so as to ensure the timeliness of the retrieved data.

[0052] If not, calculate the first difference, which is represented by F1, and F1=F i -F r Then, the real-time weight is obtained by multiplying the first difference and the initial weight.

[0053] Step S323: Otherwise, the connection channel in the active area does not satisfy M 总 ≤M 阈 or m i ≤m 阈 When the first difference and the second difference are calculated, the first difference and the second difference are represented by F1 and F2 respectively, where F1=F i -F r , F2=M 阈 -M 总 Then, the sum of the first difference and the second difference is calculated, and the sum is used as the difference total score. Finally, the difference total score is multiplied by the initial weight to obtain the real-time weight.

[0054] It should be noted that the real-time weight is also used to reflect the priority of the connection channel in retrieving target data from the database 5, and the larger the real-time weight is, the higher the priority is. When there is no real-time weight, the connection channel retrieves data in sequence according to the order of the initial weight. When there is a real-time weight, the real-time weight is used as the basis for the priority of retrieving data.

[0055] After the connection channels located in the active area go through the process from step S321 to step S323, a real-time weight corresponding to each connection channel will be obtained, and then the process goes to step S400.

[0056] Step S400: Determine the order in which the target channel retrieves the target data from the database 5 according to the real-time weight, and the target data corresponds to the access request.

[0057] Determine whether the connection channels in the activity area meet the following conditions: n=1 or d≤D, where n is the number of connection channels with different real-time weight values, d is the difference between the maximum real-time weight and the minimum real-time weight, and D is the preset difference threshold; If so, the real-time weight of each connection channel in the active area is adjusted to the maximum real-time weight, for example, all are "1" or "100%". At this time, all connection channels retrieve the required data from database 5 together. The target channel at this time belongs to one of the multiple connection channels, so the target channel and other connection channels synchronously retrieve the target data from database 5.

[0058] Otherwise, the connection channels are classified according to the data types retrieved by the connection channels, and the connection channels that retrieve the same data types are regarded as a data set. Then, for each data set, the connection channels are sorted in descending order of real-time weight, and the higher the ranking, the higher the priority of retrieving data from the database 5.

[0059] It should be noted that, when calculating the real-time weight of a connection channel that is executing a call task, even if the real-time weight of the connection channel is ranked low, the connection channel that is executing the call task will not be interrupted, but will only be affected when the next call task is started.

[0060] In summary, the implementation principle of the data access optimization method of a multi-layer architecture tracking management platform in the embodiment of the present application is as follows: first, a connection pool 12 is constructed, and the connection pool 12 is divided into an active area and a dormant area. The connection channels in the active area respond to high-concurrency access. When the number of connection channels in the active area is insufficient, the connection channels in the dormant area are moved to the active area to meet high-concurrency access, reduce the time for rebuilding the connection channels, and improve access efficiency. In addition, for the connection channels in the active area, an initial weight is first configured for each connection channel according to the importance of the data retrieved by the connection channel and the frequency of use of the connection channel, and then the initial weight is adaptively adjusted according to the current access volume and the predicted access volume to obtain the real-time weight. Finally, the size of the real-time weight is used as the basis for the order in which the connection channel retrieves data from the database 5. This ensures that the connection channel has normal access, and the connection channel with a higher priority can access the database 5 first, so as to achieve the purpose of improving the stability and efficiency of data access of the tracking management platform.

[0061] In order to better execute the program of the above method, the present application also provides a data access optimization device for a multi-layer architecture tracking management platform, which includes a memory and a processor.

[0062] The memory may be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the data access optimization method of the multi-layer architecture tracking management platform, etc.; the data storage area may store data involved in the data access optimization method of the multi-layer architecture tracking management platform, etc.

[0063] The processor may include one or more processing cores. The processor calls the data stored in the memory by running or executing the instructions, programs, code sets or instruction sets stored in the memory, performs various functions of the present application and processes data. The processor may be at least one of a special purpose integrated circuit, a digital signal processor, a digital signal processing device, a programmable logic device, a field programmable gate array, a central processing unit, a controller, a microcontroller and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiments of the present application are not specifically limited.

[0064] The present application also provides a computer-readable storage medium, for example, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes. The computer-readable storage medium stores a computer program that can be loaded by a processor and execute the data access optimization method of the multi-layer architecture tracking management platform.

[0065] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present application (but not limited to) by each other to form a technical solution.

Claims

1. A multi-layer architecture tracking management platform, characterized in that: include: A data access layer (1) comprises an access module (11) and a connection pool (12), wherein the access module (11) is used to receive access requests, and the connection pool (12) is provided with a plurality of connection channels, wherein the connection channels are configured with initial weights, and the initial weights reflect the priority of the connection channels in retrieving target data from a database (5) before executing a retrieval task, wherein the target data corresponds to the access request; The presentation layer (3) is connected to the data access layer (1) and is used to receive and present the target data output by the data access layer (1).

2. The multi-layer architecture tracking management platform according to claim 1, characterized in that: The connection pool (12) comprises an active area and a dormant area, wherein a connection channel in a working state is arranged in the active area, and a connection channel in a dormant state is arranged in the dormant area, and the connection channel moves between the active area and the dormant area.

3. The multi-layer architecture tracking management platform according to claim 2, characterized in that: The connection channel in the active area enters a waiting state after executing the calling task, and moves to the dormant area when the connection channel does not receive an access request within a preset time period in the waiting state.

4. The multi-layer architecture tracking management platform according to claim 1, characterized in that: It also comprises a control layer (2), wherein the control layer (2) is connected to the data access layer (1), and the control layer (2) is used to monitor and intercept abnormal access requests.

5. The multi-layer architecture tracking management platform according to claim 1, characterized in that: The invention also comprises a service access layer (4), wherein the service access layer (4) is provided with a plurality of external interfaces and an internal interface, wherein the external interface is used to support a protocol format, the internal interface is respectively connected to the plurality of external interfaces, and the internal interface is configured with a protocol conversion model, wherein the protocol conversion model is used to convert the plurality of protocol formats into a protocol format supported by the database (5).

6. A data access optimization method for a multi-layer architecture tracking management platform, applied to the tracking management platform as claimed in any one of claims 1 to 5, characterized in that: include: Receiving an access request and access data, wherein the access data includes a current access volume and a predicted access volume; Determining a target channel according to the access request, the target channel being one of the connection channels in the connection pool (12); adjusting the initial weight of the target channel according to the access data to obtain a real-time weight, wherein the real-time weight is used to reflect the priority of the target channel in retrieving the target data from the database (5) when executing the retrieval task; The order in which the target channel retrieves target data from the database (5) is determined according to the real-time weight, and the target data corresponds to the access request.

7. The data access optimization method for the multi-layer architecture tracking management platform according to claim 6, characterized in that: Before adjusting the initial weight of the target channel according to the access data to obtain the real-time weight, the method further includes: configuring an initial weight for the target channel; The configuring an initial weight for the target channel includes: Calculating an importance score of the target channel, wherein the importance score reflects the importance of the target data; Counting the usage frequency of the target channel; Calculate the product of the importance score and the usage frequency to obtain a comprehensive score; The ratio of the comprehensive score to the total score is calculated to obtain an initial weight, and the total score is the sum of the comprehensive scores of all connection channels in the activity area.

8. The data access optimization method for the multi-layer architecture tracking management platform according to claim 7, characterized in that: The step of adjusting the initial weight of the target channel according to the access data to obtain a real-time weight includes: Determine whether the connection channels in the activity area meet the following conditions: 总 ≤M 阈 And m i ≤m 阈 , where M 总 is the number of connection channels in the activity area, M 阈 is the threshold of the number of connection channels in the active area, m i Refers to the number of all connection channels of the i-th data type, m 阈 Refers to the maximum number of connection channels that can be called for any data type; If yes, when the current page views are greater than the predicted page views, the difference between the current page views and the predicted page views is calculated to obtain a first difference, and the first difference is multiplied by the initial weight to obtain a real-time weight; If not, calculate the difference between the current number of visits and the predicted number of visits to obtain a first difference, the difference between the threshold number of connection channels in the active area and the number of connection channels to obtain a second difference, calculate the sum of the first difference and the second difference, and multiply the sum and the initial weight to obtain the real-time weight.

9. The data access optimization method for the multi-layer architecture tracking management platform according to claim 8, characterized in that: The method further comprises: If the connection channels in the activity area satisfy M 总 ≤M 阈 And m i ≤m 阈 , and when the current number of visits is less than or equal to the predicted number of visits, it includes: adjusting the initial weights of the connection channels in the active area to the same value to obtain the real-time weight.

10. The data access optimization method of the multi-layer architecture tracking management platform according to claim 6, characterized in that: The step of determining the order in which the target channel retrieves the target data from the database (5) according to the real-time weight comprises: Determine whether the connection channels in the activity area meet the following conditions: n=1 or d≤D, where n is the number of connection channels with different real-time weight values, d is the difference between the maximum real-time weight and the minimum real-time weight, and D is the preset difference threshold; If so, the real-time weight of each of the connection channels in the activity area is adjusted to the maximum real-time weight, the target channel belongs to one of the multiple connection channels, and the target channel and other connection channels synchronously retrieve target data from the database (5); If not, the data types retrieved by the connection channels are classified to obtain multiple data sets. In each of the data sets, the priority of the connection channels in retrieving data from the database (5) is set in descending order of real-time weight, and the target channel is a connection channel in one of the data sets.