Method and related device for frequency control of message commands
By using a command feature database and a timestamp array to control the frequency of message commands in a distributed communication system, the problems of high storage overhead and low processing efficiency in message command management are solved, and efficient message command management is achieved.
Patent Information
- Application Number
- CN202511769897.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-28
AI Technical Summary
In existing distributed communication systems, the separate configuration and storage of message commands incurs high overhead, takes a long time to look up, and has low processing efficiency.
The original message commands are analyzed by a pre-set command feature database to determine command feature information. They are then grouped according to a mapping function, and the timestamp difference is calculated by combining the timestamp array to perform frequency control and determine the processing method of the message commands.
It reduces the amount of configuration information data, enables unified management of message commands, and improves processing efficiency.
Smart Images

Figure CN121217816B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a frequency control method of message command and related equipment. BACKGROUND
[0002] In the existing distributed communication system, a terminal sends a message command to a server, the server manages the message command, and then allocates it to a corresponding terminal for processing, so as to realize a corresponding communication function. The existing technical solution usually sets a separate control frequency for each message command, thereby performing separate management. However, the storage overhead required for storing the separate configuration of each message command is large, and it takes a long time to search when managing the message command, which is low in processing efficiency. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a frequency control method of message command and related equipment, which can improve the processing efficiency.
[0004] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application provides a frequency control method of message command, which comprises:
[0005] Receiving an original message command, analyzing the original message command according to a preset command feature database, and determining command feature information;
[0006] Grouping according to the command feature information and a preset mapping function to obtain a target mapping group;
[0007] Calculating according to the original message command and a preset timestamp array to determine a timestamp difference value;
[0008] Controlling the frequency of the original message command according to the timestamp difference value and the target mapping group.
[0009] In some embodiments, the grouping according to the command feature information and the preset mapping function to obtain the target mapping group specifically comprises:
[0010] Analyzing the command feature information to determine current command type and current command ID information;
[0011] Matching the current command type with a preset command priority to determine a target priority, and generating grouping ID information according to the target priority, the preset mapping function and the current command ID information;
[0012] Grouping the original message command corresponding to the command feature information according to the grouping ID information to obtain the target mapping group.
[0013] In some embodiments, the calculating according to the original message command and the preset timestamp array, and determining the timestamp difference value specifically comprises:
[0014] The original message command is parsed to determine current command ID information, and the preset timestamp array is queried according to the current command ID information to determine a query result;
[0015] If the query result is no historical timestamp, current time information is taken as a historical timestamp;
[0016] If the query result is a historical timestamp, difference operation is performed according to the historical timestamp and current time information to determine the timestamp difference value.
[0017] In some embodiments, the frequency control of the original message command according to the timestamp difference value and the target mapping group specifically comprises:
[0018] The target mapping group is parsed to determine a target frequency value, and the timestamp difference value is compared with the target frequency value;
[0019] If the timestamp difference value is less than the target frequency value, the original message command is processed by delay or discarded;
[0020] If the timestamp difference value is greater than or equal to the target frequency value, the original message command is sent to a processing terminal to make the processing terminal process the original message command.
[0021] In some embodiments, the method further comprises:
[0022] If the timestamp difference value is greater than or equal to the target frequency value, the original message command is parsed to determine current command ID information;
[0023] The preset timestamp array is updated according to current time information and the current command ID information.
[0024] In some embodiments, the preset command feature database is determined by the following method:
[0025] Preset system information is obtained, and the preset system information is parsed to determine a preset command list; wherein, the preset system information comprises a protocol definition file or system configuration information;
[0026] The preset command list is subjected to feature extraction to determine command semantic features, and the preset command feature database is established according to the command semantic features.
[0027] To achieve the above object, another aspect of the embodiment of the present application provides a frequency control system of message commands, which comprises:
[0028] an analysis module, configured to receive original message commands, analyze the original message commands according to a preset command feature database, and determine command feature information;
[0029] a grouping module, configured to group according to the command feature information and a preset mapping function, and obtain a target mapping group;
[0030] a calculation module, configured to calculate according to the original message commands and a preset timestamp array, and determine a timestamp difference value;
[0031] an execution module, configured to control the frequency of the original message commands according to the timestamp difference value and the target mapping group.
[0032] To achieve the above object, another aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described above when executing the computer program.
[0033] To achieve the above object, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the method described above when executed by a processor.
[0034] To achieve the above object, another aspect of the embodiment of the present application provides a computer program product, which comprises a computer program, and the computer program implements the method described above when executed by a processor.
[0035] The embodiment of the present application at least has the following beneficial effects: the present application provides a frequency control method, system, electronic device, storage medium and program product of message commands, which analyzes the received original message commands through a pre-constructed command feature database, determines the command feature information corresponding to the original message commands, analyzes the command feature information obtained through analysis and a preset mapping function, groups the original message commands, determines the corresponding target mapping group, then queries and calculates the original message commands and a preset timestamp array, obtains the timestamp difference value corresponding to the original message commands, finally controls the frequency of the original message commands according to the timestamp difference value obtained through calculation and the corresponding target mapping group, and determines whether to process the original message commands; through analyzing the command feature information of the original message commands, dividing the original message commands into corresponding mapping groups based on the command feature information, managing the original message commands based on the mapping groups and the timestamp difference value of the original message commands, reducing the data volume of configuration information, and setting the mapping groups to realize local unified management, the processing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 is a flow chart of a message command frequency control method provided by an embodiment of the present application;
[0037] Figure 2 is Figure 1 is a flow chart of step S102 in
[0038] Figure 3 is Figure 1 is a flow chart of step S103 in
[0039] Figure 4 is Figure 1 is a flow chart of step S104 in
[0040] Figure 5 is Figure 1 is another flow chart of step S104 in
[0041] Figure 6 is a flow chart of establishing a preset command feature database in a message command frequency control method provided by an embodiment of the present application;
[0042] Figure 7 is a flow chart of a specific embodiment provided by an embodiment of the present application;
[0043] Figure 8 is a structural schematic diagram of a message command frequency control system provided by an embodiment of the present application;
[0044] Figure 9 is a hardware structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementation described in the following exemplary embodiments does not represent all the implementations consistent with the embodiments of the present application, but is only an example of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0046] It is to be understood that the terms "first", "second", and the like used herein can be used to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, a first information can also be referred to as a second information, and similarly, a second information can also be referred to as a first information, without departing from the scope of embodiments of the present application. Depending on the context, the word "if' as used herein can be interpreted as "when" or "upon" or "in response to determining".
[0047] As used herein, the terms "at least one", "multiple", "each", "any", and the like, at least one includes one, two, or more, multiple includes two or more, each refers to each of a corresponding plurality, and any refers to any of a plurality.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing the embodiments of the present application only and is not intended to limit the present application.
[0049] The present application can be used in a variety of general purpose or special purpose computer systems environments or configurations. Examples of well known computer systems, environments, and / or configurations that can be suitable for use with the application include, but are not limited to, personal computers, server computers, handheld or laptop devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0050] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiments of the present application to operate normally will be obtained.
[0051] Figure 1 is an optional flowchart of a message command frequency control method provided by the embodiments of the present application, Figure 1 The method in the above step S100 can include but is not limited to steps S101-S104.
[0052] Step S101, receiving an original message command, analyzing the original message command according to a preset command feature database, and determining command feature information;
[0053] Step S102, grouping according to the command feature information and a preset mapping function, and obtaining a target mapping group;
[0054] Step S103, calculating according to the original message command and a preset timestamp array, and determining a timestamp difference value;
[0055] Step S104, performing frequency control on the original message command according to the timestamp difference value and the target mapping group.
[0056] The steps S101 to S104 shown in the embodiments of the present application are as follows: through setting a message filter in a distributed communication system, the original message commands sent by a communication terminal are analyzed and managed, the received original message commands are checked and controlled in frequency, and are distributed to corresponding servers for processing; the message filter analyzes the received original message commands according to a preset command feature database, determines the command feature information corresponding to the current original message command; the message filter determines the corresponding command type of the current original message command according to the command feature information, and further determines the priority corresponding to the current original message command; then, the current original message command is divided into a corresponding mapping group according to the corresponding priority, the mapping group corresponds to the priority and is provided with a corresponding frequency threshold; the message filter analyzes the message commands in each mapping group, determines the corresponding command ID information, and according to the command ID information, queries the timestamp array corresponding to the mapping group to obtain the corresponding historical timestamp information; then, the time difference is calculated according to the current time information and the historical timestamp information obtained by querying, the time difference and the frequency threshold set by the current mapping group are compared to determine whether the current original message command meets the frequency control condition, and further determine whether the current original message command is sent to the server for processing.
[0057] Please refer to Figure 2 In some embodiments, step S102 can include but is not limited to steps S201 to S203:
[0058] Step S201, the command feature information is parsed to determine the current command type and the current command ID information;
[0059] Step S202, the current command type is matched with the preset command priority to determine the target priority, and the grouping ID information is generated according to the target priority, the preset mapping function and the current command ID information;
[0060] Step S203, the original message command corresponding to the command feature information is grouped according to the grouping ID information to obtain the target mapping group.
[0061] In step S201 of some embodiments, the obtained command feature information is parsed to determine the command type and the command ID information corresponding to the current original message command; for example, by parsing the command feature information, it is determined that the command type of the current original message command is to listen to the button state, which is used for subsequent judgment of the priority corresponding to the current original message command according to the command type.
[0062] In step S202 of some embodiments, different priorities are set in the system, and each priority is set with different command types; the parsed command type is matched with the command types set in each priority to determine the priority corresponding to the current original message command; in the system, different mapping groups are set corresponding to different priorities, and the system is distributed to the corresponding mapping group according to the priority corresponding to the current original message command, and is distinguished by setting the corresponding mapping group ID; in this embodiment, the corresponding mapping function is set to generate the corresponding mapping group ID.
[0063] In step S203 of some embodiments, after generating the corresponding mapping group ID, the system distributes the mapping group ID to the current original message command, and divides the current original message command into the mapping group corresponding to the mapping group ID, so as to uniformly manage the message commands in the mapping group subsequently.
[0064] Please refer to Figure 3 In some embodiments, step S103 can include but is not limited to steps S301 to S303:
[0065] Step S301, the original message command is parsed to determine the current command ID information, and the preset timestamp array is queried according to the current command ID information to determine the query result;
[0066] Step S302, if the query result is no historical timestamp, the current time information is taken as the historical timestamp;
[0067] Step S303, if the query result is that there is a historical timestamp, difference operation is performed according to the historical timestamp and the current time information to determine the timestamp difference.
[0068] In step S301 of some embodiments, the system parses the received original message command to determine the command characteristic information, and after the system is distributed to the corresponding mapping group according to the command characteristic information, the system respectively queries the frequency of the message commands in each mapping group to determine whether the message commands are sent to the server for processing; the system uses a compact array structure to store the historical timestamp information corresponding to the message commands in each mapping group; the corresponding command ID information is determined by parsing the message command, and the timestamp array is queried based on the command ID information to determine the corresponding timestamp information.
[0069] In step S302 of some embodiments, if the timestamp array is queried based on the command ID information, no corresponding historical timestamp information is obtained, which indicates that the current message command is processed for the first time, and the system takes the current time information as the historical timestamp corresponding to the message command.
[0070] In step S303 of some embodiments, if the timestamp array is queried according to the command ID information, the corresponding timestamp information is obtained, the system performs difference calculation on the current time information and the queried timestamp information, and the corresponding timestamp difference is obtained, which is used for subsequent judgment on the processing frequency of the current message command, and further determination of whether to process the current message command.
[0071] Please refer to Figure 4 In some embodiments, step S104 can include but is not limited to steps S401 to S403:
[0072] Step S401, the target mapping group is parsed, the target frequency value is determined, and the timestamp difference is compared with the target frequency value;
[0073] Step S402, if the timestamp difference is less than the target frequency value, the original message command is processed with delay or discarded;
[0074] Step S403, if the timestamp difference is greater than or equal to the target frequency value, the original message command is sent to the processing terminal to make the processing terminal process the original message command.
[0075] In step S401 of some embodiments, after querying and calculating the timestamp difference corresponding to each message command in the mapping group, the system parses the configuration information of the mapping group to determine the frequency threshold set by the mapping group. In this embodiment, the heartbeat command mapping group, the regular command mapping group and the emergency command mapping group are set according to the real-time and priority of the message command, and the frequency thresholds are set to 1000ms, 200ms and 100ms respectively. The system compares the timestamp difference corresponding to each message command in the current mapping group with the frequency threshold set by the current mapping group, judges whether each message command meets the frequency control condition, and further determines whether to process the message command.
[0076] In step S402 of some embodiments, if the timestamp difference of the message command is less than the frequency threshold of the mapping group, it means that the processing frequency of the current message command is too high, and the current message command is not processed temporarily, and the processing method of delaying the current message command or discarding the current message command is adopted.
[0077] In step S403 of some embodiments, if the timestamp difference of the message command is greater than or equal to the frequency threshold of the mapping group, it is determined that the current message command meets the frequency control condition, and a large number of message commands will not be sent for processing in a short time, thereby causing message flooding. The current message command is sent to the server for processing. In this embodiment, for the message command for which the historical timestamp is not queried, the system considers that the message command also meets the frequency control condition, and sends the message command to the corresponding server for processing.
[0078] Referring to Figure 5 In some embodiments, step S104 can further include, but is not limited to, steps S501-S502,
[0079] In step S501, if the timestamp difference value is greater than or equal to the target frequency value, the original message command is parsed to determine the current command ID information.
[0080] In step S502, the preset timestamp array is updated according to the current time information and the current command ID information.
[0081] In step S501 of some embodiments, the system performs frequency control judgment on the frequency threshold value set by the mapping group and the timestamp difference value corresponding to each message command in the mapping group, and sends the message command satisfying the frequency control condition to the corresponding server for processing. Then, the system updates the array structure storing the timestamp information according to the command ID information corresponding to the message command satisfying the frequency control condition, so as to control the frequency of subsequent message commands.
[0082] In step S502 of some embodiments, the system queries and locates in the array structure storing the timestamp information according to the obtained command ID information to determine the corresponding historical timestamp; and then updates the historical timestamp to the current time.
[0083] Referring to Figure 6 The preset command feature database in the message command frequency control method provided by the embodiments of the present application is determined through steps S601-S602:
[0084] In step S601, the preset system information is obtained, and the preset system information is parsed to determine the preset command list; wherein the preset system information includes a protocol definition file or system configuration information.
[0085] In step S602, the preset command list is feature extracted to determine the command semantic feature, and the preset command feature database is established according to the command semantic feature.
[0086] In step S601 of some embodiments, in order to improve the processing efficiency of the original message command, the system is provided with a command feature database in advance, which parses the received original message command through the command feature database to quickly determine the corresponding command type and priority, and then divides it into the corresponding mapping group for management. The system determines the manually input command list by parsing the configuration file or protocol definition file of the system; and the system constructs the command feature database according to the command list.
[0087] In step S602 of some embodiments, the system determines the corresponding command function according to semantic feature extraction on the command list, and divides the priority according to the command function, to generate a command feature database.
[0088] Next, the scheme of the embodiments of the present application will be described and explained in detail in combination with specific application examples:
[0089] Please refer to Figure 7 , Figure 7 is a flowchart of a message command frequency control method provided by the embodiments of the present application in specific embodiments; in specific embodiments, a message filter is set in a terminal device and a service processing server; the terminal device sends a message command CMD_X to be processed to the message filter, the message filter processes the message command according to the command feature database after receiving the sent message command, specifically, traverses the ID information of all received original message commands, extracts the service feature corresponding to the original message command as the command feature information according to the numerical value of the command ID information, the function definition in the command feature database and the preset rule library; then, the message filter groups the received original message commands according to the set grouping strategy, to obtain a mapping group; the high real-time and high emergency commands are divided into an "emergency real-time group", and the low-frequency state synchronization commands are divided into a "state synchronization group", and the mapping group ID corresponding to each mapping group is calculated through a mapping function, and is assigned to the corresponding original message command; the message filter queries the mapping group according to the time complexity, and processes the original message commands in the mapping group with different real-time requirements; the ID information of the original message command in the mapping group is queried to query the array storing the time stamp information, to obtain the corresponding historical time stamp, and the corresponding time stamp difference value is calculated according to the current time and the historical time stamp; the original message command is checked and screened according to the time stamp difference value and the frequency control threshold value set by the mapping group, and the original message command with the time stamp difference value greater than the frequency control threshold value, or the original message command without the historical time stamp, is sent to the service processing device for processing.
[0090] The embodiments of the present application at least have the following beneficial effects: the present application provides a message command frequency control method, system, electronic device, storage medium and program product, the scheme analyzes the received original message command through the pre-constructed command feature database, determines the command feature information corresponding to the original message command; according to the analysis of the command feature information and the preset mapping function, the original message command is grouped, and the corresponding target mapping group is determined; then, according to the original message command and the preset timestamp array, the timestamp difference value corresponding to the original message command is obtained by query calculation; finally, according to the timestamp difference value and the corresponding target mapping group, the frequency control of the original message command is carried out, and it is determined whether the original message command is processed; by analyzing the command feature information of the original message command, the original message command is divided into the corresponding mapping group based on the command feature information, the original message command is managed based on the mapping group and the timestamp difference value of the original message command, the data amount of the configuration information is reduced, and the mapping group is set to realize local unified management, thereby improving the processing efficiency.
[0091] Please refer to Figure 8 The embodiments of the present application also provide a message command frequency control system, which can implement the above method, and the system comprises:
[0092] An analysis module is configured to receive an original message command, analyze the original message command according to a preset command feature database, and determine command feature information.
[0093] A grouping module is configured to group the original message command according to the command feature information and a preset mapping function, and obtain a target mapping group.
[0094] A calculation module is configured to calculate the original message command according to a preset timestamp array, and determine a timestamp difference value.
[0095] An execution module is configured to perform frequency control on the original message command according to the timestamp difference value and the target mapping group.
[0096] It can be understood that the contents in the above method embodiments are applicable to the present device embodiments, the present device embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0097] The embodiments of the present application also provide an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0098] It can be understood that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the functions same as those of the above method embodiments, and achieve the same beneficial effects as those of the above method embodiments.
[0099] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:
[0100] The processor 901 can be implemented in a manner of a general CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the present application.
[0101] The memory 902 can be implemented in a form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 902 can store an operating system and other application programs. When the technical solutions provided by the present application are implemented by software or firmware, the related program codes are stored in the memory 902 and are called and executed by the processor 901 to implement the above method of the present application.
[0102] The input / output interface 903 is used to realize information input and output.
[0103] The communication interface 904 is used to realize the communication interaction between the present device and other devices. The communication can be realized in a wired manner (for example, a USB, a network cable, etc.) or in a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0104] The bus 905 is used to transmit information between various components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device.
[0105] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other in the device through the bus 905.
[0106] The present application also provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the above method.
[0107] It can be understood that the contents in the above method embodiments are all applicable to the present storage medium embodiments, the present storage medium embodiments specifically implement the functions same as those of the above method embodiments, and achieve the beneficial effects same as those of the above method embodiments.
[0108] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the above method.
[0109] It can be understood that the contents in the above method embodiments are all applicable to the present program product embodiments, the present program product embodiments specifically implement the functions same as those of the above method embodiments, and achieve the beneficial effects same as those of the above method embodiments.
[0110] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0111] The embodiments described in the present application are for more clearly illustrating the technical solutions of the present application, and do not constitute a limitation on the technical solutions provided by the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.
[0112] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.
[0113] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purposes of the present embodiment.
[0114] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0115] The terms "first", "second", "third", "fourth", and the like in the description and in the claims of this application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological mundane operation, reverse order operation, based on circuitry availability, based on stated preference or the like, and that "default" or other orderings are thus permissible. Further, the terms "comprise", "comprising", "include", "including", and the like, are specifically intended to be open-ended. That is, references to individual steps and the like do not suhstantially exclude the presence of two or more of a given step or its integral presence in the process, method, system, article, or apparatus having been made with a wider scope. The use of notation such as "first", "second", "third", etc. does not generally limit the areas, but is used to connect like elements or to distinguish one claim from another. These terms can be used interchangeably when appropriate. Terms concerning the relative position of elements can be interpreted such that their use adheres to their normal meaning, but they can also be interpreted to mean the opposite according to specific claims.
[0116] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0117] In several embodiments provided by the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0118] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the application.
[0119] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0120] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.
[0121] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method of controlling the frequency of message commands, characterized by, The method comprises: receiving an original message command, analyzing the original message command according to a preset command feature database, and determining command feature information; grouping according to the command feature information and a preset mapping function to obtain a target mapping group; wherein the target mapping group is set according to the real-time performance and priority of the original message command; calculating a timestamp difference value according to the original message command and a preset timestamp array; wherein the calculation of the timestamp difference value according to the original message command and the preset timestamp array specifically comprises: parsing the original message command to determine current command ID information, and querying the preset timestamp array according to the current command ID information to determine a query result; if the query result is no historical timestamp, taking current time information as a historical timestamp; if the query result is a historical timestamp, performing a difference operation on the historical timestamp and the current time information to determine the timestamp difference value; controlling the frequency of the original message command according to the timestamp difference value and the target mapping group; wherein the frequency control of the original message command according to the timestamp difference value and the target mapping group specifically comprises: parsing the target mapping group to determine a target frequency value, and comparing the timestamp difference value with the target frequency value; if the timestamp difference value is less than the target frequency value, delaying the original message command or discarding the original message command; if the timestamp difference value is greater than or equal to the target frequency value, sending the original message command to a processing terminal to enable the processing terminal to process the original message command.
2. The method of claim 1, wherein, The grouping according to the command feature information and the preset mapping function to obtain the target mapping group specifically comprises: parsing the command feature information to determine a current command type and current command ID information; matching the current command type with a preset command priority to determine a target priority, and generating grouping ID information according to the target priority, the preset mapping function and the current command ID information; grouping the original message command corresponding to the command feature information according to the grouping ID information to obtain the target mapping group.
3. The method of claim 1, wherein, The method further comprises: if the timestamp difference value is greater than or equal to the target frequency value, parsing the original message command to determine current command ID information; updating the preset timestamp array according to current time information and the current command ID information.
4. The method of claim 1, wherein, The preset command feature database is determined by the following method: obtaining preset system information, parsing the preset system information to determine a preset command list; wherein the preset system information comprises a protocol definition file or system configuration information; extracting features from the preset command list to determine command semantic features, and establishing the preset command feature database according to the command semantic features.
5. A frequency control system of message commands, characterized in that, The system comprises: An analysis module is configured to receive an original message command, analyze the original message command according to a preset command feature database, and determine command feature information. A grouping module is configured to group according to the command feature information and a preset mapping function, and obtain a target mapping group; wherein the target mapping group is set according to real-time performance and priority of the original message command. A calculation module is configured to calculate according to the original message command and a preset timestamp array, and determine a timestamp difference value; wherein the calculation according to the original message command and the preset timestamp array to determine the timestamp difference value specifically includes: parsing the original message command to determine current command ID information, and querying the preset timestamp array according to the current command ID information to determine a query result; if the query result is no historical timestamp, taking current time information as a historical timestamp; if the query result is a historical timestamp, performing difference operation according to the historical timestamp and the current time information to determine the timestamp difference value; An execution module is configured to perform frequency control on the original message command according to the timestamp difference value and the target mapping group; wherein the frequency control on the original message command according to the timestamp difference value and the target mapping group specifically includes: parsing the target mapping group to determine a target frequency value, and comparing the timestamp difference value with the target frequency value; if the timestamp difference value is less than the target frequency value, delaying the original message command or discarding the original message command; if the timestamp difference value is greater than or equal to the target frequency value, sending the original message command to a processing terminal to make the processing terminal process the original message command.
6. An electronic device, comprising: comprising: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the method of any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. The computer program is executed by the processor to implement the method of any one of claims 1 to 4.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Message frequency limiting method and system, server and storage medium
CN108399078A