A method, device and storage medium for allocating construction site inspection tasks
Through the long and short-term memory neural network, process the construction site risk text and calculate the risk assessment score, and automatically allocate inspection tasks, the problem of inefficient allocation of construction site inspection tasks in the existing technology is solved, and the timeliness and efficiency of risk assessment is improved. .
Patent Information
- Application Number
- CN202111224447.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-10-19
AI Technical Summary
In the prior art, construction site inspection tasks are allocated by manual labor, which leads to the inability to assess risks in a timely manner and is inefficient, making it impossible to effectively manage the risks and inspection tasks at the construction site.
The construction site risk text is processed using a long and short-term memory neural network, the risk assessment score is calculated through the shortest editing path algorithm, and the inspection tasks are automatically assigned to the corresponding inspectors based on the evaluation score.
Accurate assessment of construction site risks and automated inspection tasks allocation have been achieved, timeliness and efficiency of inspection tasks have been improved, and labor costs have been saved.
Smart Images

Figure CN113962547B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method for allocating construction site inspection tasks, a device for allocating construction site inspection tasks, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In order to ensure the safety and order of the decoration construction site, the construction management party usually arranges inspectors to inspect the site. In the existing technology, the inspection tasks are generally assigned manually, which is time-consuming and laborious. In actual applications, there are often risks at the decoration construction site, such as the owner is not satisfied with the work of the construction party, the construction party is not satisfied with the materials provided by the construction management room, etc. If the situation of the construction site is not understood in time, the risks cannot be assessed in time, and the inspection tasks cannot be better assigned. Summary of the invention
[0003] In view of the above-mentioned prior art, an embodiment of the present invention discloses a method for allocating construction site inspection tasks, which can overcome the defects of inability to timely assess risks and manual allocation, and achieve the purpose of accurately assessing risks and automatically allocating inspection tasks.
[0004] In view of this, an embodiment of the present application proposes a method for allocating construction site inspection tasks, the method comprising:
[0005] Obtaining a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site;
[0006] The construction site risk text is processed using a long short-term memory neural network, and a risk assessment score is obtained through the shortest editing path as the risk assessment score corresponding to the construction site;
[0007] The construction site inspection tasks are assigned according to the risk assessment scores, and the assigned construction site inspection tasks are pushed to corresponding inspectors.
[0008] Further,
[0009] The steps of using a long short-term memory neural network to process the construction site risk text and determining a risk assessment score through the shortest editing path as the risk assessment score corresponding to the construction site include:
[0010] The construction site risk text is converted into a first word vector using a set word embedding matrix, where the first word vector is a vector mapping words in the construction site risk text to real numbers;
[0011] Inputting the first word vector into a long short-term memory neural network for processing to obtain a second word vector, wherein the second word vector represents a vector of a part of speech of a vocabulary;
[0012] Performing part-of-speech matching on the second word vector and a plurality of third word vectors in a pre-set corpus, calculating the shortest edit path between the second word vector and each of the third word vectors, and selecting the third word vector having the shortest edit path with the second word vector as the fourth word vector, wherein the third word vector is a pre-set weighted word vector, and the weight represents the degree of risk of construction site construction;
[0013] Feature extraction is performed on the fourth word vector to obtain the weight, and the obtained weight is used as the construction site risk assessment score.
[0014] Further,
[0015] The step of calculating the shortest edit path between the second word vector and each of the third word vectors comprises:
[0016] The word string corresponding to the second word vector is used as the first string, and the word string corresponding to the third word vector is used as the second string;
[0017] If the first character string and / or the second character string is an empty character string, the one with the largest number of characters in the first character string and the second character string is taken as the shortest editing path;
[0018] If both the first string and the second string are not empty strings, then:
[0019] Delete the last character of the first character string, calculate the shortest edit path between the first character string with the last character deleted and the second character string, and add 1 as the first calculation result;
[0020] Delete the last character of the second character string, calculate the shortest edit path between the first character string and the second character string with the last character deleted, and add 1 as the second calculation result;
[0021] Delete the last character of the first character string, delete the last character of the second character string, calculate the shortest edit path between the first character string with the last character deleted and the second character string with the last character deleted, and add 1 if the last character of the first character string is different from the last character of the second character string as the third calculation result;
[0022] The minimum value among the first calculation result, the second calculation result and the third calculation result is determined, and the determined minimum value is used as the shortest editing path between the first character string and the second character string.
[0023] Further,
[0024] The steps of obtaining the construction site risk text include:
[0025] Collect the construction site risk text and save it in a database;
[0026] Retrieving the construction site risk text from the database and placing it in a message queue;
[0027] The construction site risk text is obtained from the message queue.
[0028] Furthermore, allocating the construction site inspection tasks according to the risk assessment scores and pushing the allocated construction site inspection tasks to corresponding inspectors includes:
[0029] Obtaining inspector information of at least one inspector and location information of at least one construction site;
[0030] Allocating construction site inspection tasks to the inspectors according to the risk assessment scores, the inspector information and the location information of the construction site, and pushing the allocated construction site inspection tasks to the corresponding inspectors;
[0031] The inspector information includes scheduling status and geographic location information.
[0032] Furthermore, the step of allocating the construction site inspection task to the inspector according to the risk assessment score, the geographical location information of the inspector and the location information of the construction site includes:
[0033] sorting the construction sites to which the inspectors are to be assigned according to the risk assessment scores;
[0034] Determine the construction site corresponding to the highest risk assessment score as the first construction site;
[0035] Determine, according to the geographic location information of the inspectors, to select the inspector closest to the first construction site from among the inspectors whose schedules are not full as the first inspector, assign the first construction site to the first inspector, and delete the first construction site from the sequence of the construction sites to which the inspectors are to be assigned;
[0036] Calculating the duration of the first inspection journey according to the geographic location information of the first inspector and the location information of the first construction site;
[0037] Calculate the total working time of the first inspector according to the pre-set inspection working time and the first inspection journey time;
[0038] The total working hours of the first inspector are compared with a preset threshold, and construction site inspection tasks are continuously assigned according to the comparison result until there are no more construction sites to which the inspector is to be assigned.
[0039] Further, the continuously allocating the construction site inspection tasks according to the comparison result includes:
[0040] In response to the total working time of the first inspector being greater than or equal to the preset threshold, setting the scheduling status of the first inspector to full, and returning to the step of determining the construction site corresponding to the highest risk assessment score as the first construction site;
[0041] In response to the total working time of the first inspector being less than the preset threshold, the second construction site closest to the first construction site is determined, the second construction site is assigned to the first inspector, the second construction site is deleted from the order of the construction sites to which the inspector is to be assigned, and the second construction site is used as the first construction site, and then the step of calculating the duration of the first inspection journey based on the geographic location information of the first inspector and the location information of the first construction site is returned to.
[0042] In view of the above-mentioned prior art, an embodiment of the present invention discloses a device for allocating construction site inspection tasks, which can overcome the defects of not being able to timely assess risks and the time cost of manual allocation, and achieve the purpose of accurately assessing risks and automatically allocating inspection tasks.
[0043] The device includes:
[0044] An acquisition module, used to obtain a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site;
[0045] An evaluation module, using a long short-term memory neural network to evaluate the construction site risk text to obtain a risk evaluation score;
[0046] The task allocation module allocates construction site inspection tasks according to the risk assessment scores and pushes the allocated construction site inspection tasks to corresponding inspectors.
[0047] The embodiment of the present application further discloses a computer-readable storage medium having computer instructions stored thereon, wherein when the instructions are executed by a processor, the steps of the method for allocating construction site inspection tasks as described above can be implemented.
[0048] The embodiment of the present application further discloses a computer program product, including computer instructions, which, when executed by a processor, implement the method for allocating construction site inspection tasks as described in any one of the above items.
[0049] To sum up, in the technical solution disclosed in the embodiment of the present application, a construction site risk file is obtained, the construction site risk text is evaluated and processed using an LSTM neural network to obtain a risk assessment score, and the risk assessment score is used to assign construction site inspection tasks. This can accurately assess construction site risks, automatically assign inspection tasks, avoid construction site risks in a timely manner, and save manpower and time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] Figure 1 It is a flowchart of the first embodiment of the method for allocating construction site inspection tasks in the present application.
[0052] Figure 2 This is a flowchart of Embodiment 2 of the method for allocating construction site inspection tasks in this application.
[0053] Figure 3 It is a flow chart of the method for calculating the shortest editing path in an embodiment of the present application.
[0054] Figure 4 It is a system structure diagram of the system where the third embodiment of the method of the present application is actually located.
[0055] Figure 5 This is a flowchart of Embodiment 3 of the method for allocating construction site inspection tasks in the present application.
[0056] Figure 6 It is a flow chart of the method for allocating construction site inspection tasks to inspectors in an embodiment of the present application.
[0057] Figure 7 It is a structural diagram of a first embodiment of the device for allocating construction site inspection tasks in the present application.
[0058] Figure 8 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0061] The embodiment of the present application collects information related to construction site risks, uses neural network methods to analyze and evaluate, and then assigns construction site inspection tasks, so as to timely discover and avoid risks.
[0062] Figure 1 This is a flow chart of the first embodiment of the method for allocating construction site inspection tasks in this application. Figure 1 As shown, the method embodiment 1 includes:
[0063] Step 101: Obtain a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site.
[0064] In actual applications, the text of construction site risks can be obtained through various channels. For example, the owner, the construction party and the construction management party can establish a WeChat group, and obtain the text of construction site risks by reading the content in the WeChat group through the interface. For example, a construction site review APP is set up in the construction site management system, and the owner, the construction party and the construction management party can upload text in the construction site review APP based on the construction situation of the day. For another example, a complaint / feedback function can also be set up in the construction site management system, and the owner or the construction party can upload information through the complaint / feedback function. In actual applications, the text of construction site risks can also be obtained through other channels, which will not be listed here one by one.
[0065] The "construction site risk text" described in the embodiment of the present application refers to information related to construction risks on the construction site. Those skilled in the art know that during the construction process of the decoration site, the owner, the construction party and the construction management party often have different opinions. For example: the owner is not satisfied with the ground leveling work of the construction party, and makes comments such as "the ground is very uneven, this work is unqualified" in the WeChat group. For example, the construction party makes comments such as "the quality of sand and gravel auxiliary materials today is very poor" in the construction site review APP. These comments all reflect the construction risks of the construction site to a certain extent, and therefore are referred to as "construction site risk texts" in the embodiments of the present application.
[0066] Step 102: Use a long short-term memory (LSTM) neural network to process the construction site risk text, and determine a risk assessment score through the shortest editing path as the risk assessment score corresponding to the construction site.
[0067] In the embodiment of the present application, a neural network is used to process the construction site risk text, and in particular, an LSTM neural network is used. The LSTM neural network is a special recursive neural network that can use "gates" to control the memory process. The specific method will be described in detail in the subsequent embodiments. After analyzing the construction site risk text using the LSTM neural network, the risk assessment score can be obtained through the shortest editing path. The specific method will be described in detail in the subsequent embodiments.
[0068] Step 103: Allocate construction site inspection tasks according to the risk assessment scores, and push the allocated construction site inspection tasks to corresponding inspectors.
[0069] The risk assessment score can reflect the risk level of construction site. For example, a negative risk assessment score can be considered a negative evaluation, a risk assessment score of 0 can be considered ordinary or normal, and a positive risk assessment score can be considered a positive evaluation. In practical applications, the risk assessment score can be used to timely discover the situation of the construction site. If the risk is relatively high, it can be considered that the construction is not going smoothly, and it is necessary to assign inspectors to conduct inspections as soon as possible, or it is necessary to assign experienced and high-quality inspectors to conduct inspections to reduce or avoid risks and ensure the smooth completion of construction.
[0070] By applying the embodiment of the present application, the LSTM neural network can be used to conduct risk assessment on the collected construction site risk texts, and the inspection tasks can be automatically assigned according to the assessment results. In this way, the construction risks of the construction site can be discovered in time, and the tediousness of manually assigning tasks can be avoided, so that the risks can be accurately assessed and the labor costs can be saved.
[0071] Figure 2 This is a flow chart of the second embodiment of the method for allocating construction site inspection tasks in this application. Figure 2 As shown, the method includes:
[0072] Step 201: Obtain a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site.
[0073] This step is the same as step 101 in method embodiment 1.
[0074] Step 202: Use the set word embedding matrix to convert the construction site risk text into a first word vector, where the first word vector is a vector mapping words in the construction site risk text to real numbers.
[0075] In practical applications, in order to facilitate calculation, the construction site risk text needs to be converted into word vectors first. Word vector is a general term for a set of language modeling and feature learning techniques in natural language processing. Usually, the sentence is divided into words first, and each word is represented by a vector of fixed dimension. The dimension of the sentence is also fixed to a constant value and padded. The word embedding matrix is the conversion matrix required to convert words into vectors of fixed dimension. In order to distinguish it from the subsequent word vectors, it is called the "first word vector" here, which represents the vector of the vocabulary in the construction site risk text mapped to real numbers.
[0076] Step 203: Input the first word vector into the LSTM neural network for processing to obtain a second word vector, where the second word vector represents the vector of the part of speech of the vocabulary.
[0077] As mentioned above, the LSTM neural network is a special recurrent neural network that can effectively process sequence data and selectively store information through gating. The single loop structure of LSTM is sometimes called a "cell", and its algorithm can be expressed as follows:
[0078]
[0079] Among them, X t Represents input, C t represents the individual cell state function, represents the temporary individual cell state function, h t represents the hidden layer state function, f t represents the forget gate, i t represents the memory gate, O t Represents the output, the subscript t indicates that it is the parameter at time t, and t-1 indicates the previous time before time t. Through the processing of the LSTM neural network, the second word vector representing the part of speech of the word is obtained. The part of speech here refers to the nature of the marked word. For example, a negative number represents a negative evaluation, 0 represents a normal or ordinary evaluation, and a positive number represents a positive evaluation.
[0080] Step 204: Regularize the second word vector to obtain a regularized second word vector.
[0081] In practical applications, in a neural network model, if the model has many parameters and few training samples, the trained model is prone to overfitting. The specific manifestation of overfitting is that the model has a small loss function on the training data and a high prediction accuracy, but a large loss function on the test data and a low prediction accuracy. In order to avoid overfitting, a regularization process such as the dropout algorithm can be used. The dropout algorithm can solve the problem of overfitting by taking the average and reducing the complex co-adaptation relationship between neurons. Therefore, this step can also use the dropout algorithm to regularize the second word vector. Of course, if the trained model does not produce overfitting, regularization can be omitted, that is, this step is omitted.
[0082] Step 205: Match the second word vector with multiple third word vectors in a pre-set corpus in terms of part of speech, calculate the shortest editing path between the second word vector and each of the third word vectors, and select the third word vector with the smallest shortest editing path with the second word vector as the fourth word vector, wherein the third word vector is a pre-set weighted word vector, and the weight represents the degree of construction risk at the construction site.
[0083] Step 206: Perform feature extraction on the fourth word vector to obtain weights, and use the obtained weights as construction site risk assessment scores.
[0084] The above steps 205 and 206 are specific ways to determine the construction site risk assessment score using the shortest edit path. In practical applications, in order to train the model of the neural network, a corpus will be set up, and the vocabulary in the corpus will be used for training. In the embodiment of the present application, the word vector corresponding to the vocabulary in the corpus is used as the third word vector, and a weight is set for the word vector corresponding to the vocabulary in the corpus to represent the degree of risk of construction site construction. Then, if the shortest edit distance between the second word vector and the fourth word vector is the smallest, it can be considered that the part of speech of the second word vector is the same as that of the fourth word vector, and the second word vector can also have the same weight. Since the weight in the embodiment of the present application represents the degree of risk of construction site construction, the construction site risk assessment score of the meaning expressed by the second word vector is also evaluated.
[0085] In addition, in order to perform part-of-speech matching, the embodiment of the present application needs to calculate the shortest editing path between the second word vector and multiple third word vectors in the corpus. The shortest editing path refers to the number of editing operation steps required to adjust the first string to the second string through editing. Editing operations usually include deletion, insertion, and skipping / replacement. The method for calculating the shortest editing path in the embodiment of the present application can be as follows: Figure 3 As shown, specifically including:
[0086] Step 301: The word string corresponding to the second word vector is used as the first string, and the word string corresponding to the third word vector is used as the second string.
[0087] Step 302: If the first character string and / or the second character string is an empty character string, the one with the largest number of characters in the first character string and the second character string is taken as the shortest editing path.
[0088] In this case, assuming that the number of characters in the first string is X, and X=0, which is an empty string, and the number of characters in the second string is Y, and Y≠0, then Y characters need to be inserted from the first string to the second string, so the shortest edit path is Y. Assuming that the number of characters in the first string is X, and X≠0, and the number of characters in the second string is Y, and Y=0, which is an empty string, then X characters need to be deleted from the first string to the second string, so the shortest edit path is X. Assuming that both the first string and the second string are empty strings, no operation is required, and the shortest edit path is 0.
[0089] Step 303: If both the first character string and the second character string are not empty character strings, execute steps 304 to 307.
[0090] In the case that both the first character string and the second character string are not empty characters, assuming that the first character string is X characters and the second character string is Y characters, the shortest editing path can be determined in the following three cases.
[0091] Step 304: Delete the last character of the first character string, calculate the shortest edit path between the first character string with the last character deleted and the second character string, and add 1 to obtain the shortest edit path as the first calculation result.
[0092] In the first case, assuming that it is known that the number of editing steps required to reach the second string after deleting the last character of the first string is F, you can directly delete the last character of the first string, then the number of editing steps from the first string to the second string is F+1.
[0093] Step 305: Delete the last character of the second character string, calculate the shortest edit path between the first character string and the second character string with the last character deleted, and add 1 as the second calculation result.
[0094] In the second case, assuming that it is known that the number of editing steps required from the first string to the second string after deleting the last character is F, and then inserting the last character of the second string, then the number of editing steps from the first string to the second string is F+1.
[0095] Step 306: Delete the last character of the first string, delete the last character of the second string, calculate the shortest editing path between the first string with the last character deleted and the second string with the last character deleted, and add 1 if the last character of the first string is different from the last character of the second string, as the third calculation result.
[0096] In the third case, assuming that it is known that the number of editing operation steps from deleting the last character of the first string to reaching the second string with the same last character deleted is F, then if the last character of the first string is the same as the last character of the second string, no operation is required and it can be skipped, and the number of editing operation steps from the first string to the second string is F; if the last character of the first string is different from the last character of the second string, it can be replaced with the last character of the second string, and the number of editing operation steps from the first string to the second string is F+1.
[0097] Step 307: Determine the minimum value of the first calculation result, the second calculation result and the third calculation result, and use the determined minimum value as the shortest editing path between the first character string and the second character string.
[0098] The above steps 304 to 306 are three different operation modes, and the minimum value can be used as the shortest editing path. It should be noted that steps 302 to 307 are actually a recursive method, which can be expressed by the following formula:
[0099]
[0100] Wherein, F represents the number of editing operation steps, a represents the first string, b represents the second string, x represents the number of characters in the first string, and y represents the number of characters in the second string. That is to say, when the first string a and / or the second string b are empty strings, the maximum number of characters in the first string a and the second string b (max(x, y)) can be used as the shortest editing path (step 302). When the first string a and the second string b are not empty strings (step 303), there are three calculation methods: First, delete the last character of the first string, and calculate the shortest editing path (F) between the first string and the second string after deleting the last character. a,b (x-1, y)), plus 1 (F a,b (x-1, y)+1), as the first calculation result (step 304). Second, delete the last character of the second string, and calculate the shortest editing path (F) between the first string and the second string with the last character deleted. a,b (x, y-1)), plus 1 (F a,b(x, y-1)+1), as the second calculation result (step 305). Third, delete the last character of the first string, delete the last character of the second string, and calculate the shortest editing path (F) between the first string with the last character deleted and the second string with the last character deleted a,b (x-1, y-1)), and add 1 if the last character of the first string is different from the last character of the second string (i.e. ), as the third calculation result (step 306). Finally, the minimum value is taken from the above three calculation results as the shortest edit path (step 307).
[0101] The method for calculating the shortest edit path proposed in the embodiment of the present application is highly efficient, and a third word vector that matches the part of speech of the second word vector can be quickly determined from the corpus. In practical applications, there may be more than one, but several matching third word vectors in the corpus. As described above, these third word vectors are all weighted word vectors, and the weights can be determined by feature extraction. Since the weight of the third word vector reflects the risk level of the construction site expressed by the vocabulary, and the part of speech of the second word vector and the third word vector is matched (shortest edit path), the weight can also be used as the construction site risk assessment score of the second word vector.
[0102] Step 207: Allocate construction site inspection tasks according to the risk assessment scores, and push the allocated construction site inspection tasks to corresponding inspectors.
[0103] This step is the same as step 103 of method embodiment 1.
[0104] The second embodiment of the method of the present application is applied, and the collected construction site risk texts are automatically analyzed using an LSTM neural network. The parts of speech are determined using the shortest editing path to obtain weights representing the degree of construction site risk, thereby determining the risk assessment score of the construction site risk text and completing the allocation of construction site inspection tasks.
[0105] The present application also discloses a method embodiment 3, and introduces the present application scheme in detail through the description of actual scenarios. Figure 4 This is a system structure diagram of the system where the third embodiment of the present application method is actually located. Figure 4 As shown, it is assumed that a decoration site management system is set up for decoration work, an inspector management system is set up for inspector management, an inspection task scheduling system is set up for the allocation of inspection tasks, a site risk assessment module for calculating risk assessment scores is set up, and a MYSQL database for storing information is set up. In addition, method embodiment 3 assumes that site risk texts are collected through three channels: WeChat group, site comments, and business / construction feedback.
[0106] Figure 5 1 is a flow chart of the third embodiment of the method for allocating construction site inspection tasks. Figure 5 As shown, the method includes:
[0107] Step 501: The decoration construction site management system collects construction site risk texts, which represent information related to construction site risks and are stored in a MYSQL database.
[0108] In this step, the renovation site management system collects site risk texts through three channels: WeChat group, site comments, and business / construction feedback. Taking WeChat group as an example, if the WeChat group includes the message "You did a great job", it can be saved in the MYSQL database as a site risk text, and other information is similar.
[0109] Step 502: The renovation site management system takes out the site risk text from the MYSQL database and places it in the Kafka message queue.
[0110] Step 503: The construction site risk assessment module obtains the construction site risk text from the Kafka message queue.
[0111] The above steps 501 to 503 are specific methods for obtaining construction site risk text in actual applications, which are equivalent to the specific implementation method of step 201.
[0112] Step 504: The construction site risk assessment module uses the set word embedding matrix to convert the construction site risk text into a first word vector, where the first word vector is a vector corresponding to a word in the construction site risk text.
[0113] Step 505: Input the first word vector into the LSTM neural network for processing to obtain a second word vector, where the second word vector represents the vector of the part of speech of the vocabulary.
[0114] Step 506: Regularize the second word vector to obtain a regularized second word vector.
[0115] Step 507: Match the second word vector with multiple third word vectors in a pre-set corpus in terms of part of speech, calculate the shortest editing path between the second word vector and each of the third word vectors, and select the word vector with the smallest shortest editing path with the second word vector as the fourth word vector, where the third word vector is a pre-set weighted word vector, and the weight represents the degree of construction risk at the construction site.
[0116] Step 508: Perform feature extraction on the fourth word vector to obtain weights, and use the obtained weights as the construction site risk assessment scores.
[0117] The above steps 504 to 508 are the same as steps 202 to 206 in the second method embodiment, and are executed by the construction site risk assessment module here. It should be noted that since the decoration construction site management system can continuously collect various construction site risk texts from channels such as WeChat groups, construction site comments, business / construction feedback, etc., the construction site risk assessment module can continuously calculate the construction site risk assessment score. When the inspection task scheduling system needs to assign inspection tasks, it can obtain the currently newly calculated construction site risk assessment score from the construction site risk assessment module.
[0118] For the above step 507, in the third embodiment, the method of steps 301 to 307 can still be used to calculate the shortest edit path. The following uses a specific example to illustrate the implementation method:
[0119] 0 you Dry of very good 0 0 1 2 3 4 5 you 1 0 1 1 1 1 very 2 1 1 1 0 1 good 3 1 1 1 1 0
[0120] Table 1
[0121] Among them, the columns represent the first string, the rows represent the second string, and the number at the intersection of the xth character in the column and the yth character in the row represents: when the string composed of x - 1 characters is known to reach the string composed of y - 1 characters, the number of edit operation steps required for the xth character in the column to reach the yth character in the row. The following is an example:
[0122] Suppose both the first string and the second string are empty. Then, no operation is required to reach the second string from the first string. Therefore, 0 should be filled in the intersection of the column 0 and the row 0.
[0123] Suppose the first string is empty and the second string is "you". One operation step of inserting "you" is required to reach the second string from the first string. Therefore, 1 should be filled in the intersection of the column 0 and the row "you". And so on, "2", "3", "4", and "5" should be filled in the subsequent positions of the first row. Similarly, "1", "2", and "3" should be filled in the subsequent positions of the first column.
[0124] For another example, suppose the first string is "You are very good" and the second string is "You did a very good job". If the shortest edit path from "You are very" to "You did a very" has been calculated, then, since the last character "good" in the first string is the same as the last character "good" in the second string, and the two characters are the same and no edit operation is required, it can be skipped. Therefore, 0 should be filled in the intersection of the column "good" and the row "good".
[0125] For another example, assume that the first string is "你很好" (You are very good) and the second string is "你干的很好" (You did a very good job). If the shortest edit path from "你很好" to "你干的很" (i.e., deleting the last character) has been calculated, then only need to insert another "好" (good) at the end to obtain the second string "你干的很好". Therefore, at the intersection of the column "好" (good) and the row "很" (very), it should be filled with 1, indicating that the number of edit operations needs to be incremented by 1. According to the above method and formula 2 in the method embodiment 2, the other edit operation steps in Table 1 can be filled, which will not be elaborated here.
[0126] Since formula 2 is a recursive process, the shortest edit path from the first string to the second string is obtained based on Table 1 as follows:
[0127] 0 you Dry of very good 0 0 1 2 3 4 5 you 1 0 1 2 3 4 very 2 1 1 2 2 3 good 3 2 2 2 3 2
[0128] Table 2
[0129] Taking the operation steps at the intersection of "很" (very) in the first column and "很" (very) in the first row as an example. From formula 2, we know that neither the string "你很" (You are very) nor "你干的很" (You did a very good job) is empty. Therefore, three cases need to be calculated: In the first case, assume that the edit operation steps from "你" to "你干的很" are 3, and then add 1, the first calculation result is 4; in the second case, the edit operation steps from "你很" to "你干的" are 2, and then add 1, the second calculation result is 3; in the third case, the edit operation steps from "你" to "你干的" are 2, and the last characters of the first string "很" (very) and the second string "很" (very) are the same, so no additional 1 is added, and the third result is 2. Among these three cases, the minimum number of edit operations is 2. Therefore, at the intersection of "很" (very) in the first column and "很" (very) in the first row, the operation steps should be filled with 2, indicating that it takes two edit operations to change "你很" (You are very) to "你干的很" (You did a very good job).
[0130] For another example, taking the operation steps at the intersection of "好" (good) in the first column and "好" (good) in the first row as an example. From formula 2, we know that neither the string "你很好" (You are very good) nor "你干的很好" (You did a very good job) is empty. Therefore, three cases need to be calculated: In the first case, assume that the edit operation steps from "你很" to "你干的很好" are 3, and then add 1, the first calculation result is 4; in the second case, the edit operation steps from "你很好" to "你干的很" are 3, and then add 1, the second calculation result is 4; in the third case, the edit operation steps from "你很" to "你干的很" are 2, and the last characters of the first string "好" (good) and the second string "好" (good) are the same, so no additional 1 is added, and the third result is 2. Among these three cases, the minimum number of edit operations is 2. Therefore, at the intersection of "好" (good) in the first column and "好" (good) in the first row, the operation steps should be filled with 2, indicating that it takes two edit operations to change "你很好" (You are very good) to "你干的很好" (You did a very good job).
[0131] Therefore, according to the above method, the second word vector can be matched with the third word vector in the pre-set corpus in terms of part of speech, and the word vector of the shortest editing path can be determined. Thereafter, the word vector of the shortest editing path is subjected to feature extraction to obtain a weight representing the degree of risk of the construction site, which is used as the construction site risk assessment score.
[0132] In addition, in practical applications, a more detailed weight can be set for the third word vector in the corpus. For example, it can be divided into 20 levels of weight, where [-10, 0) represents a negative evaluation, 0 represents normal or ordinary, and (0, 10] represents a positive evaluation. Then, the construction site risk assessment score obtained in the embodiment of the present application can not only determine positive or negative, but also distinguish the difference in risks more finely, so as to better manage the construction site.
[0133] Step 509: The inspection task scheduling system obtains the calculated construction site risk assessment score from the construction site risk assessment module, allocates construction site inspection tasks according to the risk assessment score, and pushes the allocated construction site inspection tasks to corresponding inspectors.
[0134] In actual applications, the method of allocating construction site inspection tasks according to risk assessment scores and pushing the assigned construction site inspection tasks to corresponding inspectors may specifically include: obtaining the inspector information of at least one of the inspectors and the location information of at least one construction site; allocating construction site inspection tasks to the inspectors according to the risk assessment scores, the inspector information and the location information of the construction site, and pushing the assigned construction site inspection tasks to the corresponding inspectors; the inspector information includes scheduling status and geographic location information.
[0135] Among them, the method of allocating site inspection tasks to inspectors based on risk assessment scores, inspectors' geographic location information, and construction site location information is as follows: Figure 6 As shown, including:
[0136] Step 601: Sort the construction sites to which inspectors are to be assigned according to the risk assessment scores.
[0137] If there are multiple renovation construction sites, the risk assessment score of each construction site can be obtained by using any of the above embodiments, and the risk assessment scores can be used to sort the construction sites.
[0138] Step 602: Determine the construction site corresponding to the highest risk assessment score as the first construction site.
[0139] In actual applications, in order to avoid risks as much as possible, it is necessary to give priority to inspecting construction sites with the highest risk assessment scores, and inspectors will eliminate or reduce risks to achieve the purpose of management.
[0140] Step 603: Determine, based on the geographic location information of the inspectors, to select the inspector who is closest to the first construction site from the inspectors whose schedules are not full as the first inspector, assign the first construction site to the first inspector, and delete the first construction site from the order of the construction sites to which the inspector is to be assigned.
[0141] In the embodiment of the present application, an inspector system is provided, which is used to manage inspector information, such as inspector identification (ID number) and inspector geographic location information, and may also include other information such as inspector name, gender, years of inspection experience, contact information, etc. The geographic location information described here may be the inspector's address or current location. If the inspector's geographical location is far from the geographical location of the construction site, it will take more inspection journey time. The total working time of the inspector is the prescribed time set in advance, and the time spent on inspecting a construction site is the sum of the inspection journey time and the inspection work time. Among them, the inspection journey time refers to the time it takes for the inspector to reach the construction site, and the inspection work time refers to the time spent on the inspection at the construction site.
[0142] In order to optimize the inspection work, the construction site corresponding to the current highest risk assessment score can be assigned first, and the first inspector whose schedule is not full and closest to the first construction site can be assigned. Here, the inspector whose schedule is not full refers to the inspector whose workload is not full and who is waiting to be assigned to the inspection work. Once a construction site is assigned, it can be deleted from the sorting and no longer assigned to other inspectors to avoid duplicate assignment.
[0143] Step 604: Calculate the duration of the first inspection journey based on the geographic location information of the first inspector and the location information of the first construction site.
[0144] Step 605: Calculate the total working time of the first inspector according to the pre-set inspection working time and the first inspection journey time.
[0145] Usually, an inspector needs to be responsible for the inspection of multiple construction sites during one working day. The total working time can be obtained by adding up the inspection working time and inspection journey time of multiple construction sites.
[0146] Step 606: Compare the total working hours of the first inspector with a preset threshold, and continue to assign construction site inspection tasks according to the comparison result until there are no more construction sites to which the inspector is to be assigned.
[0147] If the total working time of the inspector reaches the preset threshold (for example, 8 hours), it means that the inspector's work is saturated, and no other inspection work will be added, and the next inspector will continue to be assigned inspection tasks. If the total working time of the inspector to be assigned does not reach the preset threshold, it means that the inspector's work is not saturated, and inspection tasks need to be continued.
[0148] In actual application, in step 606, the construction site inspection tasks are continuously assigned according to the comparison result until there is no inspector to be assigned to the construction site, which can be implemented in the following two situations:
[0149] The first case: in response to the total working hours of the first inspector being greater than or equal to the preset threshold, the scheduling status of the first inspector is set to full, and the step of determining the construction site corresponding to the highest risk assessment score as the first construction site is returned.
[0150] The second situation: in response to the total working time of the first inspector being less than the preset threshold, the second construction site closest to the first construction site is determined, the second construction site is assigned to the first inspector, the second construction site is deleted from the order of the construction sites to which the inspector is to be assigned, and the second construction site is used as the first construction site, and then the step of calculating the duration of the first inspection journey based on the geographic location information of the first inspector and the location information of the first construction site is returned to.
[0151] In actual applications, the inspection task scheduling system can obtain the risk assessment scores of each construction site from the construction site risk assessment module at a specified time point every day (such as 8 pm), obtain the inspector information from the inspector management system, and automatically assign N construction sites to M inspectors according to the above steps 601 to 606. In this way, the M inspectors can understand their respective inspection tasks for the next day, and no manual assignment is required, saving a lot of manpower and time costs.
[0152] In addition, the construction site risk assessment module can also save the calculated risk assessment scores of the construction site in the MYSQL database in an overwrite or cumulative manner for subsequent analysis of the construction site situation.
[0153] The present application also provides an embodiment of a device for allocating construction site inspection tasks. Figure 7 1 is a schematic diagram of the structure of the first embodiment of the device for allocating construction site inspection tasks in the present application. Figure 7 As shown, the device includes: an acquisition module 701, an evaluation module 702, and a task allocation module 703. Among them:
[0154] The acquisition module 701 is used to obtain a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site. The acquisition module 701 here is equivalent to the decoration construction site management system involved in the third method embodiment.
[0155] The evaluation module 702 uses an LSTM neural network to evaluate the construction site risk text to obtain a risk evaluation score. The evaluation module 702 here is equivalent to the construction site risk evaluation module involved in the third method embodiment.
[0156] The task allocation module 703 allocates the construction site inspection tasks according to the risk assessment scores and pushes the allocated construction site inspection tasks to the corresponding inspectors. The task allocation module 703 is equivalent to the inspection task scheduling system involved in the third method embodiment.
[0157] That is, the acquisition module 701 obtains the construction site risk text; the evaluation module 702 uses the LSTM neural network to evaluate the construction site risk text and obtain the risk assessment score; the task assignment module 703 assigns the construction site inspection task according to the risk assessment score and pushes the assigned construction site inspection task to the corresponding inspector. Among them, the evaluation module 702 can calculate the risk assessment score using the method in the above method embodiment 2 and method embodiment 3, and the task assignment module 703 can assign the inspection task using the method in method embodiment 3, which will not be repeated here.
[0158] The embodiment of the present application also provides a computer-readable medium, the computer-readable storage medium stores instructions, and the instructions can execute the steps in the method of allocating site inspection tasks as described above when executed by a processor. In practical applications, the computer-readable medium can be included in the equipment / device / system described in the above embodiments, or it can exist alone without being assembled into the equipment / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method of allocating site inspection tasks described in the above embodiments can be implemented. According to the embodiment disclosed in the present application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, for example, it can include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, but it is not used to limit the scope of protection of the present application. In the embodiment disclosed in the present application, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, an apparatus or a device or used in combination with it.
[0159] like Figure 8As shown, an embodiment of the present invention further provides an electronic device, in which the device for implementing the method of the embodiment of the present application can be integrated. Figure 8 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present invention, specifically:
[0160] The electronic device may include a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When executing the program in the memory 802, the above-mentioned method of allocating site inspection tasks may be implemented.
[0161] Specifically, in practical applications, the electronic device may further include components such as a power supply 803, an input unit 804, and an output unit 805. Those skilled in the art may understand that Figure 8 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0162] The processor 801 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, thereby monitoring the electronic device as a whole.
[0163] The memory 802 can be used to store software programs and modules, that is, the above-mentioned computer-readable storage medium. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0164] The electronic device also includes a power supply 803 for supplying power to various components, which can be logically connected to the processor 801 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 803 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0165] The electronic device may further include an input unit 804, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0166] The electronic device may further include an output unit 805, which may be used to display information input by a user or information provided to a user and various graphical user interfaces, which may be composed of graphics, text, icons, videos and any combination thereof.
[0167] An embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the method described in any of the above embodiments is implemented.
[0168] The flow chart and block diagram in the accompanying drawings of the present application show the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0169] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments and / or claims of the present application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope disclosed in the present application.
[0170] Specific embodiments are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not used to limit the present application. For those skilled in the art, changes can be made in the specific implementation methods and application scopes according to the ideas, spirits and principles of the present invention, and any modifications, equivalent substitutions, improvements, etc. made therein should be included in the scope of protection of this application.
Claims
1. A method for allocating construction site inspection tasks, characterized in that: The method includes: Obtaining a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site; Processing the construction site risk text using a long short-term memory neural network, and determining a risk assessment score through a shortest editing path as a risk assessment score corresponding to the construction site; and Allocate construction site inspection tasks according to the risk assessment scores, and push the allocated construction site inspection tasks to corresponding inspectors; The steps of processing the construction site risk text using a long short-term memory neural network and determining a risk assessment score by the shortest editing path as the risk assessment score corresponding to the construction site include: The construction site risk text is converted into a first word vector using a set word embedding matrix, where the first word vector is a vector mapping words in the construction site risk text to real numbers; Inputting the first word vector into a long short-term memory neural network for processing to obtain a second word vector, wherein the second word vector represents a vector of a part of speech of a vocabulary; Performing part-of-speech matching on the second word vector and a plurality of third word vectors in a pre-set corpus, calculating the shortest edit path between the second word vector and each of the third word vectors, and selecting the third word vector having the shortest edit path with the second word vector as the fourth word vector, wherein the third word vector is a pre-set weighted word vector, and the weight represents the degree of risk of construction site construction; Performing feature extraction on the fourth word vector to obtain the weight, and using the obtained weight as a construction site risk assessment score; The long short-term memory neural network is trained with the corpus.
2. The method according to claim 1, characterized in that The step of calculating the shortest edit path between the second word vector and each of the third word vectors comprises: The word string corresponding to the second word vector is used as the first string, and the word string corresponding to the third word vector is used as the second string; If the first character string and / or the second character string is an empty character string, the one with the largest number of characters in the first character string and the second character string is taken as the shortest editing path; If both the first string and the second string are not empty strings, then: Delete the last character of the first character string, calculate the shortest edit path between the first character string with the last character deleted and the second character string, and add 1 as the first calculation result; Delete the last character of the second character string, calculate the shortest edit path between the first character string and the second character string with the last character deleted, and add 1 as the second calculation result; Delete the last character of the first character string, delete the last character of the second character string, calculate the shortest edit path between the first character string with the last character deleted and the second character string with the last character deleted, and add 1 if the last character of the first character string is different from the last character of the second character string as the third calculation result; The minimum value among the first calculation result, the second calculation result and the third calculation result is determined, and the determined minimum value is used as the shortest editing path between the first character string and the second character string.
3. The method according to claim 1, characterized in that The steps of obtaining the construction site risk text include: Collect the construction site risk text and save it in a database; Retrieving the construction site risk text from the database and placing it in a message queue; The construction site risk text is obtained from the message queue.
4. The method according to claim 1, characterized in that: The allocating of the construction site inspection tasks according to the risk assessment scores and pushing the allocated construction site inspection tasks to corresponding inspectors includes: Obtaining inspector information of at least one inspector and location information of at least one construction site; Allocating construction site inspection tasks to the inspectors according to the risk assessment scores, the inspector information and the location information of the construction site, and pushing the allocated construction site inspection tasks to the corresponding inspectors; The inspector information includes scheduling status and geographic location information.
5. The method according to claim 4, characterized in that The step of allocating the construction site inspection task to the inspector according to the risk assessment score, the geographical location information of the inspector and the location information of the construction site comprises: sorting the construction sites to which the inspectors are to be assigned according to the risk assessment scores; Determine the construction site corresponding to the highest risk assessment score as the first construction site; Determine, according to the geographic location information of the inspectors, to select the inspector closest to the first construction site from among the inspectors whose schedules are not full as the first inspector, assign the first construction site to the first inspector, and delete the first construction site from the sequence of the construction sites to which the inspectors are to be assigned; Calculating the duration of the first inspection journey according to the geographic location information of the first inspector and the location information of the first construction site; Calculate the total working time of the first inspector according to the pre-set inspection working time and the first inspection journey time; The total working hours of the first inspector are compared with a preset threshold, and construction site inspection tasks are continuously assigned according to the comparison result until there are no more construction sites to which the inspector is to be assigned.
6. The method according to claim 5, characterized in that The method of continuously allocating the construction site inspection tasks according to the comparison results includes: In response to the total working time of the first inspector being greater than or equal to the preset threshold, setting the scheduling status of the first inspector to full, and returning to the step of determining the construction site corresponding to the highest risk assessment score as the first construction site; In response to the total working time of the first inspector being less than the preset threshold, the second construction site closest to the first construction site is determined, the second construction site is assigned to the first inspector, the second construction site is deleted from the order of the construction sites to which the inspector is to be assigned, and the second construction site is used as the first construction site, and then the step of calculating the duration of the first inspection journey based on the geographic location information of the first inspector and the location information of the first construction site is returned to.
7. A device for allocating construction site inspection tasks, characterized in that: The device includes: An acquisition module, used to obtain a construction site risk text, wherein the construction site risk text represents information related to construction risks at the construction site; An evaluation module, using a long short-term memory neural network to evaluate the construction site risk text to obtain a risk evaluation score; A task assignment module assigns construction site inspection tasks according to the risk assessment scores and pushes the assigned construction site inspection tasks to corresponding inspectors; The use of the long short-term memory neural network to evaluate the construction site risk text to obtain a risk assessment score includes: The construction site risk text is converted into a first word vector using a set word embedding matrix, where the first word vector is a vector mapping words in the construction site risk text to real numbers; Inputting the first word vector into a long short-term memory neural network for processing to obtain a second word vector, wherein the second word vector represents a vector of a part of speech of a vocabulary; Performing part-of-speech matching on the second word vector and a plurality of third word vectors in a pre-set corpus, calculating the shortest edit path between the second word vector and each of the third word vectors, and selecting the third word vector having the shortest edit path with the second word vector as the fourth word vector, wherein the third word vector is a pre-set weighted word vector, and the weight represents the degree of risk of construction site construction; Performing feature extraction on the fourth word vector to obtain the weight, and using the obtained weight as a risk assessment score for the construction site; The long short-term memory neural network is trained with the corpus.
8. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the method for allocating construction site inspection tasks as described in any one of claims 1 to 6 are implemented.
9. A computer program product, comprising computer instructions, which, when executed by a processor, implement the method for allocating construction site inspection tasks as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Knowledge graph relational data classification method based on syntactic attention neural network
CN111177394A
Risk inspection method and device for data center, equipment and storage medium
CN112598343A