Alarm system configuration methods, devices, equipment, media and products
By obtaining the parameter set and device status of the alarm system and selecting the target parameter combination that meets the operating conditions for configuration, the downtime problem caused by uncertainty in the parameter configuration of the alarm system in the existing technology is solved, and efficient and accurate parameter configuration and The system operates stably.
Patent Information
- Application Number
- CN202211562826.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-12-07
AI Technical Summary
There is uncertainty in the parameter configuration of the existing alarm system, which leads to the system being easily downtime and cannot ensure accurate operation in real time.
By obtaining the parameter set of the alarm system, determining the status of each device and its corresponding parameter combination, selecting the target parameter combination that meets the operating conditions of the equipment based on the operation data, and performing parameter configuration to achieve efficient and accurate parameter configuration.
It improves the parameter configuration efficiency and accuracy of the alarm system, ensures the stable operation of the system, meets the operating conditions of the equipment, and reduces performance degradation caused by unreasonable parameter settings.
Smart Images

Figure CN115766453B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed technology in computer technology, and in particular to an alarm system configuration method, device, equipment, medium and product. Background Art
[0002] With the rapid development of computer technology, various data processing functions can be configured in electronic devices. In order to realize the normal operation of data processing functions, an alarm system needs to be set up to provide real-time alarms for the data processing functions of electronic devices. For example, a bank system can build a distributed alarm system to realize early warning of electronic devices. A more common alarm system can be a distributed alarm system built through frameworks such as Flink and Spark. The normal operation of the alarm system requires setting multiple parameters, such as parallelism, TaskManager (task management tool / task manager) memory, the number of TaskManagers, etc. Different parameter values can have an important impact on the operation of the alarm system. Therefore, how to select accurate values for the parameters of the alarm system is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present application provides an alarm system configuration method, device, equipment, medium and product to solve the technical problem that the parameters selected for the alarm system cannot ensure the real-time and accurate operation of the alarm system, causing the alarm system to easily crash.
[0004] On the one hand, the present application provides an alarm system configuration method, comprising:
[0005] In response to a system configuration request for an alarm system, obtaining a parameter set of the alarm system, the parameter set including a plurality of configuration parameters of the alarm system;
[0006] Determine a plurality of device states corresponding to the parameter set and a parameter combination corresponding to each device state, wherein the parameter combination includes parameter values corresponding to the plurality of configuration parameters respectively, and the device state includes operation data generated by the alarm system when the electronic device is operated with the corresponding parameter combination;
[0007] According to the operation data respectively corresponding to the plurality of device states, a target device state that meets the device operation condition is selected to obtain a parameter combination associated with the target device state as a target parameter combination;
[0008] The alarm system is configured according to the parameter value of each configuration parameter in the target parameter combination.
[0009] In another aspect, an alarm system configuration device is provided, comprising:
[0010] A response unit, configured to obtain a parameter set of the alarm system in response to a system configuration request for the alarm system, wherein the parameter set includes a plurality of configuration parameters of the alarm system;
[0011] a determination unit, configured to determine a plurality of device states corresponding to the parameter set and a parameter combination corresponding to each device state, wherein the parameter combination includes parameter values corresponding to the plurality of configuration parameters respectively, and the device state includes operation data generated by the alarm system when the electronic device is operating with the corresponding parameter combination;
[0012] A selection unit, configured to select a target device state that meets the device operation condition according to the operation data respectively corresponding to the plurality of device states, so as to obtain a parameter combination associated with the target device state as a target parameter combination;
[0013] A configuration unit is used to perform parameter configuration on the alarm system according to the parameter value of each configuration parameter in the target parameter combination.
[0014] In another aspect, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the first aspect and various possible methods of the first aspect.
[0018] On the other hand, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the first aspect and various possible methods of the first aspect.
[0019] On the other hand, a computer program product is provided, comprising a computer program, which implements the steps of the first aspect and various possible methods of the first aspect when executed by a processor.
[0020] The technical solution provided by the present application can respond to the system configuration request of the alarm system, obtain the parameter set of the alarm system, and the parameter set can include multiple configuration parameters of the alarm system, determine multiple device states corresponding to the parameter set and the parameter combination corresponding to each device state, and each parameter combination can include parameter values corresponding to multiple configuration parameters, so as to realize the acquisition of parameter settings of the alarm system. The device state includes the operation data generated by the alarm system when the electronic device is running with the corresponding parameter combination, that is, the device state can be a data embodiment of the specific operation of the device. Then, according to the operation data corresponding to the multiple device states, the target device state that meets the device operation conditions is selected to obtain the parameter combination associated with the target device state as the target parameter combination, so as to realize the parameter combination as the selection basis of the parameter combination, realize the accurate selection of the parameter combination, and then according to the parameter value of each configuration parameter in the target parameter combination, the alarm system is parameter configured, which can realize efficient and accurate parameter configuration of the alarm system, improve the configuration efficiency and accuracy, and ensure that the configured alarm system can meet the device operation conditions, which can save energy and ensure the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] Figure 1 An example diagram of an application scenario of the alarm system configuration method provided in an embodiment of the present application;
[0023] Figure 2 A flow chart of the alarm system configuration method provided in the embodiment of the present application;
[0024] Figure 3 Another flow chart of the alarm system configuration method provided in the embodiment of the present application;
[0025] Figure 4 A structural example diagram of the alarm system configuration method provided in an embodiment of the present application;
[0026] Figure 5 A structural diagram of an alarm system configuration device provided in an embodiment of the present application;
[0027] Figure 6 A block diagram of an electronic device for implementing an alarm system configuration method provided in an embodiment of the present application.
[0028] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0030] The technical solution of the present application can be applied to the parameter tuning scenario of the alarm system. By combining the configuration parameters of the alarm system and evaluating the use effect of each parameter combination, the target parameter combination is selected using the evaluation score of each parameter combination. This allows the target parameter combination to be adaptively selected based on the use effect of the alarm system, thereby improving the selection efficiency and accuracy of the target parameter combination.
[0031] At present, the alarm system is generally a software system built on the basis of various distributed frameworks, such as Flink framework, Spark framework, etc. Flink is good at stream processing, and Spark is good at batch processing. In order to make the alarm system operate normally, it is necessary to set corresponding parameters for the distributed framework. For example, Flink has many parameter configurations, such as parallelism (how many parallel calculations are performed at the same time), JobManager (control node of the entire cluster) memory, TaskManager (task manager) memory, number of TaskManagers and other configuration parameters. When each configuration parameter is set to a different value, the corresponding state can affect the operating data of the electronic device, such as memory usage, but the distributed framework is not a linear system, and the various parameters are interrelated. Therefore, selecting the correct parameter combination to achieve the normal operation of the alarm system is a technical problem that needs to be solved urgently.
[0032] In order to solve the above problems, an embodiment of the present application obtains a parameter set of an alarm system and configures multiple parameter combinations for the parameter set to evaluate each parameter combination, rotates the parameter combination according to the evaluation score of each parameter combination, and then obtains a target parameter combination whose evaluation score meets certain equipment operating conditions, thereby achieving accurate and efficient acquisition of the target parameter combination.
[0033] The data transmission method provided in this application is intended to solve the above technical problems in the prior art.
[0034] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0035] like Figure 1 As shown, it is an example diagram of an application scenario of the alarm system configuration method provided in an embodiment of the present application. The scenario may include an alarm system 1 and an electronic device 2 for configuring the alarm system. The electronic device 2 is, for example, a cloud server, and the electronic device 2 is, for example, an alarm system for detecting and warning the operation status of a system such as a bank's data processing system. The electronic device 2 can obtain the parameter set of the alarm system 1, and through the technical solution of the present application, obtain multiple device states corresponding to the parameter set of the alarm system and the parameter combination corresponding to each device state, and implement parameter selection to obtain a target parameter combination. The electronic device 2 configures the alarm system using the obtained target parameter combination to obtain an accurate alarm system.
[0036] Figure 2 This is a flowchart of an embodiment of an alarm system configuration method provided in an embodiment of the present application. The method can be applied to a terminal device. The method may include the following steps:
[0037] 201: In response to a system configuration request for an alarm system, obtain a parameter set of the alarm system, where the parameter set includes a plurality of configuration parameters of the alarm system.
[0038] Optionally, the alarm system can be configured in an electronic device, and of course the electronic device can be a computing node in a distributed cluster. In this embodiment, the type of electronic device is not limited too much. The alarm system can be an application program for alarm detection of the service status of the data processing service provided by the electronic device, and when there is an abnormal status, it can promptly issue an early warning prompt.
[0039] Optionally, before executing step 201, a configuration page of the alarm system may be displayed, the configuration page including a system configuration control, and a system configuration request may be generated when it is detected that a user triggers the system configuration control, and the system configuration request may be captured by the electronic device.
[0040] A parameter set may refer to multiple configuration parameters that need to be set when the alarm system is running. For example, a parameter set may include multiple parameters such as parallelism (how many calculations are performed in parallel at the same time), JobManager (the control node of the entire cluster) memory, TaskManager (task manager) memory, and the number of TaskManagers.
[0041] 202: Determine multiple device states corresponding to the parameter set and parameter combinations corresponding to each device state, the parameter combination includes parameter values corresponding to multiple configuration parameters, and the device state includes operation data generated by the alarm system when the electronic device is running with the corresponding parameter combination.
[0042] Optionally, by obtaining the value range of each configuration parameter in the parameter set and setting the parameter value for each configuration parameter, a parameter combination consisting of a parameter value for each configuration parameter can be obtained. The device state can be device usage data generated by the alarm system when the electronic device is running, and different parameter combinations can correspond to different device states. In order to obtain the parameter combination corresponding to the device state, the device operation of the alarm system can be simulated or learned, and the parameter combination corresponding to each device state can be obtained by recording the parameters of the alarm system in different device states.
[0043] The operation data may be the device usage data generated by the alarm system configured as a certain parameter combination for the operation of the electronic device. The operation data may include, for example, one or more of the data such as memory occupancy rate and CPU (central processing unit) consumption rate. The operation data may characterize the specific usage of the electronic device, and whether the electronic device needs to be expanded may be determined through the operation data. Taking the first operation data as the memory occupancy rate as an example, when the memory occupancy rate is above 90%, the memory of the electronic device may be expanded, and when the memory occupancy rate is below 60%, the memory of the electronic device may be reduced.
[0044] 203: Selecting a target device state that meets the device operation condition according to the operation data corresponding to the plurality of device states, so as to obtain a parameter combination associated with the target device state as a target parameter combination.
[0045] Optionally, the device operating condition may include a highest score selection condition, that is, the device state associated with the parameter combination with the highest score may be selected as the target parameter combination.
[0046] 204: Parameter configuration of the alarm system is performed according to the parameter value of each configuration parameter in the target parameter combination.
[0047] The target parameter combination includes parameter values corresponding to multiple configuration parameters in the parameter set. When configuring the alarm system, the alarm system can be specifically controlled to execute the setting operation of each configuration parameter and set each configuration parameter to the corresponding parameter value.
[0048] The technical solution provided by the present application can respond to the system configuration request of the alarm system, obtain the parameter set of the alarm system, and the parameter set can include multiple configuration parameters of the alarm system, determine multiple device states corresponding to the parameter set and the parameter combination corresponding to each device state, and each parameter combination can include parameter values corresponding to multiple configuration parameters, so as to realize the acquisition of parameter settings of the alarm system. The device state includes the operation data generated by the alarm system when the electronic device is running with the corresponding parameter combination, that is, the device state can be a data embodiment of the specific operation of the device. Then, according to the operation data corresponding to the multiple device states, the target device state that meets the device operation conditions is selected to obtain the parameter combination associated with the target device state as the target parameter combination, so as to realize the parameter combination as the selection basis of the parameter combination, realize the accurate selection of the parameter combination, and then according to the parameter value of each configuration parameter in the target parameter combination, the alarm system is parameter configured, which can realize efficient and accurate parameter configuration of the alarm system, improve the configuration efficiency and accuracy, and ensure that the configured alarm system can meet the device operation conditions, which can save energy and ensure the stable operation of the system.
[0049] As an embodiment, step 203 selects a target device state that meets the device operation condition according to the operation data corresponding to the multiple device states, which may include:
[0050] According to the operation data respectively corresponding to the plurality of device states, a device state matching the service environment of the alarm system is selected as the target device state.
[0051] Optionally, the service environment may refer to factors that affect data traffic, such as the usage period of the alarm system, network status, holidays, etc. The usage period may include any one of a peak period, a normal period, and a low period. Different usage periods may be associated with different device operation data, and the device operation data in the peak period is higher than the device operation data in the normal period, and the device operation data in the normal period is higher than the device operation data in the low period. The device operation data associated with different time periods can be used to select the parameter combination corresponding to the time period. In addition, network status, holidays, etc. can all be used as influencing factors to participate in the selection process of the target device status, so as to achieve refined selection of the target device status from multiple angles and improve the accuracy of selecting the target device status.
[0052] In an embodiment of the present application, when selecting a target parameter combination, a target device state that matches the service environment of the alarm system and satisfies the device operating conditions can be selected, so that the target device state is associated with the operating environment, and the target parameter combination setting is more matched with the parameter requirements and the environmental requirements of the alarm system, thereby reducing the phenomenon of decreased alarm system performance due to unreasonable parameter settings.
[0053] Further, based on the above embodiment, according to the operation data corresponding to the multiple device states, selecting the device state matching the service environment of the alarm system as the target device state may include:
[0054] Obtain the service pressure of the alarm system in the service environment;
[0055] A target device state matching the service pressure is selected from the operating data corresponding to each of the plurality of device states.
[0056] Among them, service pressure can be used as one of the factors of service environment. Service pressure can refer to the data flow size of the data processing system monitored by the alarm system. The service pressure can be characterized by data flow. The larger the data flow, the greater the service pressure, and the smaller the data flow, the smaller the service pressure.
[0057] The operation data is proportional to the service pressure. The greater the service pressure, the greater the operation data, and the smaller the service pressure, the smaller the operation data. Therefore, the operation data adapted to the size of the service pressure can be selected, that is, the alarm system corresponding to the operation data can handle the alarm service under the service pressure. For example, when the service pressure is greater than the flow threshold, it can be determined that the service environment is a peak period, and 80% matching the peak period can be selected as the operation data. When the service pressure is less than the second flow threshold, it can be determined that the service environment is a normal period, and 60% matching the normal period can be selected as the operation data. That is, a mapping relationship between different operation data intervals and data flow areas can be set, and the operation data interval associated with the data flow interval where the service pressure obtained in real time is located can be queried through the mapping relationship to obtain the target device state corresponding to the target operation data.
[0058] In an embodiment of the present application, the service pressure of the alarm system in a service environment can be obtained, and a target device state that matches the service pressure is selected from the operating data corresponding to a plurality of device states, so that the target device state can meet the early warning requirements of the service pressure. By selecting the target device state on the basis of matching the service pressure of the alarm system, effective tuning of parameters can be achieved, which can improve the efficiency and accuracy of parameter combination selection.
[0059] As another example, Figure 3 As shown, it is a flowchart of an embodiment of an alarm system configuration method provided by an embodiment of the present application. The method can be applied to a terminal device. Step: 202, determining multiple device states corresponding to a parameter set and a parameter combination corresponding to each device state, can include:
[0060] 301: Generate a state table corresponding to the parameter set through a learning algorithm based on function values, wherein the state table includes a plurality of continuous device states and a first score and a second score associated with each device state, wherein the first score is an expected score generated by performing a first parameter adjustment on the corresponding device state, and the second score is an expected score generated by performing a second parameter adjustment on the corresponding device state.
[0061] Among them, the learning algorithm based on function value can refer to the Q_Learning (Q table learning) algorithm. Through the function-based learning algorithm, the operation model of the alarm system can be learned to obtain the operation data of the electronic device generated when the alarm system is running under different parameter combinations. The operation data can represent different device states to accurately guarantee the specific operation of the electronic device.
[0062] The device status may be the usage data of the hardware device when the electronic device runs the alarm system, for example, it may include memory occupancy rate, etc. Both the first parameter adjustment and the second parameter adjustment may be actions to adjust the parameters of the alarm system, that is, parameter adjustment actions, and specifically may be execution commands to adjust the configuration parameters according to a preset parameter adjustment strategy.
[0063] The scores corresponding to the device states, such as the first score and the second score, can be calculated by the score formula in the function value-based learning algorithm. The score formula can be expressed as:
[0064] Q(s,a)←Q(s,a)+α[r+γmaXQ(s1,a1)-Q(s,a)]
[0065] Formula 1
[0066] Wherein, Si is the device operation parameter, such as the first operation parameter, S1 represents the initial state, S2 represents the second state, and so on. γ can be the set initial attenuation coefficient, for example, it can be taken as 0.8, and a is the learning efficiency, for example, it can be taken as 0.01. Set a1 to add the minimum unit of the parameter combination, and a2 to reduce the minimum unit of the parameter combination. A state can include parameter adjustment actions and states, and the value of the state can be device usage parameters such as memory usage when executing a1 and a2.
[0067] 302: Acquire initial operation data corresponding to the initial device state to obtain a parameter combination of the alarm system when the initial operation data is running, and obtain a parameter combination of the initial device state.
[0068] The state table can be obtained, which may include the first state and the corresponding first parameter adjustment and second parameter adjustment, with S1 as the first state, S2 as the second state, S3 as the third state, Sn as the nth state, and so on. A state table can be obtained, which can be shown in Table 1 below, for example.
[0069]
[0070]
[0071] In Table 1, Q(si, a1) can be the first score of state Si, Q(si, a2) can be the second score of state Si, i is a positive integer greater than or equal to 1 and less than or equal to n, specifically representing the evaluation scores of various state parameters obtained by calculating the Q value of the S1 state according to the parameter combination obtained after adjusting the parameters a1 or a2.
[0072] Taking Table 1 as an example, Q(s1, a1) is in the S1 state, and the first score is generated by the parameters adjusted by a1. Q(s1, a2) is in the S1 state, and the second score can be generated by the parameters adjusted by a2.
[0073] 303: Starting from the second device state, based on the state table, the parameter combination of each device state is determined in turn to obtain parameter combinations corresponding to the plurality of device states.
[0074] In this embodiment, the state table is learned to accurately obtain multiple device states, and the parameter combination associated with the score corresponding to each device state is read, so as to achieve efficient and accurate acquisition of the device state and the parameter combination of the device state.
[0075] Further, based on the above embodiment, step 303: determining the parameter combination of each device state in turn based on the state table may include:
[0076] Determine the current first device state according to the order of each device state;
[0077] Obtain the maximum score of a first score and a second score associated with a previous device state of the first device state to obtain a target score;
[0078] The parameter combination obtained by performing corresponding parameter adjustment on the device state associated with the target score is used as the parameter combination corresponding to the first device state, and the sequence of the device states is returned to determine that the first device state continues to be executed until the parameter combination of each device state is obtained.
[0079] In this embodiment, the current first device state can be determined according to the order of each device state. By obtaining the maximum score of the first score and the second score associated with the previous device state of the first device state, the maximum score of the first device state can be obtained, so that the parameter combination corresponding to the higher score is used as the target parameter combination, so that the selection of the target parameter combination depends on the accurate score of the device, thereby improving the efficiency and accuracy of obtaining the device score.
[0080] Further, based on the above embodiment, step 301: obtaining a state table corresponding to a parameter set through a learning algorithm based on function value includes:
[0081] A second parameter combination of the current operation of the alarm system and equipment operation data of the electronic equipment operating the alarm system are detected.
[0082] An initial state is determined according to the equipment operation data, and the second parameter combination is used as the parameter combination corresponding to the initial state.
[0083] According to the initial state and the parameter combination corresponding to the initial state, a first score and a second score corresponding to the initial state are determined, and the initial state and the first score and the second score associated with the initial state are added to the state table.
[0084] Starting from the initial state, the next device state is generated according to the first score and the second score corresponding to the current second device state, and the first score and the second score associated with the next device state are obtained. The next device state and its first score and the second score are added to the state table until the second device state meets the convergence condition, the state iteration is stopped, and the state table of the terminated state iteration is obtained.
[0085] Optionally, in the initial stage of iterative updating, multiple states may all be initialization states, that is, the initial state may be obtained. In order to obtain a more timely initial state, the device operation data generated when the alarm system is running in real time and the second parameter combination configured when the alarm system is running may be used to determine it. The initial state may correspond to S1 in Table 1, for example, and the target operation state corresponds to sn in Table 1. When the target operation state is not reached, the parameters may be adjusted by performing actions a1 and a2 simultaneously to obtain the first parameter combination and the second parameter combination. The changes in memory usage are observed and the scores of the two parameter combinations are obtained at the same time. The state table may be continuously updated by iterating the new device state to achieve iteration of the state table.
[0086] Taking the above Table 1 as an example, assuming that the operating data in the S1 state is 90%, the parameter combination corresponding to S1 can be adjusted by using a1 and a2 to obtain the first parameter combination and the second parameter combination. Assuming that the device operating data generated by the S1 device state in the alarm system simulation is 90%, after the operation of the S1 state is adjusted according to a1 and a2, the corresponding first estimated state is 89% and the second estimated state is 91%. The first score of the first parameter combination and the second score of the second parameter combination can be obtained through the scoring formula.
[0087] The memory usage of the first parameter combination is reduced by 1%, and the memory usage of the second parameter combination is increased by 1%. The memory usage is a kind of device operation data. The data difference of the device operation data is opposite to the positive and negative scores. The parameter score that is reduced by 1% can be positive, and the parameter score that is increased by 1% can be negative, as shown in Table 2 below.
[0088]
[0089] Table 2
[0090] After that, the operation data corresponding to the high score "1" 89% (90% - 1%) can be selected as the first operation data of the next state S2, and the parameter adjustment actions of a1 and a2 are performed again on the device state in the S2 state to obtain a new device state. After the first parameter combination and the second parameter combination are run, for example, a1 is reduced by 4% and a1 is increased by 2%, the first score corresponding to the S2 state is 4, and the score corresponding to the second state is -2, as shown in Table 3 below.
[0091]
[0092] Table 3
[0093] In the embodiment of the present application, when the state table is initialized, the second parameter combination when the alarm system is running in real time and the corresponding device operation data of the second parameter combination can be obtained to realize the real-time detection of the alarm system. Afterwards, the device operation data can be used as the initial state, and the second parameter combination can be used as the parameter combination corresponding to the initial state. The first score and the second score of the initial state are determined by the initial state and the parameter combination corresponding to the initial state, and the initial state and the first score and the second score associated with the initial state are added to the state table to realize the establishment of the first state in the state table. Then, starting from the initial state, according to the first score and the second score corresponding to the current second device state, the next device state is generated, and the first score and the second score associated with the next device state are obtained, and the next device state and its first score and the second score are added to the state table until the second device state meets the convergence condition, the state iteration is stopped, and the state table of the termination state iteration is obtained. Through the iteration of the device state and the adjustment of the parameter combination and the scoring and other processing, the other states in the state table are accurately obtained until convergence, and the accurate learning of the state table is realized.
[0094] Further, based on the above embodiment, the initialization state table may include:
[0095] Acquire a second parameter combination when the alarm system is running in real time and second operating data generated by the second parameter combination in the electronic device;
[0096] Obtain target operation data of the alarm system;
[0097] The second operation data is used as the initial state and the target operation data is used as the final state, and a plurality of states from the initial state to the final state are determined.
[0098] According to the second parameter combination, combined with the preset parameter adjustment strategy, the parameter adjustment action of the initial state is generated, and starting from the second state, the parameter adjustment action of the current state is generated based on the device state of the previous state combined with the parameter adjustment strategy, and an association relationship between each state and its corresponding parameter adjustment action is established.
[0099] According to the parameter adjustment action associated with each state, the score corresponding to each state is initialized to obtain the initial score of each state, so as to obtain an initialized state table consisting of multiple states and the initial score of each state.
[0100] In the embodiment of the present application, the second operation data and the target operation data are obtained, and the iterative termination condition of the learning algorithm can be determined, and then based on the second parameter combination, the parameter adjustment strategy is used to continuously learn and obtain the first score and the second score of each device state, so that the learning algorithm continuously learns the accurate score of each state. By iteratively updating the state table, the data in the state table can be made to better match the actual operation state of the alarm system, and the score of each state can be more accurate.
[0101] Further, based on the above embodiment, according to the first score and the second score corresponding to the current second device state, the next device state is generated, and the first score and the second score associated with the next device state are obtained, including:
[0102] Performing a first parameter adjustment on the current second device state to obtain a first parameter combination;
[0103] Performing a second parameter adjustment on the second device state to obtain a second parameter combination;
[0104] A first estimated state generated by the predictive alarm system when operating with a first parameter combination;
[0105] predicting a second estimated state of the alarm system when operating with a second parameter combination;
[0106] determining a first score for the first parameter combination based on a state difference between the second device state and the first estimated state;
[0107] determining a second score for the second parameter combination based on a state difference between the second device state and the second estimated state;
[0108] Selecting a target score with the highest score from the first score and the second score, and determining an estimated state corresponding to the target score as a next device state;
[0109] A first score of a first parameter combination and a second score of a second parameter combination associated with a next device state are obtained.
[0110] Optionally, the device state may include device operation data. The state difference between the second device state and the second device state may refer to the data difference between the first operation data and the second operation data. For example, the first estimated state is 90%, the second device state is 89%, and the state difference may be -1%. The positive and negative signs of the device state and the score value are opposite, and the device difference is a positive number, indicating that the parameter combination increases the device operation pressure. Therefore, for a negative device difference of -1, the corresponding first parameter combination can be determined to be 1. If the device difference corresponding to the second parameter combination is 1%, for a positive device difference of 1%, the corresponding second parameter combination can be determined to be -1.
[0111] In the embodiment of the present application, when scoring the device state, accurate parameter expansion can be achieved on the basis of the original first parameter combination through two steps: adjusting the parameter combination and estimating the device state. Afterwards, the score of the parameter combination can be determined by the state difference, so as to accurately determine the operating effect of each parameter combination. Then, the highest target score of the first score and the second score is used to select the device state. The higher the score of the parameter combination, the higher the possibility of parameter utilization, and then the high score of the estimated state corresponding to the target score can be selected, and the parameter combination with excellent state can be obtained and added to the state table to improve the accuracy of the state table.
[0112] Further, based on the above embodiment, after obtaining the first score of the first parameter combination and the second score of the second parameter combination associated with the next device state, the method further includes:
[0113] The first score and the second score associated with the second device state are updated according to the first score and the second score associated with the next device state.
[0114] The second device state may be a previous device state of the next device state described in the embodiment.
[0115] Optionally, the first score and the second score of the previous device state of the next device state can be updated by the score formula of the above embodiment. For example, the first score and the second score of the S1 state can be updated by the S2 state and the score formula in Table 3. The specific update steps can be expressed as:
[0116] Q(s1,a1)=1+0.01*(4+0.8*1-1)=1.038
[0117] Q(s2,a2)=-1+0.01*(-2+4*0.8-(-1))=-0.972
[0118] The updated status table is shown in Table 4:
[0119]
[0120] Table 4
[0121] The first score corresponding to state S1 in Table 4 has been updated to 1.038, and the second score has been updated to -0.972.
[0122] In the embodiment of the present application, the first score and the second score associated with the next device state update the first score and the second score associated with the second device state, so that the score result of the next device state after the second device state provides score feedback for the second device state, and the score of the previous device state is more accurate, thereby realizing iterative update of the existing device state scores and improving the accuracy and precision of score acquisition.
[0123] For ease of understanding, each processing node is set up in a modular manner, such as Figure 4 As shown, it is a structural example diagram of the alarm system configuration method provided by the embodiment of the present application, the alarm system 401 can be connected to the parameter detection system 402, and the parameter detection system 402 can detect the second parameter combination when the alarm system 401 is running in real time and the device operation data generated by the second parameter combination in the electronic device. The parameter detection system 402 can establish a connection with the learning system 403 of the learning algorithm of Q_Learning. The parameter detection system 402 can send the detected second parameter combination and the device operation data to the learning system 403. Reinforcement learning is performed by the learning system 403 to obtain a state table, and multiple device states and parameter combinations of each device state are obtained through the state table, and the target parameter combination is obtained in combination with the alarm system adjustment algorithm of the present application. The learning system 403 can send the target parameter combination to the parameter automatic adjustment module 404. The parameter automatic adjustment module 404 can adjust the parameters of multiple configuration parameters in the alarm system so that the value of each configuration parameter is the parameter value corresponding to the target parameter combination in the configuration parameter.
[0124] like Figure 5 FIG. 5 is a schematic diagram of a structure of an embodiment of an alarm system configuration device provided in an embodiment of the present application. The alarm system configuration device 500 may include:
[0125] Responding unit 501: used to respond to a system configuration request for an alarm system and obtain a parameter set of the alarm system, the parameter set including a plurality of configuration parameters of the alarm system;
[0126] Determining unit 502: used to determine multiple device states corresponding to the parameter set and parameter combinations corresponding to each device state, the parameter combination includes parameter values corresponding to multiple configuration parameters, and the device state includes operation data generated by the alarm system when the electronic device is running with the corresponding parameter combination;
[0127] A selection unit 503 is used to select a target device state that meets the device operation condition according to the operation data corresponding to the multiple device states, so as to obtain a parameter combination associated with the target device state as a target parameter combination;
[0128] Configuration unit 504: configured to perform parameter configuration on the alarm system according to the parameter value of each configuration parameter in the target parameter combination.
[0129] As an embodiment, the selecting unit 503 may include:
[0130] The selection module is used to select a device state that matches the service environment of the alarm system as a target device state according to the operation data corresponding to the multiple device states.
[0131] As yet another embodiment, the selection module may include:
[0132] An acquisition submodule, used to acquire the service pressure of the alarm system under the service environment;
[0133] The selection submodule is used to select a target device state that matches the service pressure from the operation data corresponding to the multiple device states.
[0134] As an embodiment, the determining unit may include:
[0135] A state learning module, used to generate a state table corresponding to a parameter set by a learning algorithm based on a function value, wherein the state table includes a plurality of continuous device states and a first score and a second score associated with each device state, wherein the first score is an expected score generated by adjusting the first parameter for the corresponding device state, and the second score is an expected score generated by adjusting the second parameter for the corresponding device state;
[0136] A first acquisition module is used to acquire initial operation data corresponding to the initial device state, so as to obtain a parameter combination of the alarm system when the initial operation data is running, and to obtain a parameter combination of the initial device state;
[0137] The second acquisition module is used to determine the parameter combination of each device state in turn based on the state table starting from the second device state, so as to obtain the parameter combinations corresponding to the multiple device states respectively.
[0138] As yet another embodiment, the second acquisition module includes:
[0139] A first acquisition submodule, used to determine the current first device state according to the order of each device state;
[0140] A score comparison submodule, used to obtain the maximum score of a first score and a second score associated with a previous device state of the first device state, to obtain a target score;
[0141] The combination acquisition submodule is used to use the parameter combination obtained by executing the corresponding parameter adjustment of the device state associated with the target score as the parameter combination corresponding to the first device state, return to the order of each device state, and determine that the first device state continues to be executed until the parameter combination of each device state is obtained.
[0142] As yet another embodiment, the state learning module includes:
[0143] The data detection submodule is used to detect the second parameter combination currently running the alarm system and the equipment operation data of the electronic equipment running the alarm system.
[0144] A state initialization submodule, used to determine an initial state according to the equipment operation data, and use the second parameter combination as a parameter combination corresponding to the initial state;
[0145] An initial determination submodule, used to determine a first score and a second score corresponding to the initial state according to the initial state and a parameter combination corresponding to the initial state, and add the initial state and the first score and the second score associated with the initial state to the state table;
[0146] The state acquisition submodule is used to start from the initial state, generate the next device state according to the first score and the second score corresponding to the current second device state, and obtain the first score and the second score associated with the next device state, and add the next device state and its first score and the second score to the state table until the second device state meets the convergence condition, stop the state iteration, and obtain the state table of the terminated state iteration.
[0147] As another embodiment, the status acquisition submodule may be specifically used for:
[0148] Perform a first parameter adjustment on the current second device state to obtain a first parameter combination; perform a second parameter adjustment on the second device state to obtain a second parameter combination; predict a first estimated state generated by the alarm system when the first parameter combination is running; predict a second estimated state generated by the alarm system when the second parameter combination is running; determine a first score for the first parameter combination based on a state difference between the second device state and the first estimated state; determine a second score for the second parameter combination based on a state difference between the second device state and the second estimated state; select a target score with the highest score from the first score and the second score, and determine the estimated state corresponding to the target score as the next device state; obtain a first score for the first parameter combination associated with the next device state and a second score for the second parameter combination.
[0149] As another embodiment, the status acquisition submodule may also be used for:
[0150] The first score and the second score associated with the second device state are updated according to the first score and the second score associated with the next device state.
[0151] Figure 6It is a block diagram of an electronic device according to an exemplary embodiment. The device can be configured with an alarm system, and can specifically be a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a notebook, and other types of devices.
[0152] The device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0153] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0154] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0155] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
[0156] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0157] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0158] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0159] The sensor assembly 614 includes one or more sensors for providing various aspects of state determination for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, the sensor assembly 614 can also detect changes in the position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0160] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0161] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0162] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by the processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0163] Optionally, the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the alarm system configuration method.
[0164] Optionally, the present application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the alarm system configuration method.
[0165] Optionally, the present application also provides a computer program product, including a computer program, which is implemented when the computer program is executed by a processor.
[0166] Optionally, the present application also provides a non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to execute the above-mentioned alarm system configuration method.
[0167] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0168] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for configuring an alarm system, characterized in that: include: In response to a system configuration request for an alarm system, obtaining a parameter set of the alarm system, the parameter set including a plurality of configuration parameters of the alarm system; Determine a plurality of device states corresponding to the parameter set and a parameter combination corresponding to each device state, wherein the parameter combination includes parameter values corresponding to the plurality of configuration parameters respectively, and the device state includes operation data generated by the alarm system when the electronic device is operated with the corresponding parameter combination; According to the operation data respectively corresponding to the plurality of device states, a target device state that meets the device operation condition is selected to obtain a parameter combination associated with the target device state as a target parameter combination; Performing parameter configuration on the alarm system according to the parameter value of each configuration parameter in the target parameter combination; The determining of the plurality of device states corresponding to the parameter set and the parameter combination corresponding to each device state includes: Generate a state table corresponding to the parameter set by a learning algorithm based on function values, the state table including a plurality of continuous device states and a first score and a second score associated with each device state, the first score being an expected score generated by performing a first parameter adjustment on the corresponding device state, and the second score being an expected score generated by performing a second parameter adjustment on the corresponding device state; Acquire initial operation data corresponding to the initial device state to obtain a parameter combination of the alarm system when the initial operation data is running, and obtain a parameter combination of the initial device state; Starting from the second device state, based on the state table, sequentially determine the parameter combination of each device state to obtain parameter combinations corresponding to a plurality of the device states respectively; The obtaining of the state table corresponding to the parameter set by a learning algorithm based on function value includes: Detecting a second parameter combination currently running the alarm system and device operation data of an electronic device running the alarm system; Determine an initial state according to the equipment operation data, and use the second parameter combination as the parameter combination corresponding to the initial state; Determine a first score and a second score corresponding to the initial state according to the initial state and a parameter combination corresponding to the initial state, and add the initial state and the first score and the second score associated with the initial state to the state table; Starting from the initial state, according to the first score and the second score corresponding to the current second device state, a next device state is generated, and the first score and the second score associated with the next device state are obtained, and the next device state and its first score and the second score are added to the state table until the second device state meets the convergence condition, and the state iteration is stopped to obtain the state table of the terminated state iteration; The step of generating a next device state according to the first score and the second score corresponding to the current second device state, and obtaining the first score and the second score associated with the next device state includes: Performing a first parameter adjustment on the current state of the second device to obtain a first parameter combination; Performing a second parameter adjustment on the second device state to obtain a second parameter combination; predicting a first estimated state of the alarm system when the first parameter combination is operated; predicting a second estimated state of the alarm system when the second parameter combination is operated; determining a first score for the first parameter combination based on a state difference between the second device state and the first estimated state; determining a second score for the second parameter combination according to a state difference between the second device state and the second estimated state; Selecting a target score with the highest score from the first score and the second score, and determining an estimated state corresponding to the target score as the next device state; A first score of the first parameter combination and a second score of the second parameter combination associated with the next device state are obtained.
2. The method according to claim 1, characterized in that The step of selecting a target device state that meets the device operation condition according to the operation data respectively corresponding to the plurality of device states includes: According to the operation data respectively corresponding to the plurality of device states, a device state matching the service environment of the alarm system is selected as the target device state.
3. The method according to claim 2, characterized in that The selecting, according to the operation data respectively corresponding to the plurality of device states, a device state matching the service environment of the alarm system as the target device state comprises: Obtaining the service pressure of the alarm system under the service environment; A target equipment state matching the service pressure is selected from the operation data respectively corresponding to the plurality of equipment states.
4. The method according to claim 3, characterized in that The step of sequentially determining the parameter combination of each device state based on the state table includes: Determine the current first device state according to the order of each device state; Obtain the maximum score of a first score and a second score associated with a previous device state of the first device state to obtain a target score; The parameter combination obtained by performing corresponding parameter adjustment on the device state associated with the target score is used as the parameter combination corresponding to the first device state, and the sequence of the device states is returned to determine that the first device state continues to be executed until the parameter combination of each device state is obtained.
5. The method according to claim 1, characterized in that After obtaining the first score of the first parameter combination and the second score of the second parameter combination associated with the next device state, the method further includes: The first score and the second score associated with the second device state are updated according to the first score and the second score associated with the next device state.
6. An alarm system configuration device, characterized in that: include: A response unit, configured to obtain a parameter set of the alarm system in response to a system configuration request for the alarm system, wherein the parameter set includes a plurality of configuration parameters of the alarm system; a determination unit, configured to determine a plurality of device states corresponding to the parameter set and a parameter combination corresponding to each device state, wherein the parameter combination includes parameter values corresponding to the plurality of configuration parameters respectively, and the device state includes operation data generated by the alarm system when the electronic device is operating with the corresponding parameter combination; A selection unit, configured to select a target device state that meets the device operation condition according to the operation data respectively corresponding to the plurality of device states, so as to obtain a parameter combination associated with the target device state as a target parameter combination; A configuration unit, configured to perform parameter configuration on the alarm system according to the parameter value of each configuration parameter in the target parameter combination; The determining unit comprises: a state learning module, configured to generate a state table corresponding to the parameter set by a learning algorithm based on function values, wherein the state table includes a plurality of continuous device states and a first score and a second score associated with each device state, wherein the first score is an expected score generated by adjusting the first parameter for the corresponding device state, and the second score is an expected score generated by adjusting the second parameter for the corresponding device state; A first acquisition module is used to acquire initial operation data corresponding to an initial device state, so as to obtain a parameter combination of the alarm system when the initial operation data is running, and to obtain a parameter combination of the initial device state; A second acquisition module is used to determine the parameter combination of each device state in turn based on the state table starting from the second device state, so as to obtain parameter combinations corresponding to a plurality of the device states respectively; The state learning module comprises: A data detection submodule, used to detect a second parameter combination currently running the alarm system, and device operation data of an electronic device running the alarm system; A state initialization submodule, used to determine an initial state according to the equipment operation data, and use the second parameter combination as the parameter combination corresponding to the initial state; an initial determination submodule, configured to determine a first score and a second score corresponding to the initial state according to the initial state and a parameter combination corresponding to the initial state, and add the initial state and the first score and the second score associated with the initial state to the state table; a state acquisition submodule, configured to generate a next device state starting from the initial state according to the first score and the second score corresponding to the current second device state, obtain the first score and the second score associated with the next device state, add the next device state and its first score and the second score to the state table, stop the state iteration, and obtain the state table of the terminated state iteration until the second device state meets the convergence condition; The state acquisition submodule is specifically used to perform a first parameter adjustment on the current state of the second device to obtain a first parameter combination; Performing a second parameter adjustment on the second device state to obtain a second parameter combination; predicting a first estimated state of the alarm system when the first parameter combination is operated; predicting a second estimated state of the alarm system when the second parameter combination is operated; determining a first score for the first parameter combination based on a state difference between the second device state and the first estimated state; determining a second score for the second parameter combination according to a state difference between the second device state and the second estimated state; Selecting a target score with the highest score from the first score and the second score, and determining an estimated state corresponding to the target score as the next device state; A first score of the first parameter combination and a second score of the second parameter combination associated with the next device state are obtained.
7. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.
9. A computer program product, comprising a computer program, which implements the steps of the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Processor dynamic control method, electronic equipment and storage medium
CN113946428A
Parameter configuration method, device and equipment of search engine and storage medium
CN114861039A