Program optimization method and system, computer equipment and storage medium
The mining lamp program is optimized through the group intelligent optimization algorithm, which solves the problem of low operation efficiency of the mining lamp program, and achieves efficient operation that meets real-time requirements, improving miner safety.
Patent Information
- Application Number
- CN202411247950.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
AI Technical Summary
The mining lamp program is inefficient in operation and cannot meet the real-time requirements, which affects the safety of miners in harsh environments.
Using preset parameters, group intelligent optimization algorithm is used to obtain monitoring and query tasks input by users, data preprocessing, task word segmentation grammar determination, task entity recognition and optimization are carried out, initial data sets are generated, group intelligent optimization is performed, and fitness screening is evaluated. As a result, the user interaction interface is optimized.
It improves the operation efficiency of the mining lamp program, meets the real-time requirements, and improves the safety of miners in the mine environment.
Smart Images

Figure CN119204027A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of mobile application development, and in particular to a program optimization method, system, computer device and storage medium. Background Art
[0002] In modern society, the development of mining lamp technology is changing with each passing day. As an important safety equipment in coal mines, mines and other underground workplaces, the performance of mining lamps directly affects the life safety and work efficiency of miners. In order to ensure that miners can work normally in harsh environments, mining lamps not only need to provide sufficient lighting, but also need to have waterproof and explosion-proof properties.
[0003] With the advancement of technology, in addition to the above features, mining lamps have also begun to integrate more functions, such as GPS positioning, environmental monitoring, surveillance video, etc. However, the increase in functions also means higher requirements for the intelligence of mining lamps.
[0004] At present, in terms of program algorithms for controlling the operation of mining lamps, serial programming is still commonly used, that is, the program functions are completed by gradually executing each step. Although this method can meet the basic safety lighting needs, it has limitations in functional scalability and intelligence. When processing large-scale data, it may lead to low program efficiency and fail to meet real-time requirements, affecting the safety of miners in mines and other environments. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a program optimization method, system, computer device and storage medium to solve the technical problem of low operating efficiency of the mining lamp program.
[0006] In order to solve the above technical problems, the present application provides a program optimization method, which adopts the following technical solution:
[0007] A program optimization method comprises the following steps:
[0008] Get the monitoring query task input by the user;
[0009] Performing data preprocessing on the monitoring query task to obtain task data;
[0010] Determining task word segmentation syntax according to the task data;
[0011] According to the task word segmentation syntax, identifying the task entity corresponding to the task data;
[0012] A swarm intelligence optimization algorithm with preset parameters is used to optimize according to the task segmentation grammar and the task entity to obtain an optimization result of the monitoring query task.
[0013] Furthermore, the step of using the swarm intelligence optimization algorithm with preset parameters to optimize according to the task segmentation syntax and the task entity to obtain the optimization result of the monitoring query task specifically includes:
[0014] Randomly generate an initial data set according to the task segmentation grammar and the task entity;
[0015] According to the preset parameters, the initial data set is optimized by swarm intelligence to obtain an optimized data set;
[0016] The fitness of each data string in the optimized data set is evaluated, and a target data string is selected according to the fitness as the optimization result.
[0017] Furthermore, before the step of optimizing the swarm intelligence optimization algorithm using preset parameters according to the task segmentation grammar and the task entity to obtain the optimization result of the monitoring query task, it also includes:
[0018] According to the user's instructions, the parameters corresponding to the swarm intelligence optimization algorithm are set to obtain the preset parameters, which include population size, maximum number of iterations, crossover probability and mutation probability.
[0019] Furthermore, the step of determining the task word segmentation syntax according to the task data specifically includes:
[0020] Perform word segmentation according to the task data to obtain task phrases;
[0021] Performing part-of-speech tagging on the task phrase to obtain a part-of-speech tagging result;
[0022] The task segmentation grammar is determined according to the part-of-speech tagging result.
[0023] Furthermore, the step of identifying the task entity corresponding to the task data according to the task word segmentation syntax specifically includes:
[0024] Inputting the task data into a preset named entity recognition model;
[0025] According to the task segmentation grammar, the task data is identified through the named entity recognition model to obtain the task entity.
[0026] Furthermore, the step of performing data preprocessing on the monitoring query task to obtain task data specifically includes:
[0027] Converting the monitoring query task into standardized data;
[0028] Invalid values are deleted and missing values are supplemented for the standardized data to obtain the task data.
[0029] Furthermore, the step of using the swarm intelligence optimization algorithm with preset parameters to optimize according to the task segmentation syntax and the task entity to obtain the optimization result of the monitoring query task specifically includes:
[0030] The user interaction interface is optimized according to the optimization result.
[0031] In order to solve the above technical problems, the embodiment of the present application also provides a program optimization system, which adopts the following technical solution:
[0032] A program optimization system, comprising:
[0033] The acquisition module is used to obtain the monitoring query task input by the user;
[0034] A processing module, used for performing data preprocessing on the monitoring query task to obtain task data;
[0035] A determination module, used to determine the task segmentation syntax according to the task data;
[0036] An identification module, used for identifying the task entity corresponding to the task data according to the task segmentation syntax;
[0037] The optimization module is used to adopt a swarm intelligence optimization algorithm with preset parameters to optimize according to the task segmentation syntax and the task entity to obtain the optimization result of the monitoring query task.
[0038] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0039] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the program optimization method described above when executing the computer-readable instructions.
[0040] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0041] A computer-readable storage medium stores computer-readable instructions, which implement the steps of the program optimization method described above when executed by a processor.
[0042] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0043] The program optimization method disclosed in the present application obtains the monitoring query task input by the user; performs data preprocessing on the monitoring query task to obtain task data; then determines the task word segmentation syntax based on the task data; and then identifies the task entity corresponding to the task data based on the task word segmentation syntax; thereby adopting a swarm intelligence optimization algorithm with preset parameters to optimize the task word segmentation syntax and the task entity to obtain the optimization result of the monitoring query task. The present application optimizes the monitoring query task by accurately identifying the task word segmentation syntax and the task entity, combined with the swarm intelligence optimization algorithm, to achieve the optimization of the miner's lamp program, thereby improving the operating efficiency of the miner's lamp program and enabling the miner's lamp program to meet the real-time requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0046] Figure 2 is a flow chart of an embodiment of a program optimization method according to the present application;
[0047] Figure 3 is a schematic diagram of the structure of an embodiment of a program optimization system according to the present application;
[0048] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0050] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0052] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0053] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0054] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, and the like.
[0055] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0056] It should be noted that the program optimization method provided in the embodiment of the present application is generally executed by a server, and accordingly, the program optimization system is generally set in the server.
[0057] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0058] Continue to refer Figure 2 , shows a flow chart of an embodiment of a program optimization method according to the present application. The program optimization method comprises the following steps:
[0059] Step S201, obtaining a monitoring query task input by a user.
[0060] In this embodiment, the electronic device (eg, Figure 1 The server / terminal device shown in the figure can send or receive data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future.
[0061] It should be noted that the swarm intelligence optimization algorithm is a computational method that simulates the behavior of biological groups in nature (such as bird foraging, fish migration, etc.). The algorithm uses a set of simple rules to guide multiple simple individuals (called "agents" or "particles") to collaborate in the search space to find the optimal solution, and finally form an optimal solution set to solve complex optimization problems. Common swarm intelligence optimization algorithms include particle swarm optimization (PSO), genetic algorithm (GA), etc.
[0062] Specifically, the monitoring query task is a task generated by the monitoring query request issued by the user during the daily operation of the program. The program optimization system (hereinafter referred to as the "system") can first receive the monitoring query request issued by the user through the UI interface. For example, the user enters a monitoring query request similar to "Please show me the operation status of the mining lamp in area A and the real-time monitoring screen". The system can generate a corresponding monitoring query task based on the monitoring query request, which will be used as the monitoring query task input by the user for subsequent optimization steps.
[0063] Step S202, performing data preprocessing on the monitoring query task to obtain task data.
[0064] Specifically, after obtaining the monitoring query task input by the user, the monitoring query task can be preprocessed to obtain task data. For example, the monitoring query task can be first standardized and converted into standardized data, and then the standardized data can be preprocessed, including deleting invalid values and supplementing missing values, to ensure the integrity and accuracy of the data, thereby obtaining task data.
[0065] Step S203: determining the task segmentation syntax according to the task data.
[0066] Specifically, after obtaining the task data after data preprocessing, the system can use a word segmentation tool (such as the JIEBA word segmenter) to segment the task data to obtain multiple task phrases, and then perform part-of-speech tagging on the task phrases to obtain the part-of-speech tagging results. The grammatical structure of the monitoring query task can be determined based on the part-of-speech tagging results, that is, the task segmentation grammar, to lay the foundation for subsequent entity recognition and optimization processing.
[0067] Step S204: identifying the task entity corresponding to the task data according to the task segmentation syntax.
[0068] Specifically, after completing the word segmentation and part-of-speech tagging of the task data, the task segmentation grammar can be performed. At this time, the system can use the trained named entity recognition (NER) model to identify the task data based on the task segmentation grammar, and identify the task entities corresponding to the task data by analyzing the part-of-speech and grammatical structure. This enables the system to accurately understand the core requirements of user monitoring query tasks and provide clear goals for further optimization processing.
[0069] Step S205, using a swarm intelligence optimization algorithm with preset parameters, optimizing according to the task segmentation grammar and the task entity, to obtain an optimization result of the monitoring query task.
[0070] Specifically, after determining the task segmentation grammar and task entity, the system can use a swarm intelligence optimization algorithm with preset parameters (such as a particle swarm optimization algorithm PSO) to optimize according to the task segmentation grammar and task entity, wherein the preset parameters of the swarm intelligence optimization algorithm may include population size, maximum number of iterations, crossover probability, and mutation probability, etc. During the optimization process, firstly, an initial data set can be randomly generated according to the task segmentation grammar and task entity, and then the initial data set can be swarm intelligently optimized according to the preset parameters to obtain an optimized data set, so that the fitness of each individual in the optimized data set, that is, each data string, can be evaluated, and finally the target data string can be screened according to the fitness as the optimal solution, and used as the optimization result.
[0071] It is understandable that with the popularity of smart phones, various applications have emerged, covering almost every aspect of life, from entertainment and leisure to work assistance. Therefore, the program optimization method provided in this embodiment can also be applied to other fields to improve program operation efficiency and reduce resource consumption. For example, it can be used in the industrial field to improve industrial production efficiency through program optimization.
[0072] This application optimizes the monitoring query tasks through task word segmentation syntax and accurate identification of task entities, combined with a swarm intelligence optimization algorithm, to achieve optimization of the miner's lamp program, thereby improving the operating efficiency of the miner's lamp program and enabling the miner's lamp program to meet real-time requirements.
[0073] In some optional implementations of this embodiment, the swarm intelligence optimization algorithm using preset parameters is optimized according to the task segmentation grammar and the task entity to obtain the optimization result of the monitoring query task, including:
[0074] Randomly generate an initial data set according to the task segmentation grammar and the task entity;
[0075] According to the preset parameters, the initial data set is optimized by swarm intelligence to obtain an optimized data set;
[0076] The fitness of each data string in the optimized data set is evaluated, and a target data string is selected according to the fitness as the optimization result.
[0077] In this embodiment, first, based on the monitoring query task input by the user, such as "please show me the operation status of the mine lamp in area A and the real-time monitoring screen", the task is segmented and grammatical entity analyzed by natural language processing technology to obtain task segmentation grammar and task entity as the core elements of the task; then, according to the task segmentation grammar and task entity, an initial data set containing multiple possible solutions is generated by using a random initialization method; next, according to the preset parameters of the swarm intelligence optimization algorithm (such as population size, maximum number of iterations, crossover probability, mutation probability, etc.), the initial data set is optimized, and the population is gradually evolved by simulating the biological evolution mechanism in nature, such as recombination, mutation and selection operations between individuals, to obtain an optimized data set; on this basis, each data string in the optimized data set (representing different individuals and different solutions) can be evaluated for fitness, and the target data string with the highest fitness is selected as the final optimization result, for example, "operation status of the mine lamp in area A, real-time monitoring screen" is selected as the optimization result that meets the user's needs.
[0078] This application optimizes the monitoring query task through a swarm intelligence optimization algorithm with preset parameters, realizes the optimization of the mining lamp program, ensures the quality of the optimization results, thereby improving the operating efficiency of the mining lamp program and enabling the mining lamp program to meet real-time requirements.
[0079] In some optional implementations of this embodiment, before the step of optimizing the swarm intelligence optimization algorithm using preset parameters according to the task segmentation grammar and the task entity to obtain the optimization result of the monitoring query task, the step further includes:
[0080] According to the user's instructions, the parameters corresponding to the swarm intelligence optimization algorithm are set to obtain the preset parameters, which include population size, maximum number of iterations, crossover probability and mutation probability.
[0081] In this embodiment, when obtaining the monitoring query task input by the user, the system allows the user to adjust the relevant parameters of the swarm intelligence optimization algorithm in advance according to actual needs. Specifically, the system can receive the user's instructions through the UI interface, and set the parameters corresponding to the swarm intelligence optimization algorithm according to the instructions, for example, the population size is set to 100, the maximum number of iterations is set to 1000, the crossover probability is set to 0.8, and the mutation probability is set to 0.1. The selection of these preset parameters is based on the user's specific application scenario and the requirements for the accuracy of the results. After the settings are completed, the system can enable the swarm intelligence optimization algorithm according to the preset parameters, and by simulating the process of natural selection and evolution, randomly generate the initial data set according to the task segmentation grammar and task entity and optimize the initial data set, and use continuous iteration to improve the solution until the data string with the highest fitness is determined.
[0082] This application pre-sets the parameters of the swarm intelligence optimization algorithm so that users can customize the optimization process according to their actual situation, ensuring the efficiency and pertinence of the optimization results, and ultimately achieving the optimization of the miner's lamp program, improving the operating efficiency of the miner's lamp program, and enabling the miner's lamp program to meet real-time requirements.
[0083] In some optional implementations of this embodiment, the step of determining the task segmentation syntax according to the task data includes:
[0084] Perform word segmentation according to the task data to obtain task phrases;
[0085] Performing part-of-speech tagging on the task phrase to obtain a part-of-speech tagging result;
[0086] The task segmentation grammar is determined according to the part-of-speech tagging result.
[0087] In this embodiment, when the system obtains the monitoring query task input by the user, such as "Please show me the operation status of the mine lamp in area A and the real-time monitoring screen", the task data can be obtained through data preprocessing, and then the task data can be segmented, and the task text can be divided into several phrases using a segmentation tool (such as ji eba segmenter) to obtain "Please / show / me / the / operation / status / of / the / mine / lamp / in / area / and / real-time / monitoring / screen" as the task phrase. Next, these task phrases can be marked with parts of speech, including subject, predicate, quantifier, prepositional phrase, verb, noun, auxiliary word, etc., to obtain the part-of-speech marking results. According to the part-of-speech marking results, the system can determine the segmentation grammatical structure of the monitoring query task, thereby determining the task segmentation grammar of the task data.
[0088] This application obtains task segmentation grammar by performing word segmentation and part-of-speech tagging on task data, thereby accurately reflecting the semantic structure of the monitoring query task, providing a basis for subsequent task entity recognition and optimization processing, and ultimately improving the operating efficiency of the mining lamp program.
[0089] In some optional implementations of this embodiment, the step of identifying the task entity corresponding to the task data according to the task segmentation syntax includes:
[0090] Inputting the task data into a preset named entity recognition model;
[0091] According to the task segmentation grammar, the task data is identified through the named entity recognition model to obtain the task entity.
[0092] In this embodiment, after obtaining the task segmentation grammar, the task data can be input into a preset named entity recognition (NER) model. Specifically, NER (Named Entity Recognition) is a natural language processing technology used to automatically identify and classify specific types of entities from text, such as names, place names, organization names, time, currency, etc., and to learn and annotate entities in text through training models to help understand and extract key information in text. It is widely used in fields such as information extraction, question-answering systems, and text analysis. The preset named entity recognition model is a trained model that can identify specific types of entities. According to the task segmentation grammar, the system uses the NER model to identify the task data, and can identify the task entity as a core element for subsequent optimization processes.
[0093] This application uses a named entity recognition model to identify task entities in monitoring query tasks, which serve as key information to provide clear goals for subsequent optimization processing, ultimately improving the operating efficiency of the mining lamp program.
[0094] In some optional implementations of this embodiment, the step of performing data preprocessing on the monitoring query task to obtain task data includes:
[0095] Converting the monitoring query task into standardized data;
[0096] Invalid values are deleted and missing values are supplemented for the standardized data to obtain the task data.
[0097] In this embodiment, when the system obtains the monitoring query task input by the user, it first needs to convert the task into a standardized data format to ensure the consistency and standardization of the data, and then preprocess the standardized data, including invalid value deletion and missing value supplementation, where invalid value deletion is to delete some meaningless content (such as spaces or punctuation marks), and missing value supplementation can be filled through context inference or default values. For example, if there are obvious grammatical errors or missing key information in the task description, the system will try to correct or supplement it through context or other preset rules to ensure the integrity of the data.
[0098] This application ensures that the obtained task data is more accurate and standardized through data preprocessing, lays a foundation for the subsequent task word segmentation grammar and task entity, and ultimately improves the operating efficiency of the mining lamp program.
[0099] In some optional implementations of this embodiment, after the step of optimizing the swarm intelligence optimization algorithm using preset parameters according to the task segmentation grammar and the task entity to obtain the optimization result of the monitoring query task, the following steps are further included:
[0100] The user interaction interface is optimized according to the optimization result.
[0101] In this embodiment, after the system obtains the optimization result of the monitoring query task using the swarm intelligence optimization algorithm with preset parameters, the user interaction interface can be further optimized. For example, assuming that the user's monitoring query task is "Please show me the operation status of the mine lamp in area A and the real-time monitoring screen", the system can obtain the optimization result through the swarm intelligence optimization algorithm and display the optimization result on the user interaction interface. According to the specific content of the optimization result, the interface layout and display method are adjusted to improve the user experience and satisfaction. For example, the interface may highlight the budget information and show the cost comparison of different configuration options in the form of a chart, while providing detailed text descriptions and operation guides. In this way, users can intuitively see the optimization results and make decisions based on the information provided by the system, thereby improving the user experience and satisfaction. .
[0102] This application optimizes the user interaction interface so that users can intuitively see the optimization results, thereby improving user experience and satisfaction, and ultimately improving the operating efficiency of the mining lamp program.
[0103] It should be emphasized that in order to further ensure the privacy and security of the above task data, the above task data can also be stored in a node of a blockchain.
[0104] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0105] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0106] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0108] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0109] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a program optimization system, which is similar to Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0110] like Figure 3 As shown, the program optimization system 300 described in this embodiment includes: an acquisition module 301, a processing module 302, a determination module 303, an identification module 304 and an optimization module 305. Among them:
[0111] The acquisition module 301 is used to acquire the monitoring query task input by the user;
[0112] The processing module 302 is used to perform data preprocessing on the monitoring query task to obtain task data;
[0113] A determination module 303 is used to determine the task segmentation syntax according to the task data;
[0114] An identification module 304 is used to identify the task entity corresponding to the task data according to the task segmentation syntax;
[0115] The optimization module 305 is used to adopt a swarm intelligence optimization algorithm with preset parameters to perform optimization according to the task segmentation grammar and the task entity to obtain an optimization result of the monitoring query task.
[0116] The program optimization system provided in this application can optimize the mining lamp program by accurately identifying the task word segmentation syntax and task entities, combined with the swarm intelligence optimization algorithm to optimize the monitoring query tasks, thereby improving the operating efficiency of the mining lamp program and making the mining lamp program meet the real-time requirements.
[0117] In some optional implementations of this embodiment, the optimization module 305 is further configured to:
[0118] Randomly generate an initial data set according to the task segmentation grammar and the task entity;
[0119] According to the preset parameters, the initial data set is optimized by swarm intelligence to obtain an optimized data set;
[0120] The fitness of each data string in the optimized data set is evaluated, and a target data string is selected according to the fitness as the optimization result.
[0121] The program optimization system provided in this application optimizes the monitoring query tasks through a swarm intelligence optimization algorithm with preset parameters, realizes the optimization of the mining lamp program, ensures the quality of the optimization results, thereby improving the operating efficiency of the mining lamp program and enabling the mining lamp program to meet real-time requirements.
[0122] In some optional implementations of this embodiment, the program optimization system 300 is further used to:
[0123] According to the user's instructions, the parameters corresponding to the swarm intelligence optimization algorithm are set to obtain the preset parameters, which include population size, maximum number of iterations, crossover probability and mutation probability.
[0124] The program optimization system provided in this application allows users to customize the optimization process according to their actual conditions by pre-setting the parameters of the swarm intelligence optimization algorithm, thereby ensuring the efficiency and pertinence of the optimization results, and ultimately achieving the optimization of the miner's lamp program, improving the operating efficiency of the miner's lamp program, and enabling the miner's lamp program to meet real-time requirements.
[0125] In some optional implementations of this embodiment, the determining module 303 is further configured to:
[0126] Perform word segmentation according to the task data to obtain task phrases;
[0127] Performing part-of-speech tagging on the task phrase to obtain a part-of-speech tagging result;
[0128] The task segmentation grammar is determined according to the part-of-speech tagging result.
[0129] The program optimization system provided in this application obtains task segmentation grammar by performing word segmentation and part-of-speech tagging on task data, thereby accurately reflecting the semantic structure of the monitoring query task, providing a basis for subsequent task entity recognition and optimization processing, and ultimately improving the operating efficiency of the mining lamp program.
[0130] In some optional implementations of this embodiment, the identification module 304 is further configured to:
[0131] Inputting the task data into a preset named entity recognition model;
[0132] According to the task segmentation grammar, the task data is identified through the named entity recognition model to obtain the task entity.
[0133] The program optimization system provided in this application obtains the task entities in the monitoring query task through the named entity recognition model, which serves as key information, provides clear goals for subsequent optimization processing, and ultimately improves the operating efficiency of the mining lamp program.
[0134] In some optional implementations of this embodiment, the processing module 302 is further configured to:
[0135] Converting the monitoring query task into standardized data;
[0136] Invalid values are deleted and missing values are supplemented for the standardized data to obtain the task data.
[0137] The program optimization system provided in this application ensures that the obtained task data is more accurate and standardized through data preprocessing, lays a foundation for the subsequent task word segmentation grammar and task entity, and ultimately improves the operating efficiency of the mining lamp program.
[0138] In some optional implementations of this embodiment, the program optimization system 300 is further used to:
[0139] The user interaction interface is optimized according to the optimization result.
[0140] The program optimization system provided in this application optimizes the user interaction interface so that users can intuitively see the optimization results, thereby improving user experience and satisfaction, and ultimately improving the operating efficiency of the mining lamp program.
[0141] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0142] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.
[0143] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0144] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the program optimization method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0145] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the program optimization method.
[0146] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0147] The computer device provided in this application can optimize the mining lamp program by accurately identifying the task word segmentation syntax and task entities, and optimizing the monitoring query tasks in combination with the swarm intelligence optimization algorithm, thereby improving the operating efficiency of the mining lamp program and enabling the mining lamp program to meet real-time requirements.
[0148] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the program optimization method as described above.
[0149] The computer-readable storage medium provided in the present application can optimize the mining lamp program by accurately identifying the task word segmentation syntax and task entities, and optimizing the monitoring query tasks in combination with the swarm intelligence optimization algorithm, thereby improving the operating efficiency of the mining lamp program and enabling the mining lamp program to meet real-time requirements.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0151] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A program optimization method, characterized in that: The steps include: Get the monitoring query task input by the user; Performing data preprocessing on the monitoring query task to obtain task data; Determining task word segmentation syntax according to the task data; According to the task word segmentation syntax, identifying the task entity corresponding to the task data; A swarm intelligence optimization algorithm with preset parameters is used to optimize according to the task segmentation grammar and the task entity to obtain an optimization result of the monitoring query task.
2. The program optimization method according to claim 1, characterized in that: The step of using the swarm intelligence optimization algorithm with preset parameters to optimize according to the task segmentation grammar and the task entity to obtain the optimization result of the monitoring query task specifically includes: Randomly generate an initial data set according to the task segmentation grammar and the task entity; According to the preset parameters, the initial data set is optimized by swarm intelligence to obtain an optimized data set; The fitness of each data string in the optimized data set is evaluated, and a target data string is selected according to the fitness as the optimization result.
3. The program optimization method according to claim 1, characterized in that: Before the step of optimizing the task segmentation grammar and the task entity using the swarm intelligence optimization algorithm with preset parameters to obtain the optimization result of the monitoring query task, the method further includes: According to the user's instructions, the parameters corresponding to the swarm intelligence optimization algorithm are set to obtain the preset parameters, which include population size, maximum number of iterations, crossover probability and mutation probability.
4. The program optimization method according to claim 1, characterized in that: The step of determining the task word segmentation syntax according to the task data specifically includes: Perform word segmentation according to the task data to obtain task phrases; Performing part-of-speech tagging on the task phrase to obtain a part-of-speech tagging result; The task segmentation grammar is determined according to the part-of-speech tagging result.
5. The program optimization method according to claim 1, characterized in that: The step of identifying the task entity corresponding to the task data according to the task word segmentation syntax specifically includes: Inputting the task data into a preset named entity recognition model; According to the task segmentation grammar, the task data is identified through the named entity recognition model to obtain the task entity.
6. The program optimization method according to claim 1, characterized in that: The step of performing data preprocessing on the monitoring query task to obtain task data specifically includes: Converting the monitoring query task into standardized data; Invalid values are deleted and missing values are supplemented for the standardized data to obtain the task data.
7. The program optimization method according to any one of claims 1 to 6, characterized in that: The step of using the swarm intelligence optimization algorithm with preset parameters to optimize according to the task segmentation grammar and the task entity to obtain the optimization result of the monitoring query task specifically includes: The user interaction interface is optimized according to the optimization result.
8. A program optimization system, characterized in that: include: The acquisition module is used to obtain the monitoring query task input by the user; A processing module, used for performing data preprocessing on the monitoring query task to obtain task data; A determination module, used to determine the task segmentation syntax according to the task data; An identification module, used for identifying the task entity corresponding to the task data according to the task segmentation syntax; The optimization module is used to adopt a swarm intelligence optimization algorithm with preset parameters to optimize according to the task segmentation syntax and the task entity to obtain the optimization result of the monitoring query task.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the program optimization method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the program optimization method according to any one of claims 1 to 7.
