Memory data scheduling method and device, computer equipment and storage medium
By receiving and sorting data call requests, and reading data from the memory bank based on priority scheduling, the problem of low processing efficiency of memory systems in the prior art is solved, and more flexible and efficient data processing is achieved.
Patent Information
- Application Number
- CN202410970046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-01
AI Technical Summary
Existing memory systems lack flexibility in processing user requests and cannot perform targeted processing for different transactions, resulting in low processing efficiency.
By receiving the call request from the data caller, the target call priority is determined based on the call information, and it is added to the scheduling queue. The target data is read from the memory bank according to the priority scheduling and feedback to the data caller.
It improves the efficiency and flexibility of memory data processing, can adjust the execution order of call requests according to different user needs, and improves the system's response capabilities and resource utilization.
Smart Images

Figure CN118885236A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a memory data scheduling method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of computer technology, more and more electronic products appear in all aspects of people's lives. A large amount of data can be stored through the memory system inside electronic products.
[0003] Currently, requests sent by users are implemented by calling the data in the memory system one by one.
[0004] However, user requests have different calling requirements, and the method of calling one by one is not flexible enough and cannot provide targeted processing for different transactions. Summary of the invention
[0005] Based on this, it is necessary to provide a memory data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the processing efficiency and flexibility of memory data in response to the above technical problems.
[0006] In a first aspect, the present application provides a memory data scheduling method, the method comprising:
[0007] Receiving a call request sent by a data caller, wherein the call request carries call information;
[0008] Determining a target call priority based on the call information;
[0009] Based on the target call priority, adding the call request to a scheduling queue;
[0010] When the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, the target data is read from the memory bank corresponding to the call request;
[0011] The target data is fed back to the data caller.
[0012] In one embodiment, adding the call request to the scheduling queue based on the target call priority includes:
[0013] Compare the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result;
[0014] The target position of the call request in the scheduling queue is determined based on the comparison result, and the call request is added to the target position.
[0015] In one embodiment, the call information includes at least one of the type of the data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; and determining the target call priority based on the call information includes:
[0016] Determine the evaluation index value corresponding to each of the call information;
[0017] The target calling priority is obtained by weighting the evaluation index values.
[0018] In one embodiment, the step of determining the weight of the target data includes:
[0019] Obtaining a weight of each data stored in each of the memory banks, wherein the weight of each data stored in each of the memory banks is obtained based on a load of a server corresponding to the memory card when the data is stored;
[0020] Based on the weight of each data stored in each of the memory banks, the weight corresponding to the target data is determined.
[0021] In one embodiment, when the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, reading the target data from the memory bank corresponding to the call request includes:
[0022] When the call request is dispatched according to the dispatch order of each call request in the dispatch queue, determining the memory bank corresponding to the call request;
[0023] The calling request is sent to the server corresponding to the memory bank, and the memory bank is queried through the server corresponding to the memory card to obtain the target data corresponding to the calling request.
[0024] In one embodiment, before determining the memory bank corresponding to the call request, the method further includes:
[0025] Obtaining load information of the server corresponding to each of the memory cards;
[0026] When it is determined that the server is abnormal based on the load information, controlling the abnormal server to stop running;
[0027] When it is determined based on the load information that the load of the server is greater than or equal to a load threshold, the capacity of the server whose load is greater than or equal to the load threshold is expanded.
[0028] In one embodiment, when the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, reading the target data from the memory bank corresponding to the call request includes:
[0029] When the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, query whether there is target data corresponding to the call request in the local cache;
[0030] When the target data corresponding to the call request does not exist in the local cache, reading the target data from the memory bank corresponding to the call request;
[0031] When the local cache contains target data corresponding to the call request, the corresponding target data is obtained from the local cache.
[0032] In a second aspect, the present application further provides a memory data scheduling device, the device comprising:
[0033] A receiving module, used to receive a call request sent by a data caller, wherein the call request carries call information;
[0034] A call priority determination module, used to determine a target call priority based on the call information;
[0035] An allocation module, configured to add the call request to a scheduling queue based on the target call priority;
[0036] A data reading module, configured to read target data from a memory bank corresponding to a calling request when the calling request is scheduled according to the scheduling order of the calling requests in the scheduling queue;
[0037] A feedback module is used to feed back the target data to the data caller.
[0038] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above-mentioned embodiments when executing the computer program.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method in any one of the above-mentioned embodiments.
[0040] The above-mentioned memory data processing method, device, computer equipment and storage medium receive a call request sent by a data caller, wherein the call request carries call information; determines a target call priority based on the call information; adds the call request to a scheduling queue based on the target call priority; when the call request is scheduled according to the scheduling order of each call request in the scheduling queue, reads the target data from the memory library corresponding to the call request; and feeds back the target data to the data caller, so that each call request in the scheduling queue is sorted according to the target call priority, and the execution order of the call requests can be adjusted according to different user needs, thereby improving the efficiency and flexibility of memory data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 An application environment diagram of a memory data processing method in one embodiment;
[0043] Figure 2 A schematic diagram of a flow chart of a method for processing memory data in one embodiment;
[0044] Figure 3 is a structural block diagram of a memory data processing device in one embodiment;
[0045] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the call requests involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0049] The memory data scheduling method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the data caller 102 communicates with the memory scheduler 104 through the network. The data caller 102 sends a call request, and the memory scheduler 104 obtains the call request sent by the data caller. The memory scheduler 104 obtains the call request in a manner including but not limited to: data packet capture and data crawler, etc., which is not limited in the embodiment of the present application. The memory scheduler can be to improve memory utilization and system throughput, and can suspend processes that are temporarily unable to run. When the running conditions are met and the memory is free, these processes will be called back and hung on the ready queue to wait for scheduling. The memory scheduler 104 determines the target call priority based on the call information; based on the target call priority, the call request is added to the scheduling queue; when the call request is scheduled according to the scheduling order of each call request in the scheduling queue, the target data is read from the memory library corresponding to the call request; and the target data is fed back to the data caller. In this way, the call requests in the scheduling queue are sorted according to the target call priority, and the execution order of the call request can be adjusted according to different user needs, thereby improving the efficiency and flexibility of memory data processing.
[0050] The data caller 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.
[0051] In an exemplary embodiment, Figure 2 As shown, a memory data scheduling method is provided, which is applied to Figure 1The memory scheduler in FIG. 1 is taken as an example to illustrate, including the following steps 202 to 210. Among them:
[0052] S202: Receive a call request sent by a data caller, where the call request carries call information.
[0053] The data caller may be a party that sends a call request, and the data caller may be a user. The call request may be a data acquisition request, and the data may be power consumption data, meteorological data, environmental data, temperature data, humidity data, voltage data, current data, power data, etc.
[0054] Specifically, the data caller sends a call request, and the memory scheduler obtains the call request sent by the data caller. The memory scheduler obtains the call request in a manner including, but not limited to, data packet capture and data crawler, etc., which is not limited in the embodiments of the present application. The memory scheduler can suspend processes that are temporarily unable to run in order to improve memory utilization and system throughput. When the running conditions are met and the memory is free, these processes will be called back and hung on the ready queue to wait for scheduling modules.
[0055] In one example, data caller 1 sends call request 1, and the memory scheduler obtains the call request 1 sent by data caller 1 through data packet capture.
[0056] S204: Determine the target calling priority based on the calling information.
[0057] The target call priority is used to determine the processing priority of the call request. Specifically, the memory scheduler obtains the call request and determines the target call priority of each call request according to different call requests. One call request corresponds to one target call priority.
[0058] In one example, the memory scheduler obtains call request 1 and call request 2, determines that the target call priority of call request 1 is 0.1, and determines that the target call priority of call request 2 is 0.3.
[0059] S206: Based on the target call priority, the call request is added to the scheduling queue.
[0060] Among them, the dispatch queue can be a queue for storing call requests. A queue is a linear table with restricted operations and can be stored in the form of a database table. The special feature is that it only allows deletion operations at the front end of the table and insertion operations at the rear end of the table. The end where the insertion operation is performed is called the tail end, and the end where the deletion operation is performed is called the head end. Each time, the current call request to be executed is obtained from the head end of the dispatch queue. Each time, the call request is added to the dispatch queue from the tail end of the dispatch queue.
[0061] Specifically, according to the permission data of the call request and the value of the target call priority, the call request is added to the scheduling queue.
[0062] In one example, the target call priority of call request 1 is 0.1, and the target call priority of call request 2 is determined to be 0.3. After call request 2 is added to the scheduling queue, call request 1 is added to the scheduling queue.
[0063] S208: When a call request is dispatched according to the dispatch order of each call request in the dispatch queue, the target data is read from the memory bank corresponding to the call request.
[0064] The memory library may be data in a database, may be at least one data table in the database, or may be at least one row of data in a data table.
[0065] Specifically, according to the scheduling order of the call requests in the scheduling queue, the memory scheduler schedules the call requests one by one. When the call request is scheduled according to the scheduling order of the scheduling queue, the data corresponding to the call request is obtained from the memory library corresponding to the call request, and the acquisition method includes but is not limited to: neural network, search algorithm, string matching algorithm or natural language processing, etc., which is not limited in the embodiment of the present application.
[0066] In one example, there are call request 2 and call request 1 in the dispatch queue, call request 2 is obtained from the head of the dispatch queue, and the corresponding data is obtained from the memory bank corresponding to call request 2 through a string matching algorithm. The memory bank corresponding to call request 2 is data table 2.
[0067] S210: Feedback the target data to the data caller.
[0068] Specifically, the data corresponding to the call request is fed back to the data caller. The feedback method includes but is not limited to: email feedback, information feedback, pop-up window feedback or file feedback, etc., which is not limited in the embodiment of the present application.
[0069] In one example, call request 2 is obtained from the head of the dispatch queue, corresponding data is obtained from the memory bank corresponding to call request 2, and the data corresponding to call request 2 is fed back through a pop-up window.
[0070] Traditional memory systems use scheduling policies based on memory middleware when calling, which basically include algorithms such as Least Recently Used (LRU) and Least Frequently Used (LFU). Data between systems is exchanged through interfaces, and memory usage is subject to resource constraints. To ensure that requests from users with higher permissions can receive more resources, this application expands the calling algorithm based on the characteristics of memory middleware. At runtime, based on the user permissions configured in the business system, data requests from users with higher permissions are given priority.
[0071] The technical solution of the embodiment of the present application adds the call request to the scheduling queue according to the permission data of the call request, obtains the corresponding data from the memory library corresponding to the call request, feeds back the data corresponding to the call request to the data caller, sorts the call requests according to different target call priorities, and can adjust the execution order of the call requests according to different user needs, thereby improving the flexibility of memory data processing.
[0072] The above-mentioned memory data processing method receives a call request sent by a data caller, and the call request carries call information; determines a target call priority based on the call information; adds the call request to a scheduling queue based on the target call priority; when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, the target data is read from a memory library corresponding to the call request; and the target data is fed back to the data caller, so that each call request in the scheduling queue is sorted according to the target call priority, and the execution order of the call requests can be adjusted according to different user needs, thereby improving the efficiency and flexibility of memory data processing.
[0073] In one of the optional embodiments, based on the target call priority, a call request is added to a scheduling queue, including: comparing the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result; determining a target position of the call request in the scheduling queue based on the comparison result, and adding the call request to the target position.
[0074] The comparison result may be the result of sorting the call requests according to the numerical values of the permission data.
[0075] Specifically, according to the call priority of the call request, the weights of the call requests in the scheduling queue are compared, and the position relationship between the call requests in the scheduling queue is determined according to the comparison result.
[0076] In one example, the memory scheduler obtains call request 1 and call request 2, determines that the call priority of call request 1 is 0.1, and determines that the call priority of call request 2 is 0.3. The call priorities of the requests are compared, and the comparison result is that the call priority of call request 2 is greater than the call priority of call request 1.
[0077] Specifically, the calling priority of each calling request is compared with the calling priority of each calling request in the dispatch queue. According to the comparison result, it is determined which request in the dispatch queue the calling request is before or after, and the calling request is added to the corresponding position of the dispatch queue.
[0078] In one example, the memory scheduler obtains call request 1 and determines that the call priority of call request 1 is 0.1; there is call request 3 in the scheduling queue, whose call priority is 0.3, and call request 2, whose call priority is 0.2. The call priorities of the call requests are compared, and the comparison results are call request 3, call request 2, and call request 1. Scheduling request 1 is added to the scheduling queue at the position corresponding to the comparison result, that is, scheduling request 1 is added after call request 2 in the scheduling queue.
[0079] In the above embodiment, the calling priority of the scheduling request and the calling priority of each request in the scheduling queue are compared to obtain a comparison result; and the scheduling request is added to the position in the scheduling queue corresponding to the comparison result.
[0080] In one of the optional embodiments, the call information includes at least one of the type of data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; determining the target call priority based on the call information includes: determining the evaluation index value corresponding to each call information; and weighting each evaluation index value to obtain the target call priority.
[0081] Optionally, the target call priority is determined according to the call request, including: according to the call request, obtaining the type of data caller, the urgency of the call requirement and the weight of the target data, and obtaining evaluation index values based on the type of data caller, the urgency of the call requirement and the weight of the target data, and weighting each evaluation index value to obtain the target call priority.
[0082] Among them, the types of data callers can be civil, commercial, merchants, enterprises, non-industrial, non-residential, agricultural production, agricultural irrigation and drainage, large industrial electricity, general industry and state-owned units, etc. The urgency of the call demand can be urgent, non-urgent, regular or urgent, etc.; users can also define the urgency of the call demand, judge whether the call demand is urgent, and then add an urgency mark to the call demand. For example, for real-time power consumption, such processing requirements with high timeliness can be added with an emergency mark; for obtaining real-time abnormal processing data, the urgency is high, and an emergency mark can be added; for obtaining meteorological data for the past year, the urgency is low, and a non-urgent mark is added; whether to add an urgent or non-urgent mark is determined according to the task situation. The evaluation index value can be data that affects the value of the call request permission data. The weight of the target data can be determined when it is stored. According to industry rules, the weight of the target data in different databases may be inconsistent.
[0083] Specifically, the type of data caller, the urgency of the call demand, and the weight of the target data may be preset, and the weights corresponding to the evaluation index values are weighted and summed to determine the target call priority of the call request.
[0084] In an example, the type of data caller of call request 1 is civil, with a weight of 0.1; the urgency of the call requirement is urgent, with a weight of 0.3; the weight of the target data is 0.1; the weights corresponding to the type of data caller, the urgency of the call requirement, and the weight of the target data are weighted and summed to determine the target call priority of call request 1.
[0085] The target call priority of the call request is determined by taking the weighted sum of the weight coefficients corresponding to the values of the evaluation indicators that affect the target call priority. The target call priority of each call request is obtained based on multi-dimensional data analysis, and different target call priorities are placed in different scheduling queues for scheduling, thereby improving the flexibility of memory data processing.
[0086] In one of the optional embodiments, the step of determining the weight of the target data includes: obtaining the weight of each data stored in each memory bank, the weight of each data stored in each memory bank is obtained based on the load of the server corresponding to the memory card when the data is stored; based on the weight of each data stored in each memory bank, determining the weight corresponding to the target data.
[0087] The server load may be the amount of data processed by the server. If the amount of data in the memory library is large or the server data corresponding to the memory library is small, the server load is high and the weight of the data stored in the memory library is large; if the amount of data in the memory library is small or the server data corresponding to the memory library is large, the server load is low and the weight of the data stored in the memory library is small. The weight of the target data may be determined when it is stored, and the weight of the target data in different databases may be inconsistent. The weights of the data stored in the memory library may be set separately, each row of data may have a weight, each data table may have the same data or each type of data may have a weight.
[0088] Specifically, the weight of the target data stored in the memory library is determined according to the server load corresponding to the memory library, a call request is obtained, the identifier of the corresponding target data is determined according to the call request, and a pre-established table of identifiers and weights of the target data is queried to obtain the weight corresponding to the target data, and the weight is determined as the weight of the target data.
[0089] In an example, the weight of the data stored in memory bank 1 is 0.1; according to the target data 1 pointed to by the call request 1, the weight of the data stored in the memory bank 1 corresponding to the query call request 1 is 0.1, and the weight of the data stored in the corresponding memory bank 1 is determined as the weight of the target data 1.
[0090] By determining the weight of the data stored in the memory library according to the load of the server corresponding to the memory library, and determining the weight of the data stored in the corresponding memory library as the weight of the target data according to the target data pointed to by the call request, the weight of the target data can be determined according to the server load situation, and the target data with higher weight can be processed in time, thereby reducing the load of the server, improving the security of memory data processing, and preventing the problem of memory processing data overflow.
[0091] In one of the optional embodiments, when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, the target data is read from the memory library corresponding to the call request, including: when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, the memory library corresponding to the call request is determined; the call request is sent to a server corresponding to the memory library, and the memory library is queried through the server corresponding to the memory card to obtain the target data corresponding to the call request.
[0092] The target data may be the data to be called corresponding to the call request.
[0093] Specifically, the memory scheduler calls the call requests in the scheduling queue one by one. When the current call request is scheduled, it queries the memory bank corresponding to the call request; sends the call request to the server corresponding to the memory bank, and queries the target data corresponding to the currently processed call request through the server. Different memory banks correspond to different servers.
[0094] In an example, there are call request 1, call request 2 and call request 3 in the scheduling queue. When call request 1 is scheduled according to the scheduling order of the scheduling queue, the memory library corresponding to call request 1 is queried as data table 1; call request 1 is sent to server 1 of the corresponding data table 1, and the target data corresponding to call request 1 is queried through server 1.
[0095] By querying the memory bank corresponding to the call request, the call request is sent to the server of the corresponding memory bank, and the target data corresponding to the call request is queried through the server of the corresponding memory bank. Different servers process data in different memory banks, which disperses the scale of data and improves the response speed of data.
[0096] In one of the optional embodiments, before determining the memory library corresponding to the call request, it also includes: obtaining load information of the servers corresponding to each memory card; when it is determined that the server is abnormal based on the load information, controlling the abnormal server to stop running; when it is determined that the load of the server is greater than or equal to the load threshold based on the load information, expanding the capacity of the server whose load is greater than or equal to the load threshold.
[0097] The load information may be the amount of data being processed by the server corresponding to the memory bank. The high load condition may be a condition for determining whether the amount of data processed by the server is too large, affecting the data processing efficiency in the memory bank. Capacity expansion may be increasing the number of servers of the memory bank that meet the high load condition.
[0098] Specifically, the load information of the servers of each memory library is obtained. According to the load information of each server, the memory scheduler screens the servers with abnormal operation and controls the abnormal servers to stop running; screens the memory libraries that meet the high load conditions, and expands the capacity of the servers of the memory libraries that meet the high load conditions.
[0099] In one example, the load information of the server of memory bank 1 is obtained, wherein the load information of server 1 is abnormal, and the memory scheduler controls the abnormal server to stop running; based on the load information of the server of memory bank 2, the capacity of the server of memory bank 2 is expanded to meet the high load condition.
[0100] Through the load information of each server, abnormal servers are controlled to stop running, memory libraries that meet high load conditions are screened, and the capacity of servers with memory libraries that meet high load conditions is expanded. The operation status of each server is monitored in real time according to the load information to ensure the reliability of server operation and improve the accuracy of memory data processing.
[0101] In one of the optional embodiments, when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, the target data is read from the memory bank corresponding to the call request, including: when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, querying whether there is target data corresponding to the call request in the local cache; when the target data corresponding to the call request does not exist in the local cache, reading the target data from the memory bank corresponding to the call request; when the target data corresponding to the call request exists in the local cache, obtaining the corresponding target data from the local cache.
[0102] Among them, the local cache can be to write the data corresponding to the call request from the memory bank corresponding to the call request into the local cache space. When the scheduling queue scheduling sequence is scheduled to another call request, it is detected whether there is data corresponding to the call request in the local cache. When the data corresponding to the call request exists in the local cache, it means that the data is the same as the data corresponding to the call request, and the corresponding data is directly obtained from the local cache. When the data corresponding to the call request does not exist in the local cache, the corresponding data is obtained from the memory bank corresponding to the call request; when the amount of data stored in the cache space reaches a certain threshold, the redundant data is deleted. The redundant data can be data with low request frequency. The local cache function can greatly reduce the server read and write pressure and network load. At the same time, when a call request for the same data appears, the corresponding data is directly read from the local cache to improve the efficiency of memory data processing.
[0103] In one example, the request data corresponding to call request 1 and call request 2 are the same. When the current call request 1 is scheduled according to the scheduling order of the scheduling queue, the data corresponding to call request 1 is stored in the local cache. When the current call request 2 is scheduled according to the scheduling order of the scheduling queue, it is detected in the local cache whether there is data corresponding to call request 2. If the local cache has data corresponding to call request 2, the corresponding data is obtained from the local cache.
[0104] By detecting whether there is data corresponding to the call request in the local cache; when the data corresponding to the call request does not exist in the local cache, the corresponding data is obtained from the memory library corresponding to the call request; when the data corresponding to the call request exists in the local cache, the corresponding data is obtained from the local cache. By searching for data in the local cache, the load pressure of the memory is shared and the efficiency of memory data processing is improved.
[0105] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0106] Based on the same application concept, the embodiment of the present application also provides a memory data scheduling device for implementing the memory data scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more memory data scheduling device embodiments provided below can refer to the limitations of the memory data scheduling method above, and will not be repeated here.
[0107] In an exemplary embodiment, Figure 3 As shown, a memory data scheduling device is provided, including: a receiving module 301, a call priority determination module 302, an allocation module 303, a data reading module 304 and a feedback module 305, wherein:
[0108] The receiving module 301 is used to receive a call request sent by a data caller, where the call request carries call information;
[0109] A call priority determination module 302, configured to determine a target call priority based on the call information;
[0110] The allocation module 303 is used to add the call request to the scheduling queue based on the target call priority;
[0111] The data reading module 304 is used to read the target data from the memory bank corresponding to the call request when the call request is dispatched according to the dispatch order of each call request in the dispatch queue;
[0112] The feedback module 305 is used to feed back the target data to the data caller.
[0113] In one optional embodiment, the allocation module 303 includes:
[0114] A result acquisition unit, used for comparing the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result;
[0115] The result adding unit is used to determine the target position of the call request in the scheduling queue based on the comparison result, and add the call request to the target position.
[0116] In one optional embodiment, the call information includes at least one of the type of the data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; the call priority determination module 302 includes:
[0117] An evaluation index value determination unit, used to determine the evaluation index value corresponding to each call information;
[0118] The target call priority determination unit is used to weight the values of each evaluation index to obtain the target call priority.
[0119] In one of the optional embodiments, the evaluation index value determination unit includes:
[0120] The weight determination subunit is used to obtain the weight of each data stored in each memory bank. The weight of each data stored in each memory bank is obtained based on the load of the server corresponding to the memory card when the data is stored.
[0121] The weight determination subunit is used to determine the weight corresponding to the target data based on the weight of each data stored in each memory bank.
[0122] In one optional embodiment, the data reading module 304 includes:
[0123] A memory bank query unit, used for determining a memory bank corresponding to a call request when a call request is dispatched according to the dispatch order of each call request in the dispatch queue;
[0124] The target data query unit is used to send the call request to the server corresponding to the memory library, and query the memory library through the server corresponding to the memory card to obtain the target data corresponding to the call request.
[0125] In one of the optional embodiments, the receiving module 301 includes:
[0126] An information acquisition unit, used to acquire load information of the server corresponding to each memory card;
[0127] A server stopping unit, used to control the abnormal server to stop running when it is determined that the server is abnormal based on the load information;
[0128] The server capacity expansion unit is used to expand the capacity of the server whose load is greater than or equal to the load threshold when it is determined based on the load information that the load of the server is greater than or equal to the load threshold.
[0129] In one of the optional embodiments, the above-mentioned data reading module 304 is specifically used to query whether there is target data corresponding to the call request in the local cache when a call request is scheduled according to the scheduling order of each call request in the scheduling queue; when the target data corresponding to the call request does not exist in the local cache, read the target data from the memory library corresponding to the call request; when the target data corresponding to the call request exists in the local cache, obtain the corresponding target data from the local cache.
[0130] Each module in the above-mentioned memory data scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0131] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store target data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a memory data scheduling method is implemented.
[0132] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0133] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: receiving a call request sent by a data caller, the call request carrying call information; determining a target call priority based on the call information; adding the call request to a scheduling queue based on the target call priority; when the call request is scheduled according to the scheduling order of each call request in the scheduling queue, reading target data from a memory bank corresponding to the call request; and feeding back the target data to the data caller.
[0134] In one embodiment, the processor executes a computer program and implements adding a call request to a scheduling queue based on a target call priority, including: comparing the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result; determining a target position of the call request in the scheduling queue based on the comparison result, and adding the call request to the target position.
[0135] In one embodiment, the call information involved when the processor executes a computer program includes at least one of the type of data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; the determination of the target call priority based on the call information implemented by the processor when executing the computer program includes: determining the evaluation index value corresponding to each call information; and weighting each evaluation index value to obtain the target call priority.
[0136] In one embodiment, the step of determining the weight of target data implemented when the processor executes a computer program includes: obtaining the weight of each data stored in each memory bank, the weight of each data stored in each memory bank is obtained based on the load of the server corresponding to the memory card when the data is stored; based on the weight of each data stored in each memory bank, determining the weight corresponding to the target data.
[0137] In one embodiment, the processor executes a computer program to read target data from a memory bank corresponding to a call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, including: determining the memory bank corresponding to the call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue; sending the call request to a server corresponding to the memory bank, and querying the memory bank through the server corresponding to the memory card to obtain the target data corresponding to the call request.
[0138] In one embodiment, before the processor executes a computer program to determine the memory library corresponding to the call request, it also includes: obtaining load information of the servers corresponding to each memory card; when it is determined based on the load information that the server is abnormal, controlling the abnormal server to stop running; when it is determined based on the load information that the load of the server is greater than or equal to the load threshold, expanding the capacity of the server whose load is greater than or equal to the load threshold.
[0139] In one embodiment, the processor executes a computer program to implement reading target data from a memory bank corresponding to a call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, including: when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, querying whether there is target data corresponding to the call request in a local cache; when the target data corresponding to the call request does not exist in the local cache, reading the target data from the memory bank corresponding to the call request; when the target data corresponding to the call request exists in the local cache, obtaining the corresponding target data from the local cache.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a call request sent by a data caller, the call request carrying call information; determining a target call priority based on the call information; adding the call request to a scheduling queue based on the target call priority; when the call request is scheduled according to the scheduling order of each call request in the scheduling queue, reading target data from a memory bank corresponding to the call request; and feeding back the target data to the data caller.
[0141] In one embodiment, when a computer program is executed by a processor, the call request is added to a scheduling queue based on a target call priority, including: comparing the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result; determining a target position of the call request in the scheduling queue based on the comparison result, and adding the call request to the target position.
[0142] In one embodiment, the call information involved when the computer program is executed by the processor includes at least one of the type of data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; the determination of the target call priority based on the call information implemented by the processor when executing the computer program includes: determining the evaluation index value corresponding to each call information; and weighting each evaluation index value to obtain the target call priority.
[0143] In one embodiment, the step of determining the weight of target data implemented when the computer program is executed by the processor includes: obtaining the weight of each data stored in each memory bank, the weight of each data stored in each memory bank is obtained based on the load of the server corresponding to the memory card when the data is stored; based on the weight of each data stored in each memory bank, determining the weight corresponding to the target data.
[0144] In one embodiment, the computer program implemented when executed by the processor reads target data from a memory bank corresponding to a call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, including: determining the memory bank corresponding to the call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue; sending the call request to a server corresponding to the memory bank, and querying the memory bank through the server corresponding to the memory card to obtain the target data corresponding to the call request.
[0145] In one embodiment, before the computer program is executed by the processor to determine the memory library corresponding to the call request, it also includes: obtaining load information of the servers corresponding to each memory card; when it is determined that the server is abnormal based on the load information, controlling the abnormal server to stop running; when it is determined that the load of the server is greater than or equal to the load threshold based on the load information, expanding the capacity of the server whose load is greater than or equal to the load threshold.
[0146] In one embodiment, the computer program implemented when executed by the processor reads target data from a memory bank corresponding to a call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, including: when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, querying whether there is target data corresponding to the call request in the local cache; when the target data corresponding to the call request does not exist in the local cache, reading the target data from the memory bank corresponding to the call request; when the target data corresponding to the call request exists in the local cache, obtaining the corresponding target data from the local cache.
[0147] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: receiving a call request sent by a data caller, the call request carrying call information; determining a target call priority based on the call information; adding the call request to a scheduling queue based on the target call priority; when the call request is scheduled according to the scheduling order of each call request in the scheduling queue, reading target data from a memory bank corresponding to the call request; and feeding back the target data to the data caller.
[0148] In one embodiment, when a computer program is executed by a processor, the call request is added to a scheduling queue based on a target call priority, including: comparing the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result; determining a target position of the call request in the scheduling queue based on the comparison result, and adding the call request to the target position.
[0149] In one embodiment, the call information involved when the computer program is executed by the processor includes at least one of the type of data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; the determination of the target call priority based on the call information implemented by the processor when executing the computer program includes: determining the evaluation index value corresponding to each call information; and weighting each evaluation index value to obtain the target call priority.
[0150] In one embodiment, the step of determining the weight of target data implemented when the computer program is executed by the processor includes: obtaining the weight of each data stored in each memory bank, the weight of each data stored in each memory bank is obtained based on the load of the server corresponding to the memory card when the data is stored; based on the weight of each data stored in each memory bank, determining the weight corresponding to the target data.
[0151] In one embodiment, the computer program implemented when executed by the processor reads target data from a memory bank corresponding to a call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, including: determining the memory bank corresponding to the call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue; sending the call request to a server corresponding to the memory bank, and querying the memory bank through the server corresponding to the memory card to obtain the target data corresponding to the call request.
[0152] In one embodiment, before the computer program is executed by the processor to determine the memory library corresponding to the call request, it also includes: obtaining load information of the servers corresponding to each memory card; when it is determined that the server is abnormal based on the load information, controlling the abnormal server to stop running; when it is determined that the load of the server is greater than or equal to the load threshold based on the load information, expanding the capacity of the server whose load is greater than or equal to the load threshold.
[0153] In one embodiment, the computer program implemented when executed by the processor reads target data from a memory bank corresponding to a call request when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, including: when a call request is scheduled according to the scheduling order of each call request in the scheduling queue, querying whether there is target data corresponding to the call request in the local cache; when the target data corresponding to the call request does not exist in the local cache, reading the target data from the memory bank corresponding to the call request; when the target data corresponding to the call request exists in the local cache, obtaining the corresponding target data from the local cache.
[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0155] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0156] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A memory data scheduling method, characterized in that: The method comprises: Receiving a call request sent by a data caller, wherein the call request carries call information; Determining a target call priority based on the call information; Based on the target call priority, adding the call request to a scheduling queue; When the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, the target data is read from the memory bank corresponding to the call request; The target data is fed back to the data caller.
2. The method according to claim 1, characterized in that The adding the call request to the scheduling queue based on the target call priority includes: Compare the target call priority with the call priority of each call request in the scheduling queue to obtain a comparison result; The target position of the call request in the scheduling queue is determined based on the comparison result, and the call request is added to the target position.
3. The method according to claim 1, characterized in that The call information includes at least one of the type of the data party, the urgency level of the call request, and the weight of the target data corresponding to the call request; The determining the target call priority based on the call information includes: Determine the evaluation index value corresponding to each of the call information; The target calling priority is obtained by weighting the evaluation index values.
4. The method according to claim 3, characterized in that The step of determining the weight of the target data includes: Obtaining a weight of each data stored in each of the memory banks, wherein the weight of each data stored in each of the memory banks is obtained based on a load of a server corresponding to the memory card when the data is stored; Based on the weight of each data stored in each of the memory banks, the weight corresponding to the target data is determined.
5. The method according to any one of claims 1 to 4, characterized in that: The method of, when the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, reading the target data from the memory bank corresponding to the call request comprises: When the call request is dispatched according to the dispatch order of each call request in the dispatch queue, determining the memory bank corresponding to the call request; The calling request is sent to a server corresponding to the memory bank, and the memory bank is queried through the server corresponding to the memory card to obtain target data corresponding to the calling request.
6. The method according to claim 5, characterized in that Before determining the memory bank corresponding to the call request, the method further includes: Obtaining load information of the server corresponding to each of the memory cards; When it is determined that the server is abnormal based on the load information, controlling the abnormal server to stop running; When it is determined based on the load information that the load of the server is greater than or equal to a load threshold, the capacity of the server whose load is greater than or equal to the load threshold is expanded.
7. The method according to any one of claims 1 to 4, characterized in that: The method of, when the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, reading the target data from the memory bank corresponding to the call request comprises: When the call request is dispatched according to the dispatch order of the call requests in the dispatch queue, query whether there is target data corresponding to the call request in the local cache; When the target data corresponding to the call request does not exist in the local cache, reading the target data from the memory bank corresponding to the call request; When the local cache contains target data corresponding to the call request, the corresponding target data is obtained from the local cache.
8. A memory data scheduling device, characterized in that: The device comprises: A receiving module, used to receive a call request sent by a data caller, wherein the call request carries call information; A call priority determination module, used to determine a target call priority based on the call information; An allocation module, configured to add the call request to a scheduling queue based on the target call priority; A data reading module, configured to read target data from a memory bank corresponding to a calling request when the calling request is scheduled according to the scheduling order of the calling requests in the scheduling queue; A feedback module is used to feed back the target data to the data caller.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
