A data processing method, device, equipment and computer storage medium
By using delayed blocking queues and sliding window techniques to dynamically adjust the message queue size, the problem of poor timeliness in controlling application interface calls after exceeding the limit is solved, and real-time message call count statistics are achieved.
Patent Information
- Application Number
- CN202011180135.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2040-10-29
AI Technical Summary
In existing technologies, application programming interface (API) calls require waiting for the cache to be refreshed after exceeding the limit before taking effect, resulting in a time lag and poor control efficiency.
By leveraging the characteristics of delayed blocking queues, the message queue size is dynamically adjusted, and message queues are removed in real time through thread-level consumers. Combined with sliding window technology, real-time statistics on the number of message calls are achieved.
It achieves strong real-time tracking of message call counts, avoids secondary accumulation, improves control efficiency, and reduces system resource consumption.
Smart Images

Figure CN114428685B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of IT application technology, and in particular relates to a data processing method, apparatus, device and computer storage medium. Background Technology
[0002] With the development of IoT business, the group's IoT business support system needs to support the access of more and more peripheral systems, such as provincial companies, professional companies, third-party platforms, and value-added platforms. To meet the IoT support capabilities required by various peripheral systems, it is necessary to open up IoT business capabilities for third-party use. To manage the calls from peripheral systems, a unified interface scheduling platform was built, and quota management was adopted to control the call volume of peripheral system applications.
[0003] Due to the high real-time requirements of application programming interface (API) calls, quota calculation typically employs an asynchronous accumulation mode to ensure efficiency. This means that a separate accumulation thread accumulates the call logs after each call. While this accumulation mode guarantees the efficiency of the call itself, the accumulated call count is asynchronous with the actual call. Therefore, if the current quota is exceeded, it requires waiting for a cache refresh before taking effect, resulting in a time lag and poor control efficiency. Summary of the Invention
[0004] This application provides a data processing method, apparatus, device, and computer storage medium. It utilizes the feature of a delayed blocking queue that automatically dequeues after the queue expires to dynamically adjust the size of a message queue based on the delayed blocking queue. The number of messages called can be obtained based on the size of the message queue. There is no need to accumulate messages twice, the time difference is small, and the real-time performance is strong.
[0005] In a first aspect, embodiments of this application provide a data processing method, the method comprising:
[0006] Receive message call request;
[0007] Based on the message invocation request, retrieve the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from the distributed cache;
[0008] When the delay duration of the message queue is greater than or equal to the first preset duration, the thread-level consumer corresponding to the message queue will remove the message from the message queue.
[0009] Determine the number of messages called in the message queue within the first preset time period.
[0010] In one possible implementation, the method also includes:
[0011] When the message queue delay is less than the first preset duration and the number of message calls is greater than or equal to the preset limit, message calls are stopped.
[0012] In one possible implementation, when the delay of the message queue is less than a first preset duration, the thread-level consumer corresponding to the message queue automatically stops removing messages within a second preset duration.
[0013] In one possible implementation, determining the number of messages called in the message queue within a first preset time period includes:
[0014] The number of messages called in the message queue within the first preset time period is determined by the counter corresponding to the message queue.
[0015] Secondly, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0016] The receiving module is used to receive message call requests;
[0017] The acquisition module is used to retrieve the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from the distributed cache based on the message invocation request.
[0018] The remove module is used to remove messages from the message queue by the thread-level consumer corresponding to the message queue when the delay duration of the message queue is greater than or equal to the first preset duration.
[0019] The determination module is used to determine the number of messages in the message queue that are invoked within the delay period.
[0020] In one possible implementation, the device further includes a stop module, used to stop calling messages when the delay duration of the message queue is less than a first preset duration and the number of message calls is greater than or equal to a preset limit.
[0021] In one possible implementation, the stop module is also used to automatically stop removing messages from the thread-level consumer corresponding to the message queue within a second preset time period when the delay duration of the message queue is less than a first preset time period.
[0022] In one possible implementation, a determination module is specifically used to determine the number of messages called in the message queue within the delay period using a counter corresponding to the message queue.
[0023] Thirdly, embodiments of this application provide a data processing apparatus, the apparatus including: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the data processing method of the first aspect or any possible implementation of the first aspect.
[0024] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the data processing method of the first aspect or any possible implementation of the first aspect.
[0025] The data processing method, apparatus, device, and computer storage medium provided in this application embodiment receive a message call request, and according to the message call request, obtain the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from a distributed cache. When the delay duration of the message queue is greater than or equal to the first preset duration, the thread-level consumer corresponding to the message queue removes the message from the message queue, determines the number of message calls in the message queue within the first preset duration, can dynamically adjust the size of the message queue, and obtain the number of message calls according to the size of the message queue. There is no need to accumulate the messages twice, the time difference is small, and the real-time performance is strong. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1A It is a scheduling system for a data processing method in the prior art;
[0028] Figure 1B This is a flowchart illustrating a message scheduling method in the prior art;
[0029] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0030] Figure 3 This is a schematic diagram of a sliding window provided in an embodiment of this application;
[0031] Figure 4 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;
[0032] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Detailed Implementation
[0033] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0034] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0035] like Figure 1A As shown, the core support system 130 registers IoT service capabilities to the interface scheduling platform 120. The interface scheduling platform 120 exposes these IoT service capabilities to the peripheral system 110, which then calls the IoT service capabilities provided by the interface scheduling platform 120. The interface scheduling platform 120, based on the call request in the message, such as... Figure 1B As shown, the interface scheduling workbench 120 first executes: S110 to parse the message information; then, based on the parsing result, it executes: S120 to determine whether the number of message calls exceeds the limit. If it does not exceed the limit, it executes: S140 to process the call; if it exceeds the limit, it executes: S130 to stop the call. Generally, different call quotas are set within a certain period based on the core support system's own business capabilities and the business level requirements and risk levels of different peripheral systems. When the call quota is reached within a period, certain measures are taken, usually stopping the service and waiting for the next call period.
[0036] Due to the high real-time requirements of application programming interface (API) calls, to ensure efficiency, conventional quota calculation typically employs an asynchronous accumulation model. This usually avoids synchronous accumulation during calls; instead, a separate accumulation thread accumulates the call count based on each configured quota dimension and call logs. The main API call thread only performs the actual calls and records the call logs, determining whether the limit has been exceeded based on the asynchronous accumulation result. While this ensures the efficiency of the calls themselves, the asynchronous accumulation model means that once the quota is exceeded, it needs to wait for the cache to refresh before taking effect, resulting in a time lag and poor control efficiency.
[0037] To address the problems of the prior art, embodiments of this application provide a data processing method, apparatus, device, and computer storage medium. The data processing method provided in this application embodiment will be described first.
[0038] In this embodiment of the invention, the interface scheduling workbench receives message invocation requests. Based on the message invocation request, it retrieves the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from the distributed cache. When the delay duration of the message queue is greater than or equal to the first preset duration, the thread-level consumer corresponding to the message queue removes the message from the message queue. The size of the message queue can be dynamically adjusted to determine the number of message invocations in the message queue within the first preset duration. Simultaneously with message invocation, the number of message invocations is determined based on the size of the message queue, eliminating the need to wait for cache refresh to count the number of message invocations, avoiding secondary accumulation of message invocation counts, and ensuring strong real-time performance.
[0039] Figure 2 A flowchart illustrating a data processing method according to an embodiment of this application is shown. Figure 2 As shown, the method may include the following steps:
[0040] S210, Receive message call request.
[0041] Message producers produce messages of corresponding dimensions based on the quota dimensions enabled by the external system. Messages are divided into request messages and response messages. Request messages are used to request call messages from the interface scheduling workbench.
[0042] The header topic information in the message is used for counting scenarios, while the complete message is used for logging scenarios. The header topic information serves as the dimension of the message queue, acting as the primary key for the corresponding dimension object. This information is used on the consumer side as the statistical basis for message queue storage dimensions and message queue size.
[0043] Two message queues are created for each dimension, one to manage total limit status and the other to manage success limit status. Elements in each message queue use the message topic information as the primary key, and a corresponding message queue is created to store active queue elements. This application uses one message queue from a specific dimension as an example to illustrate the data processing method:
[0044] The message queue is implemented based on the delayed blocking queue of the Java system. The principle of the delayed blocking queue is as follows:
[0045] The delayed blocking queue is a blocking queue that supports delayed retrieval of elements. Internally, it uses a priority queue to store elements, and the elements must implement the delayed interface. When creating an element, you can specify how long you can wait before retrieving the current element from the queue. The element can only be retrieved from the queue when the delay period expires.
[0046] By leveraging the feature of the delayed blocking queue that automatically dequeues messages after they expire, the size of the message queue can be adjusted in real time and accurately.
[0047] The interface scheduling workbench receives the call request and parses the message.
[0048] S220. Based on the message invocation request, retrieve the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from the distributed cache.
[0049] After receiving a message call request, the interface scheduling workbench directly retrieves the quota dimension information corresponding to the message from the distributed cache, namely the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message.
[0050] The delay duration refers to the storage time of a message in the message queue. The first preset duration is the quota period of the core support system, and the quota period of the core support system is used as the delay period for each message in the message queue.
[0051] A sliding window is a flow control technique. In early network communication, communicating parties sent data directly without considering network congestion. Because communication devices were unaware of network congestion and sent data simultaneously, intermediate nodes experienced packet loss due to blockage, preventing all communication devices from sending data. Therefore, the sliding window mechanism was developed to solve this problem. The sliding window protocol is a technique used to improve throughput by allowing the sender to transmit additional packets before receiving any acknowledgments.
[0052] Traditional sliding window techniques typically use the number of elements in the queue as the window size, and then cover a certain amount of data blocks by sliding the window. In this embodiment of the invention, a first preset duration, i.e., a delay period, is considered as the size of a sliding window, which automatically slides forward over time. Messages within the delay period belong to the current sliding window.
[0053] S230. When the delay duration of the message queue is greater than or equal to the first preset duration, the thread-level consumer corresponding to the message queue will remove the message from the message queue.
[0054] like Figure 3 The sliding window is set to a first preset duration of X minutes, where X can be arbitrarily set according to system requirements. The sliding window includes at least one message stored in a message queue within the first preset duration. Messages are enqueued or dequeued based on the relationship between the message queue's delay duration and the first preset duration, making the number of messages within the sliding window variable.
[0055] Each delayed blocking queue corresponds to a thread-level consumer, responsible for dequeuing timed-out objects from the queue. When the delay duration of the message queue is greater than or equal to the first preset duration, that is, when the message's storage time in the message queue is greater than or equal to the message's delay period in the message queue, meaning the message has timed out, the thread-level consumer corresponding to the message queue will remove the message from the message queue, and the message queue size in the sliding window will decrease.
[0056] S240. Determine the number of messages called in the message queue within the first preset time period.
[0057] The interface scheduling workbench saves application interface call messages in real time. While calling messages, it determines the number of messages called in the message queue within the delay period. By adopting a call and count synchronization mode, it improves real-time performance, effectively controls the number of messages called, reduces the risk of the core system, and better manages the peripheral system.
[0058] In this embodiment of the invention, the interface scheduling workbench receives message invocation requests. Based on the message invocation request, it retrieves the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from the distributed cache. When the delay duration of the message queue is greater than or equal to the first preset duration, the thread-level consumer corresponding to the message queue removes the message from the message queue. The size of the message queue can be dynamically adjusted to determine the number of message invocations in the message queue within the first preset duration. Simultaneously with message invocation, the number of message invocations is determined based on the size of the message queue, eliminating the need to wait for cache refresh to count the number of message invocations, avoiding secondary accumulation of message invocation counts, and ensuring strong real-time performance.
[0059] In one embodiment, when the message queue delay is less than a first preset duration and the number of message calls is greater than or equal to a preset limit, message calls are stopped.
[0060] When a message is stored in the message queue for less than the message's latency period, it is not removed from the queue. If the number of calls to a message is less than a preset limit, a log message is sent to the message queue for subsequent processing. During this time, messages continuously enter the message queue, increasing its size in the sliding window. When the number of calls exceeds the preset limit, the window is considered full, and message processing stops. This effectively controls the number of calls and prevents message queue blockage and packet loss. It should be noted that the preset limit is set based on the core support system's own business capabilities and the business level requirements and risk levels of different peripheral systems, with varying call limits within a certain period. This is not specified here.
[0061] In one embodiment, when the delay of the message queue is less than a first preset duration, the thread-level consumer corresponding to the message queue automatically stops removing messages within a second preset duration.
[0062] When a message has been stored in the message queue for less than the message's latency period, and no message is removed from the queue, the thread-level consumer corresponding to that message queue automatically stops removing messages within a second preset time period. For example, when no messages are being removed from a message queue, the thread-level consumer corresponding to that queue automatically stops removing messages within 1 second. In other words, the thread-level consumer will automatically sleep for 1 second, reducing additional idle time overhead. It should be noted that the second preset time period can be set according to actual needs and is not limited here.
[0063] In one embodiment, determining the number of messages called in the message queue within a first preset time period includes: determining the number of messages called in the message queue within the first preset time period using a counter corresponding to the message queue.
[0064] While a message is being invoked, a counter corresponding to the message queue containing that message continuously tracks the number of message invocations within a given latency period. Since a separate scanning thread is not required, this reduces the system's computational resource consumption. Because message invocation and count accumulation are synchronous, there is no need for secondary message accumulation. The time difference between invoking a message and accumulating the message invocation count is minimal, resulting in strong real-time performance.
[0065] Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 4 As shown, the device may include a receiving module 410, an acquiring module 420, a removing module 430, and a determining module 440.
[0066] The receiving module 410 is used to receive message call requests;
[0067] The acquisition module 420 is used to obtain the delay duration of the message queue corresponding to the message and the first preset duration corresponding to the message from the distributed cache according to the message invocation request.
[0068] The removal module 430 is used to remove messages from the message queue by the thread-level consumer corresponding to the message queue when the delay duration of the message queue is greater than or equal to the first preset duration.
[0069] The determination module 440 is used to determine the number of messages called in the message queue within the delay period.
[0070] In one embodiment, the device further includes a stop module, configured to stop calling messages when the delay duration of the message queue is less than a first preset duration and the number of message calls is greater than or equal to a preset limit.
[0071] In one embodiment, the stopping module is further configured to automatically stop removing messages from the thread-level consumer corresponding to the message queue within a second preset time period when the delay duration of the message queue is less than a first preset time period.
[0072] In one embodiment, the determining module is specifically used to determine the number of messages called in the message queue within the delay period by using a counter corresponding to the message queue.
[0073] Figure 4 Each module in the illustrated device has the ability to implement Figure 2 The functions of each step in the process and their corresponding technical effects are described in detail here for the sake of brevity.
[0074] Figure 5 A schematic diagram of the hardware structure of the data processing device provided in an embodiment of this application is shown.
[0075] The data processing device may include a processor 501 and a memory 502 storing computer program instructions.
[0076] Specifically, the processor 501 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0077] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 502 may include removable or non-removable (or fixed) media, or memory 502 may be non-volatile solid-state storage. Memory 502 may be internal or external to the integrated gateway disaster recovery device.
[0078] In one example, memory 502 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 502 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.
[0079] The processor 501 reads and executes computer program instructions stored in the memory 502 to achieve... Figure 2 Steps S210 to S240 in the illustrated embodiment are completed, and the desired outcome is achieved. Figure 2 The technical effects achieved by performing the steps in the example shown are not elaborated here for the sake of brevity.
[0080] In one example, the data processing device may further include a communication interface 503 and a bus 510. Wherein, as... Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.
[0081] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0082] Bus 510 includes hardware, software, or both, that couples components of a data processing device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0083] The data processing device can execute the data processing method described in the embodiments of this application, thereby achieving the combination Figure 2 Describe the data processing methods.
[0084] Furthermore, in conjunction with the data processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data processing methods in the above embodiments.
[0085] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0086] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0087] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0088] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0089] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method of data processing, characterized by, The method is applied to an interface scheduling platform, wherein a core support system registers Internet of Things business capabilities to the interface scheduling platform, so that the interface scheduling platform opens the Internet of Things business capabilities to a peripheral system, and the method comprises the following steps: receiving, by the interface scheduling platform, a calling request of a message, wherein the calling request of the message is sent by the peripheral system; acquiring, by the interface scheduling platform according to the calling request of the message, a delay time length of a message queue corresponding to the message from a distributed cache and a first preset time length corresponding to the message, wherein the first preset time length is a limit period of the core support system; when the delay time length of the message queue is greater than or equal to the first preset time length, a thread-level consumer corresponding to the message queue removes the message from the message queue, wherein each message queue corresponds to one thread-level consumer; determining, by the interface scheduling platform, a calling quantity of the message in the message queue within the first preset time length; determining, by the interface scheduling platform according to the calling quantity of the message, whether to call the message or stop calling the message.
2. The method of claim 1, wherein, The method further comprises the following step: when the delay time length of the message queue is less than the first preset time length and the calling quantity of the message is greater than or equal to a preset limit, the calling of the message is stopped.
3. The method of claim 1, wherein, When the delay time length of the message queue is less than the first preset time length, the thread-level consumer corresponding to the message queue automatically stops calling the message within a second preset time length.
4. The method of claim 1, wherein, The determination of the calling quantity of the message in the message queue within the first preset time length comprises the following step: determining, by a counter corresponding to the message queue, the calling quantity of the message in the message queue within the first preset time length.
5. An apparatus for data processing, characterized by The method is applied to an interface scheduling platform, wherein a core support system registers Internet of Things business capabilities to the interface scheduling platform, so that the interface scheduling platform opens the Internet of Things business capabilities to a peripheral system, and the device comprises the following modules: a receiving module, configured to receive, by the interface scheduling platform, a calling request of a message, wherein the calling request of the message is sent by the peripheral system; an acquiring module, configured to acquire, by the interface scheduling platform according to the calling request of the message, a delay time length of a message queue corresponding to the message from a distributed cache and a first preset time length corresponding to the message, wherein the first preset time length is a limit period of the core support system; a removing module, configured to, when the delay time length of the message queue is greater than or equal to the first preset time length, remove, by a thread-level consumer corresponding to the message queue, the message from the message queue, wherein each message queue corresponds to one thread-level consumer; a determining module, configured to determine, by the interface scheduling platform, a calling quantity of the message in the message queue within the delay time length, and determine, by the interface scheduling platform according to the calling quantity of the message, whether to call the message or stop calling the message.
6. The apparatus of claim 5, wherein, The device further comprises: a stopping module, configured to, when the delay time length of the message queue is less than the first preset time length and the calling quantity of the message is greater than or equal to a preset limit, stop calling the message.
7. The apparatus of claim 5, wherein, The stopping module is further configured to automatically stop the thread-level consumer corresponding to the message queue from removing the messages in a second preset time length when the delay time length of the message queue is less than the first preset time length.
8. The apparatus of claim 5, wherein, The determining module is specifically configured to determine the number of invocations of the messages in the message queue within the delay time length through a counter corresponding to the message queue.
9. A data processing device, characterized by The device comprises a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the data processing method of any one of claims 1-4.
10. A computer storage medium, characterized in that, The computer storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the data processing method of any one of claims 1-4.
Citation Information
Patent Citations
Server and delay-queue-based current-limiting protection system and method
CN106713171A