A recognition method and system

Through the training of self-attention model and word vector weighted summing technology, the problems of unclear boundaries and confusion in data recognition are solved, and the recognition accuracy is improved, especially the accurate determination of passenger safety issues in ride-hailing services, which is alleviated. Manual customer service burden.

CN112016316BActive Publication Date: 2024-11-26BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010894361.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-31
Publication Date
2024-11-26
Estimated Expiration
2040-08-31

AI Technical Summary

Technical Problem

Traditional data identification methods are prone to unclear boundaries or confusion when judging the meaning of data, resulting in inaccurate identification. Especially in determining the safety issues of passengers in travel services, it is difficult to distinguish between relevant and irrelevant statements, resulting in manual customer service. The work is heavy.

Method used

Using the self-attention model, the first training data related to the target and the second training data independent of the target are trained together to generate the recognition model, and the word vector weighted summing and self-attention mechanism are used to determine the correlation between the data to be identified and the target. avoid confusion caused by specific characteristics.

Benefits of technology

It improves the accuracy of data identification, can accurately distinguish confusing data, reduces unclear boundaries, improves the accurate determination of passenger safety issues in ride-hailing services, and reduces the work burden of manual customer service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112016316B_ABST
    Figure CN112016316B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an identification method and system. The identification method comprises: obtaining data to be identified; inputting the data to be identified into a recognition model, wherein the recognition model is obtained by training a self-attention model with first training data related to a target and second training data unrelated to the target; and determining whether the data to be identified is related to the target based on the data to be identified and the recognition model. The present application can determine whether a passenger has safety-related issues, improves the accuracy of identification, and can provide safety protection services to passengers during their ride to ensure the safety of passengers' travel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data identification, and in particular to an identification method and system. Background Art

[0002] In the field of data recognition, the nature of the identified data is usually determined based on the identified features. For example, in the field of natural language processing, keywords contained in a text are identified, and then the meaning of the text is determined based on the keywords contained in the text. Another example is in the field of image recognition, objects contained in an image are identified, and the meaning of the image is determined. However, if we only focus on identifying the unique features of the data, the meaning of data recognition will actually be unclear or confusing.

[0003] Taking the safety of passengers in ride-hailing services as an example, traditional intelligent customer service determines whether a passenger has a safety issue by determining whether the passenger mentions words related to safety issues during the communication process. In practice, there may be unclear boundaries and confusion in the communication between passengers and customer service. For example, the phrase "the driver is driving dangerously" and the phrase "what is dangerous driving behavior" both contain the word "dangerous driving". Traditional recognition methods easily identify both situations as safety issues, which is inaccurate and can easily lead to heavy workloads for manual customer service.

[0004] Therefore, it is necessary to provide an efficient and accurate recognition method to improve the accuracy of data recognition and avoid unclear boundaries or confusion in the data recognition process. Summary of the invention

[0005] One of the embodiments of the present application provides a recognition method. The recognition method includes: obtaining data to be recognized; inputting the data to be recognized into a recognition model, wherein the recognition model is obtained by training a self-attention model with first training data related to a target and second training data unrelated to the target; and determining whether the data to be recognized is related to the target based on the data to be recognized and the recognition model.

[0006] In some embodiments, the recognition method also includes training the self-attention model to obtain the recognition model, and the training process includes: obtaining two or more sets of training data, wherein the multiple sets of training data include at least one set of first training data related to the target, and at least one set of second training data unrelated to the target; and based on the multiple sets of training data, training the self-attention model through a self-attention mechanism to generate the recognition model.

[0007] In some embodiments, the multiple sets of training data include word vectors generated by preprocessing for each word in the multiple sets of corpora, and the training process includes: for each word, obtaining two or more word vectors of the word, and the two or more word vectors are related to different contexts; splicing the two or more word vectors to obtain a common word vector; and determining the attention of the word by using a self-attention mechanism to compare the common word vector with the word vectors of other words in each set of corpora except the word.

[0008] In some embodiments, concatenating the one or more word vectors to obtain a common word vector includes: weighted summing up the word vectors of each word in the multiple sets of training data.

[0009] In some embodiments, the multiple sets of corpora are two sets of corpora, and the two sets of corpora include a set of corpora related to security issues and a set of corpora unrelated to security issues.

[0010] In some embodiments, the preprocessing process includes: using a word vector generation algorithm to generate a word vector for the word.

[0011] In some embodiments, the word vector generation algorithm is Word2Vec.

[0012] In some embodiments, the identification method further includes: executing corresponding measures based on the result of identifying whether the data to be identified is related to the target.

[0013] In some embodiments, the goal is related to a safety issue, and the measures include one or more combinations of continued communication, continuous monitoring, and warnings by the monitoring personnel to the driver.

[0014] One of the embodiments of the present application provides a recognition system, including an acquisition module and a data recognition module; the acquisition module is used to acquire data to be recognized; the data recognition module is used to input the data to be recognized into a recognition model; wherein the recognition model is obtained by training a self-attention model with first training data related to a target and second training data unrelated to the target; based on the data to be recognized and the recognition model, determine whether the data to be recognized is related to the target.

[0015] In some embodiments, the system also includes a training module; the training module is used to obtain the multiple sets of training data, wherein the multiple sets of training data include at least one set of first training data related to the target, and at least one set of second training data unrelated to the target; and, based on the multiple sets of training data, the self-attention model is trained through a self-attention mechanism to generate the recognition model.

[0016] In some embodiments, the multiple sets of training data include word vectors generated by preprocessing for each word in the multiple sets of corpora, and the training process includes: for each word, obtaining two or more word vectors of the word, and the two or more word vectors are related to different contexts; splicing the two or more word vectors to obtain a common word vector; and determining the attention of the word by using a self-attention mechanism to compare the common word vector with the word vectors of other words in each set of corpora except the word.

[0017] In some embodiments, concatenating the one or more word vectors to obtain a common word vector includes: weighted summing up the word vectors of each word in the multiple sets of training data.

[0018] In some embodiments, the multiple sets of corpora are two sets of corpora, and the two sets of corpora include a set of corpora related to security issues and a set of corpora unrelated to security issues.

[0019] In some embodiments, the preprocessing process includes: using a word vector generation algorithm to generate a word vector for the word.

[0020] In some embodiments, the word vector generation algorithm is Word2Vec.

[0021] In some embodiments, the identification method further includes: executing corresponding measures based on the result of identifying whether the data to be identified is related to the target.

[0022] In some embodiments, the goal is related to a safety issue, and the measures include one or more combinations of continued communication, continuous monitoring, and warnings by the monitoring personnel to the driver.

[0023] One of the embodiments of the present application provides an identification device, including a processor, wherein the processor is used to execute the identification method.

[0024] One of the embodiments of the present application provides a computer-readable storage medium, wherein the storage medium stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the identification method. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The present application will be further described in the form of exemplary embodiments, which will be described in detail by way of the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0026] Figure 1 is a schematic diagram of an application scenario of an identification system according to some embodiments of the present application;

[0027] Figure 2is an exemplary flow chart of an identification method according to some embodiments of the present application;

[0028] Figure 3 is an exemplary flow chart of a recognition model training method according to some embodiments of the present application;

[0029] Figure 4 is an exemplary flow chart of a method for determining word attention according to some embodiments of the present application; and

[0030] Figure 5 It is a module diagram of an identification system according to some embodiments of the present application. DETAILED DESCRIPTION

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0032] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0033] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprises" and "includes" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0034] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, the various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.

[0035] The embodiments of the present application can be applied to different transportation systems, including but not limited to one or a combination of land, sea, aviation, aerospace, etc. For example, taxis, special cars, ride-sharing, buses, drivers, trains, motor vehicles, high-speed railways, ships, airplanes, hot air balloons, unmanned vehicles, express delivery, etc. apply management and / or distribution transportation systems. The application scenarios of different embodiments of the present application include but are not limited to one or a combination of web pages, browser plug-ins, clients, customized systems, internal enterprise analysis systems, artificial intelligence robots, etc. It should be understood that the application scenarios of the system and method of the present application are only some examples or embodiments of the present application. For ordinary technicians in this field, without paying creative labor, the present application can also be applied to other similar scenarios based on these drawings. For example, other similar user-guided parking systems.

[0036] The "passenger", "passenger terminal", "user terminal", "customer", "demander", "service demander", "consumer", "consumer", "user demander", etc. described in this application are interchangeable and refer to the party that needs or orders the service, which can be an individual or a tool. Similarly, the "driver", "driver terminal", "provider", "supplier", "service provider", "service provider", "service provider", "service party", etc. described in this application are also interchangeable and refer to individuals, tools or other entities that provide services or assist in providing services. In addition, the "user" described in this application can be the party that needs or orders the service, or the party that provides the service or assists in providing the service.

[0037] Figure 1 It is a schematic diagram of an application scenario of the identification system 100 according to some embodiments of the present application.

[0038] The recognition system 100 can be used in any scenario where data recognition is required in order to take corresponding measures according to the recognition results. For example, in the field of image recognition, for posture recognition of dangerous human movements, how to distinguish dangerous false movements (such as pretending to attack others) and dangerous movements (such as assault movements with real attack intentions) to avoid alarming for dangerous false movements, and alarming for dangerous movements, the recognition system 100 can be used to identify and distinguish dangerous false movements and dangerous movements. For another example, in the field of natural language processing and speech recognition, for recognition of text or voice content, how to judge whether the text or voice content is specifically related to safety issues (such as text or voice content containing conversation content related to dangerous driving) to avoid alarming for text or voice content that does not have safety issues (such as questions about what is dangerous driving), the recognition system 100 can be used to identify and distinguish text or voice content that does not have safety issues from similar text or voice content that has safety issues. In addition, the recognition system 100 can also distinguish similar data that is prone to misidentification in various industries such as economy, culture, education, medical care, and public management to avoid affecting subsequent execution measures.

[0039] In some embodiments, the identification of data usually determines the nature of the identified data based on the identified features. However, if we only focus on the unique features of the identified data, the meaning of data identification may actually be unclear or confusing. Taking the safety of passengers in ride-hailing services as an example, traditional intelligent customer service determines whether passengers have safety issues by determining whether the passengers mention words related to safety issues during the communication process. In practice, there may be unclear boundaries and confusion in the communication between passengers and customer service. For example, the sentence containing "the driver is driving dangerously" and the sentence containing "what is dangerous driving behavior" both contain dangerous driving words. Traditional identification methods easily determine that both situations have safety issues. Inaccurate identification can easily lead to heavy workload for manual customer service. In some embodiments, the identification system 100 can distinguish and identify confusing data to improve the accuracy of data identification and avoid unclear boundaries or confusion in the data identification process.

[0040] like Figure 1 As shown, the identification system 100 may include a server 110 , a network 120 , a data acquisition terminal 130 , and a storage device 140 .

[0041] The server 110 may be deployed with a recognition model, which may identify the data to be recognized and determine whether it is related to the target, thereby avoiding misjudgment of data that is close to the target. In some embodiments, the recognition model may determine whether the data to be recognized is related to the target by judging the attention of the data to be recognized, wherein the attention may capture the internal correlation of the data or features, so as to define the data by the internal correlation of the data or features, thereby avoiding confusion of meaning or inaccurate recognition caused by defining the data according to a specific feature of the data or features. In some embodiments, the recognition model may be obtained by training a self-attention model with first training data related to the target and second training data unrelated to the target. For an exemplary recognition process of the recognition model, see Figure 2 , steps 210 to 270; the exemplary training generation process of the recognition model can be found in the attached Figure 3 , 4 , step 320 to step 340.

[0042] In some embodiments, the server 110 may be a single server or a server group. The server group may be a centralized server group connected to the network via an access point, or a distributed server group connected to the network via at least one access point. In some embodiments, the server 110 may be implemented on a cloud platform. As an example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-layer cloud, etc., or any combination thereof.

[0043] The network 120 connects the components of the recognition system 100 so that the components can communicate with each other to facilitate the exchange of information and / or data. In some embodiments, at least one component in the image recognition system 100 (e.g., the server 110, the data acquisition terminal 130, the storage device 140) can send information and / or data to other components in the recognition system 100 via the network 120.

[0044] In some embodiments, the network 120 between the components of the identification system 100 may be any one or more of a wired network or a wireless network. For example, the network 120 may include a cable network, a wired network, an optical fiber network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network, or a wireless network. TM (Bluetooth), ZigBee Network TM (ZigBee), near field communication (NFC), a bus within a device, a line within a device, a cable connection, or any combination thereof. The network connection between each two parts may be in one of the above ways, or in multiple ways.

[0045] In some embodiments, the network 120 may include at least one network access point. For example, the network 120 may include a wired or wireless network access point, such as a base station and / or an Internet exchange point 120-1, 120-2, ..., and at least one component of the identification system 100 may be connected to the network 120 to exchange data and / or information.

[0046] The data acquisition terminal 130 can acquire identification data (e.g., images, videos, voices, or text, etc.) provided to the server 110 for identification processing. In some embodiments, the owner of the data acquisition terminal can be a staff member (e.g., a driver), a user (e.g., a passenger, a shopping mall customer, etc.). In some embodiments, the owner of the data acquisition terminal 130 can be someone other than the user himself. For example, the owner A of the data acquisition terminal 130 can use the data acquisition terminal 130 to send a service request for passenger B, and / or receive a service confirmation and / or information or instructions from the server 110. The data acquisition terminal 130 can communicate with the server 110 via the network 120.

[0047] In some embodiments, the data acquisition terminal 130 may include various devices with information receiving and / or sending functions. The data acquisition terminal 130 may include multiple terminals 130-1, 130-2, ..., 130-n. For example, the data acquisition terminal 1300 may include a mobile device 130-1, a tablet computer 130-2, a laptop computer 130-3, a vehicle-mounted terminal device 130-4, etc. or any combination thereof. Specifically, the vehicle-mounted terminal device 130-4 may include a built-in computer, a vehicle-built-in TV, a built-in tablet computer, etc. The above examples are only used to illustrate the wide range of the device range and are not intended to limit its scope.

[0048] The storage device 140 can store data and / or instructions. The data may include various types of data to be recognized (such as images, videos, voices or texts, etc.), recognition models (such as salient recognition algorithms, voice recognition algorithms, etc.), user information (such as name, gender, etc.), user real-time information (vehicle information, boarding location information), etc. In some embodiments, the storage device 140 can store data obtained from the data acquisition terminal 130. For example, images, videos, voices or texts, etc. For another example, the storage device 140 can store data related to the processing of the server 110, such as recognition model training data (such as first training data, second training data, etc.).

[0049] In some embodiments, the storage device 140 may include a mass storage, a removable storage, a volatile read-write memory, a read-only memory (ROM), etc. or any combination thereof. Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state disk, etc. Exemplary removable storage may include a flash drive, a floppy disk, an optical disk, a memory card, a compressed disk, a tape, etc. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary RAM may include a dynamic random access memory (DRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), a static random access memory (SRAM), a thyristor random access memory (T-RAM), and a zero capacitance random access memory (Z-RAM), etc. Exemplary read-only memory may include a mask read-only memory (MROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (PEROM), an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM), and a digital versatile disk read-only memory, etc. In some embodiments, the storage device 140 may be implemented on a cloud platform. By way of example only, a cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an on-premises cloud, a multi-tier cloud, the like, or any combination thereof.

[0050] In some embodiments, at least one component in the recognition system 100 may access data or instructions stored in the storage device 140 via the network 120. In some embodiments, the storage device 140 may be directly connected to the server 110 as a backend storage.

[0051] It should be noted that the above description of the identification system 100 is only for example and illustration, and does not limit the scope of application of the present application. For those skilled in the art, various modifications and changes can be made to the identification system 100 under the guidance of the present application. However, these modifications and changes are still within the scope of the present application.

[0052] Figure 2 is an exemplary flow chart of the identification method 200 according to some embodiments of the present application. Figure 2 As shown, the identification method 200 may include:

[0053] Step 210 , obtaining the data to be identified. Specifically, this step may be performed by the obtaining module 510 .

[0054] In some embodiments, the data to be identified may refer to data used for identification model recognition to determine whether it is related to the target. The data to be identified includes images, videos, voices, text materials, etc. The data to be identified may be collected and acquired by the data acquisition terminal 130. Taking the safety of passengers in ride-hailing services as an example, the data to be identified may be voice materials acquired by a mobile device 130-1 (such as a mobile phone) held by the passenger. The data to be identified may also be voice materials recorded by a vehicle-mounted terminal device 130-4 carried by the vehicle. By identifying the voice materials recorded by the mobile device 130-1 or the vehicle-mounted terminal device 130-4, it is determined whether there is a safety problem for the passenger. Taking public intelligent security as an example, the data to be identified may be images or video materials acquired by monitoring equipment. By identifying whether there are dangerous human movements in the images or video materials, it is determined whether an alarm or other measures need to be initiated.

[0055] Step 230 , inputting the data to be recognized into the recognition model. Specifically, this step can be performed by the recognition module 520 .

[0056] In some embodiments, the recognition model may be used to distinguish similar data to be recognized, so as to avoid the data to be recognized being misidentified and distinguished. Taking the safety of passengers in ride-hailing services as an example, similar data to be recognized may refer to images, voices or text materials that clearly do not have safety issues or have safety issues, such as "what is dangerous driving" and "the driver is in dangerous driving behavior".

[0057] In some embodiments, the recognition model is obtained by training a self-attention model with first training data related to the target and second training data unrelated to the target. In some embodiments, the target may refer to a safety issue, and the safety issue may include the safety of passengers in ride-hailing services, safety issues in public places, anti-theft issues in shopping malls, etc. In some embodiments, related to the target may refer to related to safety issues, and unrelated to the target may refer to unrelated to safety issues. Exemplarily, "what is dangerous driving" is unrelated to safety issues, and "the driver is engaging in dangerous driving behavior" is related to safety issues. In some embodiments, the self-attention model may include an attention layer. In some embodiments, training the self-attention model with first training data related to the target and second training data unrelated to the target to obtain a recognition model may include: for each training data, training the attention model weights through the attention layer of the self-attention model. Specifically, the attention model weights may include a weight matrix W corresponding to the query vector, key vector, and value vector used to calculate the attention. q , W k , W vIn some embodiments, attention can capture the internal correlation of data or features to define data through the internal correlation of data or features, avoiding confusion of meaning or inaccurate recognition caused by defining data based on a specific feature of the data or features. Figure 3 , step 320 to step 340.

[0058] Step 250 , based on the data to be identified and the identification model, determines whether the data to be identified is related to the target. Specifically, this step can be performed by the identification module 520 .

[0059] In some embodiments, after the data to be identified is input into the recognition model, it can be determined whether the data to be identified is related to the target based on the data to be identified and the recognition model. In some embodiments, the recognition model can determine whether the data to be identified is related to the target by judging the attention of the data to be identified. Exemplarily, taking "What is dangerous driving" and "The driver is performing dangerous driving behavior" as examples, since the correlation between "what" and "dangerous driving" in the sentence "What is dangerous driving" is low, after passing through the attention layer of the recognition model, the result of low mutual attention between "what" and "dangerous driving" is output, and finally the result of low mutual attention between "what" and "dangerous driving" is classified by the classifier, and judged to be irrelevant to the target. Therefore, it can be finally determined that the data to be identified ("What is dangerous driving") is irrelevant to the target (safety issue), while the correlation between "perform" and "dangerous driving" in the sentence "The driver is performing dangerous driving behavior" is high. After passing through the attention layer of the recognition model, the result of high mutual attention between "perform" and "dangerous driving" is output, and finally the result of high mutual attention between "perform" and "dangerous driving" is classified by the classifier, and judged to be related to the target. Therefore, it can be finally determined that the data to be identified ("The driver is performing dangerous driving behavior") is related to the target (safety issue). In some embodiments, the classifier may include a perceptron method, a least square error method, a SVM method, a neural network method, a radial basis function (RBF) method, a softmax classification, etc. In addition, the attention calculation process can be detailed in the attached Figure 4 , step 450.

[0060] Step 270 , based on the result of identifying whether the data to be identified is related to the target, execute corresponding measures. Specifically, this step can be executed by the execution module 540 .

[0061] In some embodiments, corresponding measures can be executed based on the result of identifying whether the data to be identified is related to the target (such as a safety issue) to ensure the timely use of the identification results. In some embodiments, the result related to the target can refer to the result of judging whether the voice material is related to the safety issue. Exemplarily, for example, the result related to the safety issue can refer to judging, based on the voice material, that the driver has engaged in driving behaviors that do not comply with traffic rules, such as speeding and running red lights; for another example, the result related to the safety issue can refer to judging, based on the voice material, that the driver has engaged in behaviors that harm passengers, such as infringement and attack.

[0062] In some embodiments, executing corresponding measures may include sending one or more combinations of continued communication, continuous monitoring, and warnings to objects related to the target. In some embodiments, when the recognition system 100 identifies that the data to be identified is related to the target (such as a safety issue), the recognition system 100 may send continued communication, continuous monitoring, warnings, etc. to the driver to prevent the driver from causing harm to passengers. In some embodiments, the driver may include drivers of public transportation vehicles such as bus drivers and taxi drivers.

[0063] Figure 3 FIG. 3 is an exemplary flow chart of a method 300 for training a recognition model according to some embodiments of the present application. Figure 3 As shown, the training method 300 of the recognition model may include:

[0064] Step 320 , obtaining two or more sets of training data, wherein the multiple sets of training data include at least one set of first training data related to the target and at least one set of second training data unrelated to the target. Specifically, this step may be performed by the training module 530 .

[0065] The training data may refer to a data set used to input the self-attention model training to generate the recognition model. The training data may include images, videos, voices, texts, or data generated by processing them (such as image feature matrices, word vectors), etc. In some embodiments, the training data may be obtained from the storage device 140. In some embodiments, the training data may be obtained through the data acquisition terminal 130.

[0066] The multiple sets of training data may include at least one set of first training data related to the target, and at least one set of second training data unrelated to the target. In some embodiments, whether a set of data is related to the target can be judged based on the context of the word. Taking the safety of passengers in a ride-hailing service as an example, "what is dangerous driving" is unrelated to the safety issue, and "the driver is in dangerous driving behavior (such as speeding)" is related to the safety issue. The first training data may include voice materials such as "what is dangerous driving" that are unrelated to the safety issue, and the second training data may include voice materials such as "the driver is in dangerous driving behavior (such as speeding)" that are related to the safety issue. In some embodiments, the first training data may include text such as "what is dangerous driving", or the corresponding word vector of the text, and the second training data may include text such as "the driver is in dangerous driving behavior (such as speeding)", or the corresponding word vector of the text. In some embodiments, the word vector corresponding to the text can be generated using a word vector generation algorithm (such as Word2Vec). In some embodiments, both the first training data and the second training data may include training samples and corresponding identification samples, and the recognition process of obtaining corresponding identification samples from the training samples is trained by inputting the training samples and the corresponding identification samples. In some embodiments, the identification samples may be completed based on manual labeling or automatic labeling. Among them, labeling may be to assign values ​​to the sentences of the training samples. Taking "What is dangerous driving" and "The driver is in dangerous driving behavior" as examples, "What is dangerous driving" is marked as "0", and "The driver is in dangerous driving behavior" is assigned "1", where "0" and "1" may also be replaced by other symbols. In some embodiments, automatic labeling of identification samples may be based on classification ideas. In some embodiments, the labeling method based on classification ideas may include a classification labeling method for supervised learning and a classification labeling method for unsupervised learning. For example, the classification labeling method for supervised learning may be based on a Gaussian mixture model. For another example, the classification labeling method for supervised learning may be based on a restricted Boltzmann machine for feature learning and applied to annotation.

[0067] Step 340 , based on multiple sets of training data, a self-attention model is trained through a self-attention mechanism to generate a recognition model. Specifically, this step can be performed by the training module 530 .

[0068] After obtaining multiple sets of training data, the self-attention model can be trained through the self-attention mechanism based on the multiple sets of training data to generate a recognition model. In some embodiments, the self-attention mechanism can refer to a bionic data processing process that imitates the internal process of biological observation behavior, reduces dependence on external information, and captures the internal correlation of data or features. For example, when humans read, usually only a small number of words to be read will be paid attention to and processed. The self-attention mechanism can simulate this process, convert the read text into data for processing, and pay attention to a small number of words to be read to understand the semantics.

[0069] In some embodiments, the self-attention model may refer to a specific training model of the self-attention mechanism. In some embodiments, the self-attention model may include an attention layer. In some embodiments, the attention layer may calculate the attention of each word in the training sample to obtain the relevance of the word relative to other words in the training sample. For the detailed process of calculating the attention of each word, please refer to the attached Figure 4 , steps 410 to 450. In some embodiments, after obtaining the output result of the model corresponding to the training sample, it can be compared with the expected identification sample, for example, comparing the difference between the final output value of the model (0-1) and the expected identification sample (0 or 1). If the final output value of the training sample model is significantly different from the expected identification sample, the back propagation algorithm can be used to adjust the weight of the attention model to obtain a recognition model with adjusted weights. In some embodiments, the weight of the attention model may include a weight matrix W corresponding to the query vector, key vector, and value vector used to calculate the attention q , W k , W v .

[0070] Figure 4 is an exemplary flow chart of a method 400 for determining word attention according to some embodiments of the present application.

[0071] The multiple sets of training data include word vectors generated by preprocessing each word in the multiple sets of corpora. In some embodiments, the multiple sets of corpora may include voice materials or texts corresponding to the voice materials collected from the data acquisition terminal 130, wherein the multiple sets of corpora may include at least one set of voice materials related to security issues or texts corresponding to the voice materials, and at least one set of voice materials unrelated to security issues or texts corresponding to the voice materials. In some embodiments, the word vectors generated by preprocessing each word in the multiple sets of corpora may be generated using a word vector generation algorithm, wherein the word vector generation algorithm may include Word2Vec. Figure 4 As shown, the method 400 for determining word attention may include performing the following steps for each word:

[0072] Step 410 , obtaining two or more word vectors of a word, wherein the two or more word vectors are related to different contexts. Specifically, this step may be performed by the training module 530 .

[0073] Words may refer to words that make up a sentence. In some embodiments, a sentence may be split into words, wherein splitting a sentence into words may be achieved by word segmentation. In some embodiments, word segmentation methods may include forward maximum matching word segmentation, reverse maximum matching word segmentation, word grid word segmentation based on statistics, bidirectional maximum matching word segmentation, etc.

[0074] In some embodiments, since each word can exist in each set of corpora, each word can have different word vectors in multiple sets of corpora under different contexts, so as to obtain two or more word vectors of the word, so as to distinguish the two sets of corpora through word vectors. Taking the safety of passengers in ride-hailing services as an example, for "what is dangerous driving", the context information for the word "dangerous driving" is "what" and "is", and for "the driver is in dangerous driving behavior", the context information for the word "dangerous driving" is "driver", "in" and "behavior". The word vector representation method of the DistributedRepresentation class can represent "dangerous driving" as [v1], [v2], where v1 and v2 have different data respectively due to different context information of "dangerous driving". In some embodiments, the word vector generated by preprocessing each word in multiple sets of corpora can be generated by a word vector generation algorithm, wherein the word vector generation algorithm can include Word2Vec. In some embodiments, obtaining two or more word vectors of a word can be obtained from the storage device 140. It is worth noting that the above description of word vectors is only exemplary. In practice, the dimensions of word vectors can be dozens or hundreds of dimensions.

[0075] Step 430 , concatenating two or more word vectors to obtain a common word vector. Specifically, this step may be performed by the training module 530 .

[0076] In some embodiments, after obtaining two or more word vectors, they can be weighted and summed to generate a common word vector, so as to perform a unified attention calculation for the word and determine which set of corpus the word has more attention. In some embodiments, after obtaining two or more word vectors, weighted summing them can be adding two or more word vectors and averaging them. In some embodiments, after taking two or more word vectors, weighted summing them can be obtained by multiplying the two or more word vectors by corresponding values, and then adding them and averaging them. In some embodiments, a common word vector can refer to a word vector calculated based on the word vector corresponding to the same word in multiple sets of corpora. Specifically, a common word vector can be obtained by adding two or more word vectors and averaging them. Taking the safety of passengers in ride-hailing services as an example, for the word vectors [0.1, 0.2, 0.1] and [0.1, 0.1, 0.3] of "What is dangerous driving" and "The driver is in dangerous driving behavior", the calculated common word vector can be expressed as [0.1, 0.15, 0.2].

[0077] Step 450 , the common word vector and the word vectors of other words in each corpus except the word are used to determine the attention of the word through a self-attention mechanism. Specifically, this step can be performed by the training module 530 .

[0078] In some embodiments, attention may refer to the relevance of the word to other words, wherein the relevance between words may include a similarity calculation process between words. In some embodiments, the similarity calculation method between words may include dot product, weight, concatenation weight, perceptron, etc.

[0079] In some embodiments, the attention of the word and other words in each corpus can be obtained based on the common word vector of the word and the word vectors of other words in each corpus except the word. Taking the safety of passengers in ride-hailing services as an example, for "driver", "existence", "dangerous driving" and "behavior" respectively, there are two sets of corpora, and the word vectors of "dangerous driving" in the two sets of corpora are W0' and W0", respectively. The calculated common word vector is W0, and the word vectors of "driver", "existence" and "behavior" in the two sets of corpora are W1' and W1", W2' and W2", W3' and W3", respectively, and the corresponding common word vectors W1, W2, and W3 are obtained in turn. Taking the attention calculation of the common word vector W0 of "dangerous driving" as an example, the attention a12' and a12" of W0 and W1', W1" can be calculated respectively, and then the Wa vector is calculated by weighted sum of W1', W1", a12', a12" and then the vectors Wb and Wc corresponding to the common word vector W0 and W2' and W2", W3' and W3" are calculated in turn. Finally, W0, Wa, Wb, Wc are calculated through the attention mechanism to get the attention Z0 corresponding to "dangerous driving". Similarly, the attention Z1, Z2, Z3 of "driver", "existence" and "behavior" can be calculated, and finally Z0, Z1, Z2, Z3 are input into the classifier (such as logistic regression classifier) ​​for classification. After classification, the identification process of whether the sample is related to safety issues can be completed. In some embodiments, for the training process, after Z0, Z1, Z2, and Z3 are input into a classifier (e.g., a logistic regression classifier) ​​for classification, it can be determined whether the classification result (e.g., 0-1) matches the sample label (0 or 1). If the classification result does not match the sample label, the weight of the recognition model can be adjusted through a back propagation algorithm. In some embodiments, it can include calculating the weight matrices Wq, Wk, and Wv corresponding to the query vector, key vector, and value vector used for attention.

[0080] In some embodiments, the specific process of calculating attention through the attention mechanism may include: multiplying multiple word vectors by the weight matrix W q , W k , W v Correspondingly, we obtain the query vector q, key vector k, and value vector v. Then, we calculate the dot product between the query vector q of the word and all key vectors k to obtain the attention weight of the word and all words. Finally, we multiply the attention weights with the value vector v of the corresponding word and sum them up to get the attention of the word. In some embodiments, multiple word vectors can be combined into a matrix and then multiplied with the weight matrix W. q , W k , W v Multiply them together and then get a matrix set of query vector q, key vector k, and value vector v to reduce the number of calculation steps.

[0081] Figure 5 is a module diagram of an identification system 500 according to some embodiments of the present application. Figure 5 As shown, the recognition system 500 may include an acquisition module 510 , a recognition module 520 , a training module 530 and an execution module 540 .

[0082] The acquisition module 510 can be used to acquire data to be identified. The data to be identified can refer to data used to identify whether the model is related to the target. In some embodiments, the data to be identified includes images, videos, voices, text materials, etc. In some embodiments, the data to be identified can be collected and acquired by the data acquisition terminal 130. In some embodiments, the data to be identified can be acquired by a mobile communication device (such as a mobile phone) held by a passenger. In some embodiments, the data to be identified can be voice data recorded by the vehicle-mounted terminal device 130-4 carried by the vehicle.

[0083] The recognition module 520 can be used for the data recognition module to input the data to be recognized into the recognition model; wherein the recognition model is obtained by training the self-attention model with the first training data related to the target and the second training data unrelated to the target; according to the data to be recognized and the recognition model, determine whether the data to be recognized is related to the target. In some embodiments, the recognition model may refer to a method for distinguishing similar data to be recognized to avoid the data to be recognized being misidentified and distinguished. In some embodiments, the recognition model is obtained by training the self-attention model with the first training data related to the target and the second training data unrelated to the target. In some embodiments, the recognition model identifies whether the data to be recognized is related to the target by judging the attention of the data to be recognized.

[0084] The training module 530 can be used to obtain multiple sets of training data, wherein the multiple sets of training data include at least one set of first training data related to the target, and at least one set of second training data unrelated to the target; and, based on the multiple sets of training data, the self-attention model is trained by the self-attention mechanism to generate a recognition model. In some embodiments, the training data may refer to a data set used to input the self-attention model to train and generate a recognition model. In some embodiments, the training data may include images, videos, voices, texts, or data generated by processing thereof (such as image feature matrices, word vectors), etc. In some embodiments, the target may refer to a safety issue. In some embodiments, being related to the target may refer to being related to a safety issue, and being unrelated to the target may refer to being related to a safety issue. In some embodiments, the first training data may include text such as "What is dangerous driving" corresponding to a word vector generated using Word2Vec, and the second training data may include text such as "The driver is in dangerous driving behavior (such as speeding)" corresponding to a word vector generated using Word2Vec. In some embodiments, the self-attention mechanism may refer to a biomimetic data processing process that imitates the internal process of biological observation behavior, reduces dependence on external information, and captures the internal correlation of data or features. In some embodiments, the self-attention model may include an attention layer. In some embodiments, the attention layer can calculate the attention of each word in the training sample. In some embodiments, after obtaining the output result of the model corresponding to the training sample, it can be compared with the expected identification sample, for example, comparing the difference between the final output value of the model (0-1) and the expected identification sample (0 or 1). If the difference between the training sample and the expected identification sample is large, the back propagation algorithm can be used to adjust the weight of the attention model to obtain a recognition model with adjusted weights. In some embodiments, the weight of the attention model may include a weight matrix W corresponding to the query vector, key vector, and value vector used to calculate the attention q , W k , W v .

[0085] The execution module 540 can be used to execute corresponding measures based on the result of identifying whether the data to be identified is related to the target. In some embodiments, the measures can include one or more combinations of continued communication, continuous monitoring, and warnings by the monitoring personnel to the driver.

[0086] It should be understood that Figure 5The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or a dedicated design hardware. Those skilled in the art will understand that the above-mentioned method and system can be implemented using computer executable instructions and / or included in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The system and its modules of the present application can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software such as executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software (for example, firmware).

[0087] It should be noted that the above description of the candidate item display and determination system and its modules is only for convenience of description and does not limit the present application to the scope of the embodiments. It is understandable that, after understanding the principle of the system, those skilled in the art may arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from the principle. For example, in some embodiments, Figure 5 The acquisition module 510, the identification module 520, the training module 530, and the execution module 540 disclosed in the system can be different modules in a system, or a module can realize the functions of two or more modules mentioned above. For example, the identification module 520 and the training module 530 can be two modules, or a module can have both identification and training functions. For example, each module can share a storage module, or each module can have its own storage module. Such variations are all within the scope of protection of this application.

[0088] The beneficial effects that may be brought about by the embodiments of the present application include but are not limited to: 1) It is possible to identify the data to be identified and determine whether it is related to the target, thereby avoiding misjudgment of data that is close to the target; 2) It is possible to determine whether the passenger has safety-related problems, improve the accuracy of identification, and provide safety protection services to the passengers during the ride to ensure the safety of the passengers. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other possible beneficial effects.

[0089] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.

[0090] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.

[0091] In addition, it will be appreciated by those skilled in the art that various aspects of the present application may be illustrated and described by a number of patentable categories or situations, including any new and useful process, machine, product or combination of substances, or any new and useful improvements thereto. Accordingly, various aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may all be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". In addition, various aspects of the present application may be represented as a computer product located in one or more computer-readable media, which includes computer-readable program code.

[0092] A computer storage medium may include a propagated data signal containing computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination. A computer storage medium may be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit the program for use. The program code on the computer storage medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of the above media.

[0093] The computer program coding required for the operation of each part of the application can be written in any one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc., conventional procedural programming languages ​​such as C language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages ​​such as Python, Ruby and Groovy, or other programming languages, etc. The program coding can be run completely on the user's computer, or run on the user's computer as an independent software package, or run partly on the user's computer and partly on the remote computer, or run completely on the remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as software as a service (SaaS).

[0094] In addition, unless explicitly stated in the claims, the order of processing elements and sequences, the use of alphanumeric characters, or the use of other names in the present application are not intended to limit the order of the processes and methods of the present application. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of the present application. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.

[0095] Similarly, it should be noted that in order to simplify the description of the disclosure of this application and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this application, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the object of this application are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.

[0096] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of the present application are approximate values, in specific embodiments, the setting of such numerical values ​​is as accurate as possible within the feasible range.

[0097] Each patent, patent application, patent application disclosure, and other materials, such as articles, books, instructions, publications, documents, etc., cited in this application are hereby incorporated by reference in their entirety. Except for application history documents that are inconsistent with or conflicting with the content of this application, documents that limit the broadest scope of the claims of this application (currently or later attached to this application) are also excluded. It should be noted that if the description, definition, and / or use of terms in the attached materials of this application are inconsistent or conflicting with the content of this application, the description, definition, and / or use of terms in this application shall prevail.

[0098] Finally, it should be understood that the embodiments in this application are only used to illustrate the principles of the embodiments of this application. Other variations may also fall within the scope of this application. Therefore, as an example and not a limitation, the alternative configurations of the embodiments of this application may be considered to be consistent with the teachings of this application. Accordingly, the embodiments of this application are not limited to the embodiments explicitly introduced and described in this application.

Claims

1. A recognition method, the method comprising: Obtaining data to be identified; The data to be recognized is input into a recognition model, wherein the recognition model is obtained by training a self-attention model through a self-attention mechanism based on multiple sets of training data, wherein the multiple sets of training data include at least one set of first training data related to the target and at least one set of second training data unrelated to the target; the multiple sets of training data include word vectors generated by preprocessing each word in multiple sets of corpora, and the training process includes: For each word, Obtain two or more word vectors for the word, wherein the two or more word vectors are associated with different contexts; Concatenate the two or more word vectors to obtain a common word vector, where the common word vector is calculated based on the two or more word vectors corresponding to the word in the multiple sets of corpora; The common word vector and the word vectors of other words in each corpus except the word determine the attention of the word through the self-attention mechanism, specifically including: Determine the attention of the word based on the common word vector of the word and the word vectors of other words in each set of corpus except the word; and According to the data to be recognized and the recognition model, it is determined whether the data to be recognized is related to the target, and whether the data to be recognized is related to the target is determined based on the attention of the data to be recognized.

2. The method of claim 1, wherein concatenating the two or more word vectors to obtain a common word vector comprises: The word vectors of each word in the multiple sets of training data are weighted summed.

3. According to the method of claim 1, the multiple sets of corpora are two sets of corpora, and the two sets of corpora include a set of corpora related to security issues and a set of corpora unrelated to security issues.

4. The method according to claim 1, wherein the pre-processing process comprises: Use a word vector generation algorithm to generate a word vector for the word.

5. The method as claimed in claim 4, wherein the word vector generation algorithm is Word2Vec.

6. The method of claim 1, further comprising: Based on the result of identifying whether the data to be identified is related to the target, corresponding measures are executed.

7. The method of claim 6, wherein the goal is related to a security issue, and The measures include one or more combinations of continued communication, continuous monitoring, and warnings to objects related to the target.

8. A security problem identification system, comprising an acquisition module and an identification module; The acquisition module is used to acquire the data to be identified; The recognition module is used to input the data to be recognized into the recognition model; determine whether the data to be recognized is related to the target according to the data to be recognized and the recognition model, and whether the data to be recognized is related to the target is determined based on the attention of the data to be recognized; wherein, The recognition model is obtained by training a self-attention model through a self-attention mechanism based on multiple sets of training data, wherein the multiple sets of training data include at least one set of first training data related to the target and at least one set of second training data unrelated to the target; The multiple sets of training data include word vectors generated by preprocessing each word in the multiple sets of corpora, and the training process includes: For each word, Obtain two or more word vectors for the word, wherein the two or more word vectors are associated with different contexts; splicing the two or more word vectors to obtain a common word vector, wherein the common word vector is calculated based on the two or more word vectors corresponding to the word in the multiple sets of corpora; and The common word vector and the word vectors of other words in each corpus except the word determine the attention of the word through the self-attention mechanism, specifically including: The attention of the word is determined based on the common word vector of the word and the word vectors of other words except the word in each set of corpus.

9. An identification device, comprising a processor, wherein the processor is used to execute the identification method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein the storage medium stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the identification method according to any one of claims 1 to 7.