CN113962382A - Training sample construction method and device, electronic equipment and readable storage medium - Google Patents

Training sample construction method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113962382A
CN113962382A CN202111158831.8A CN202111158831A CN113962382A CN 113962382 A CN113962382 A CN 113962382A CN 202111158831 A CN202111158831 A CN 202111158831A CN 113962382 A CN113962382 A CN 113962382A
Authority
CN
China
Prior art keywords
travel
scheme
operation information
sets
travel scheme
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111158831.8A
Other languages
Chinese (zh)
Inventor
史盟钊
梅怀博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111158831.8A priority Critical patent/CN113962382A/en
Publication of CN113962382A publication Critical patent/CN113962382A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Abstract

The disclosure provides a training sample construction method and device, electronic equipment and a readable storage medium, and relates to the technical fields of intelligent transportation, deep learning and the like. The construction method of the training sample comprises the following steps: acquiring a travel scheme set; obtaining an operation information set of each trip scheme set according to the operation information of each trip scheme in the corresponding trip scheme set; obtaining a pre-estimation model by using the operation information sets of the first travel scheme sets and the actual travel schemes in the first travel scheme sets; inputting the operation information sets of the plurality of second trip scheme sets into the estimation model to obtain an actual trip scheme prediction result output by the estimation model for each second trip scheme set; and obtaining a construction result of the training sample according to the plurality of second travel scheme sets and actual travel scheme prediction results of the plurality of second travel scheme sets. The method and the device can reduce the construction cost of the training sample and improve the construction efficiency and accuracy of the training sample.

Description

Training sample construction method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of computer technology, and more particularly to the field of artificial intelligence technologies such as intelligent transportation and deep learning. A training sample construction method, a training sample construction device, an electronic device and a readable storage medium are provided.
Background
With the rapid development of artificial intelligence technologies such as deep learning, an LTR (Learn To Rank, order learning) model plays an increasingly important role in a search system and a recommendation system. Trip plan planning, one of the core capabilities of map applications, is also gradually coming up to large-scale application of LTR models.
The construction of the training sample is the key to the use of the LTR model, and how to efficiently and accurately construct the training sample is crucial to the LTR model.
Disclosure of Invention
According to a first aspect of the present disclosure, there is provided a method for constructing a training sample, including: acquiring a travel scheme set, wherein the travel scheme set comprises a plurality of first travel scheme sets and a plurality of second travel scheme sets, and the first travel scheme set comprises an actual travel scheme; obtaining an operation information set of each trip scheme set according to the operation information corresponding to each trip scheme in the trip scheme set; obtaining an estimated model by using the operation information sets of the first travel scheme sets and the actual travel schemes in the first travel scheme sets; inputting the operation information sets of the plurality of second trip scheme sets into the estimation model to obtain an actual trip scheme prediction result output by the estimation model for each second trip scheme set; and obtaining a construction result of the training sample according to the plurality of second travel scheme sets and actual travel scheme prediction results of the plurality of second travel scheme sets.
According to a second aspect of the present disclosure, there is provided a training sample construction apparatus, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a travel scheme set, the travel scheme set comprises a plurality of first travel scheme sets and a plurality of second travel scheme sets, and the first travel scheme set comprises an actual travel scheme; the processing unit is used for obtaining an operation information set of each trip scheme set according to the operation information corresponding to each trip scheme in the trip scheme set; the training unit is used for obtaining an estimated model by using the operation information sets of the first travel scheme sets and the actual travel scheme in the first travel scheme sets; the prediction unit is used for inputting the operation information sets of the plurality of second trip scheme sets into the prediction model to obtain an actual trip scheme prediction result output by the prediction model for each second trip scheme set; and the construction unit is used for obtaining the construction result of the training sample according to the plurality of second travel scheme sets and the actual travel scheme prediction results of the plurality of second travel scheme sets.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method as described above.
According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method as described above.
According to the technical scheme, the construction of the training sample is completed by using the operation information corresponding to the travel scheme, the construction cost of the training sample is reduced, and the construction accuracy and efficiency of the training sample are improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
fig. 3 is a block diagram of an electronic device for implementing a training sample construction method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
After a travel scheme set comprising a plurality of first travel scheme sets and a plurality of second travel scheme sets is obtained, firstly, an operation information set of each travel scheme set is obtained according to operation information of each travel scheme in the corresponding travel scheme set, then, an estimation model is obtained by using the operation information sets of the first travel scheme sets and actual travel schemes of the first travel schemes, the operation information sets of the second travel scheme sets are input into the estimation model, an actual travel scheme prediction result output by the estimation model aiming at each second travel scheme set is obtained, and finally, a construction result of a training sample is obtained according to the second travel scheme set and the actual travel scheme prediction result, the construction of the training sample is completed by using the operation information corresponding to the travel schemes, the cost of the training sample during construction is reduced, and the accuracy and efficiency of the training sample during construction are improved.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure. As shown in fig. 1, the method for constructing a training sample in this embodiment specifically includes the following steps:
s101, a travel scheme set is obtained, wherein the travel scheme set comprises a plurality of first travel scheme sets and a plurality of second travel scheme sets, and the first travel scheme set comprises an actual travel scheme.
In the embodiment, when S101 is executed, a travel scheme set may be obtained according to log data of a client; each travel scheme set in this embodiment corresponds to one travel plan initiated by the client, and each travel scheme set includes at least one travel scheme.
For example, if the client initiates a trip plan from a location a to a location B, if the planned trip plans are a trip plan 1, a trip plan 2, and a trip plan 3, the trip plan 1, the trip plan 2, and the trip plan 3 form a trip plan set in this embodiment.
In an actual application scenario, after a client initiates a travel plan based on public transportation, the client may not use the travel plan obtained by the plan to navigate, but only pay attention to the bus and/or subway stations involved in the travel plan.
If the client selects the planned travel scheme for navigation, the embodiment uses the travel scheme selected by the client as an actual travel scheme in the travel scheme set, and uses the travel scheme set as a first travel scheme set.
Therefore, the travel scheme set obtained by executing S101 in this embodiment includes two types, the first travel scheme set is a travel scheme set in which the client selects an actual travel scheme for navigation, and the second travel scheme set is a travel scheme set in which the client does not select an actual travel scheme for navigation.
For example, if the travel scheme set includes a travel scheme 1, a travel scheme 2, and a travel scheme 3, if the client selects the travel scheme 2 for navigation, the travel scheme set is the first travel scheme set, and the travel scheme 2 is the actual travel scheme.
S102, obtaining an operation information set of each trip scheme set according to the operation information corresponding to each trip scheme in the trip scheme set.
In this embodiment, after S101 is executed to obtain a travel scheme set including a plurality of first travel scheme sets and a plurality of second travel scheme sets, S102 is executed to obtain an operation information set of each travel scheme set according to operation information of each travel scheme in a corresponding travel scheme set.
In this embodiment, when S102 is executed, the operation performed on each travel plan in the travel plan set by the client may be obtained according to the log data of the client, and the operation information in this embodiment includes operations of browsing, sliding, clicking, collecting, screenshot, and the like performed on the travel plan.
Since different sets of travel plans correspond to different travel plans, each set of operation information obtained by executing S102 in the present embodiment also corresponds to a different travel plan.
Specifically, when S102 is executed to obtain an operation information set of each travel scheme set according to the operation information of each travel scheme in the corresponding travel scheme set, an optional implementation manner that may be adopted in the present embodiment is as follows: for each travel scheme set, acquiring operation information corresponding to each travel scheme in the travel scheme set; sequencing the acquired operation information according to the time stamps; and taking the sequencing result of the operation information as the operation information set of the travel scheme set.
That is, the present embodiment uses the sorting result of the operation information obtained according to the timestamp as the operation information set of the travel plan set, that is, the operation information set includes a plurality of operation information arranged in a time sequence, so that the obtained operation information has a time attribute for determining whether the operation information set is reasonable.
Since there is a data loss problem in the operation information recorded by the log data, the operation information in the obtained operation information set may not be complete, and in order to improve the accuracy of the obtained operation information set, when performing S102 to obtain the operation information set of each travel scheme set, the present embodiment may further include the following contents: acquiring preset operation logics, such as operation logics depending on clicking in browsing, operation logics depending on browsing in collection, and the like; and for each operation information set, under the condition that the operation information contained in the operation information set meets the preset operation logic, the operation information set is reserved, and otherwise, the operation information set is discarded.
In this embodiment, when S102 is executed, an operation dependent state machine may be further constructed according to a preset operation logic, and the constructed operation dependent state machine is further used to check the operation information set.
That is to say, the operation information set of the row scheme set is verified according to the preset operation logic, so that only the operation information set that passes verification is reserved, and the accuracy of the obtained operation information set is further improved.
S103, obtaining an estimation model by using the operation information sets of the first trip scheme sets and the actual trip schemes in the first trip scheme sets.
After executing S102 to obtain an operation information set of each travel scheme set, executing S103 to obtain an estimation model by using the obtained operation information sets of the plurality of first travel scheme sets and actual travel schemes in the plurality of first travel scheme sets.
Specifically, when performing S103 to obtain the estimation model by using the operation information sets of the plurality of first travel scheme sets and the actual travel schemes in the plurality of first travel scheme sets, the embodiment may adopt an optional implementation manner as follows: inputting the operation information sets of the first travel scheme sets into a neural network model to obtain an actual travel scheme prediction result output by the neural network model for each first travel scheme set; and adjusting parameters of the neural network model according to the actual trip scheme prediction result of each first trip scheme set and the loss function value obtained by calculation of the actual trip scheme until the neural network model converges to obtain a pre-estimated model.
That is, the present embodiment takes the actual travel plan in the first travel plan set as a positive sample (for example, labeled as 1), and takes the other travel plans in the first travel plan set as negative samples (for example, labeled as 0), so that the trained estimation model can estimate the travel plans belonging to the actual travel plans in the travel plan set according to the input operation information set.
And S104, inputting the operation information sets of the plurality of second trip scheme sets into the estimation model to obtain an actual trip scheme prediction result output by the estimation model for each second trip scheme set.
After executing S103 to obtain the predictive model, executing S104 to input the obtained operation information sets of the plurality of second travel scheme sets into the predictive model, so as to obtain an actual travel scheme prediction result output by the predictive model for each second travel scheme set.
That is to say, in the present embodiment, the estimation model obtained from the first travel scheme set including the actual travel scheme is used to filter the actual travel scheme prediction result from the second travel scheme set that does not include the actual travel scheme, where the actual travel scheme prediction result is the travel scheme that the client is most likely to use to navigate in the second travel scheme set.
And S105, obtaining a construction result of the training sample according to the plurality of second travel scheme sets and actual travel scheme prediction results of the plurality of second travel scheme sets.
After the actual travel scheme prediction result of each second travel scheme set is obtained by executing S104, executing S105 to obtain a construction result of the training sample according to the obtained actual travel scheme prediction results of the plurality of second travel scheme sets and the plurality of second travel scheme sets.
Specifically, when the step S105 is executed to obtain the construction result of the training sample according to the obtained plurality of second travel scheme sets and the actual travel scheme prediction results of the plurality of second travel scheme sets, an optional implementation manner that can be adopted in the present embodiment is as follows: for each second travel scheme set, the travel scheme corresponding to the actual travel scheme prediction result in the second travel scheme set is used as a positive sample, and other travel schemes in the second travel scheme set are used as negative samples, for example, the travel scheme corresponding to the actual travel scheme prediction result and one other travel scheme form a travel scheme pair.
It can be understood that, after the building result of the training sample is obtained by performing S105, the ranking model may also be trained by using the built training sample, so that the trained ranking model can output a score corresponding to the trip plan according to the input trip plan.
Fig. 2 is a schematic diagram according to a second embodiment of the present disclosure. As shown in fig. 2, the training sample constructing apparatus 200 of the present embodiment includes:
the obtaining unit 201 is configured to obtain a travel scheme set, where the travel scheme set includes a plurality of first travel scheme sets and a plurality of second travel scheme sets, and the first travel scheme set includes an actual travel scheme.
The obtaining unit 201 may obtain the travel scheme set according to the log data of the client; each set of trip plans acquired by the acquiring unit 201 corresponds to a trip plan initiated by the client, and each set of trip plans includes at least one trip plan.
In an actual application scenario, after a client initiates a travel plan based on public transportation, the client may not use the travel plan obtained by the plan to navigate, but only pay attention to the bus and/or subway stations involved in the travel plan.
If the client selects the planned travel scheme for navigation, the obtaining unit 201 takes the travel scheme selected by the client as an actual travel scheme in the travel scheme set, and takes the travel scheme set as a first travel scheme set.
Therefore, the set of trip plans obtained by the obtaining unit 201 includes two types, the first set of trip plans is a set of trip plans for the client to select the actual trip plan for navigation, and the second set of trip plans is a set of trip plans for the client to not select the actual trip plan for navigation.
The processing unit 202 is configured to obtain an operation information set of each trip plan set according to the operation information corresponding to each trip plan in the trip plan set.
In this embodiment, after the obtaining unit 201 obtains a travel scheme set including a plurality of first travel scheme sets and a plurality of second travel scheme sets, the processing unit 202 obtains an operation information set of each travel scheme set according to the operation information of each travel scheme in the corresponding travel scheme set.
The processing unit 202 may obtain, according to log data of the client, an operation performed by the client on each travel scheme in the travel scheme set, where the operation information in this embodiment includes operations of browsing, sliding, clicking, collecting, screenshot, and the like performed on the travel scheme.
Since different sets of travel plans correspond to different travel plans, each set of operation information obtained by the processing unit 202 also corresponds to a different travel plan.
Specifically, when the processing unit 202 obtains the operation information set of each travel scheme set according to the operation information of each travel scheme in the corresponding travel scheme set, the optional implementation manner that may be adopted is as follows: for each travel scheme set, acquiring operation information corresponding to each travel scheme in the travel scheme set; sequencing the acquired operation information according to the time stamps; and taking the sequencing result of the operation information as the operation information set of the travel scheme set.
That is, the processing unit 202 uses the sorted result of the operation information obtained according to the timestamp as the operation information set of the travel plan set, that is, the operation information set includes a plurality of operation information arranged in a time sequence, so that the obtained operation information has a time attribute for determining whether the operation information set is reasonable.
Since there is a data loss problem in the operation information recorded by the log data, the operation information in the obtained operation information set may not be complete, and in order to improve the accuracy of the obtained operation information set, when obtaining the operation information set of each travel scheme set, the processing unit 202 may further include the following contents: acquiring a preset operation logic; and for each operation information set, under the condition that the operation information contained in the operation information set meets the preset operation logic, the operation information set is reserved, and otherwise, the operation information set is discarded.
That is to say, the processing unit 202 checks the operation information set of the row scheme set according to the preset operation logic, so that only the operation information set that passes the check is reserved, and the accuracy of the obtained operation information set is further improved.
The training unit 203 is configured to obtain an estimation model by using the operation information sets of the plurality of first travel scheme sets and the actual travel scheme in the plurality of first travel scheme sets.
In this embodiment, after the processing unit 202 obtains the operation information sets of each travel scheme set, the training unit 203 obtains the estimation model by using the obtained operation information sets of the plurality of first travel scheme sets and the actual travel schemes in the plurality of first travel scheme sets.
Specifically, when the training unit 203 obtains the pre-estimated model by using the operation information sets of the plurality of first travel scheme sets and the actual travel scheme in the plurality of first travel scheme sets, the optional implementation manner that can be adopted is as follows: inputting the operation information sets of the first travel scheme sets into a neural network model to obtain an actual travel scheme prediction result output by the neural network model for each first travel scheme set; and adjusting parameters of the neural network model according to the actual trip scheme prediction result of each first trip scheme set and the loss function value obtained by calculation of the actual trip scheme until the neural network model converges to obtain a pre-estimated model.
That is, the training unit 203 takes the actual travel plan in the first travel plan set as a positive sample (for example, labeled as 1), and takes the other travel plans in the first travel plan set as negative samples (for example, labeled as 0), so that the trained estimation model can estimate the travel plan belonging to the actual travel plan in the travel plan set according to the input operation information set.
The prediction unit 204 is configured to input the operation information sets of the plurality of second travel scheme sets into the prediction model, and obtain an actual travel scheme prediction result output by the prediction model for each second travel scheme set.
In this embodiment, after the estimation model is obtained by the training unit 203, the prediction unit 204 inputs the obtained operation information sets of the plurality of second travel scheme sets into the estimation model, so as to obtain the actual travel scheme prediction result output by the estimation model for each second travel scheme set.
That is to say, the prediction unit 204 uses the estimation model obtained from the first travel plan set including the actual travel plan to obtain the actual travel plan prediction result, which is the travel plan that the client is most likely to use to navigate in the second travel plan set, by screening from the second travel plan set that does not include the actual travel plan.
The constructing unit 205 is configured to obtain a construction result of the training sample according to the plurality of second travel scheme sets and actual travel scheme prediction results of the plurality of second travel scheme sets.
In this embodiment, after the prediction unit 204 obtains the actual trip plan prediction result of each second trip plan set, the construction unit 205 obtains the construction result of the training sample according to the obtained actual trip plan prediction results of the plurality of second trip plan sets and the plurality of second trip plan sets.
Specifically, when obtaining the construction result of the training sample according to the obtained actual travel scheme prediction results of the plurality of second travel scheme sets and the plurality of second travel scheme sets, the construction unit 205 may adopt an optional implementation manner as follows: and regarding each second travel scheme set, taking the travel scheme corresponding to the actual travel scheme prediction result in the second travel scheme set as a positive sample, and taking other travel schemes in the second travel scheme set as negative samples.
It can be understood that, after obtaining the construction result of the training sample, the constructing unit 205 may also train the ranking model using the constructed training sample, so that the trained ranking model can output a score corresponding to the travel plan according to the input travel plan.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
As shown in fig. 3, is a block diagram of an electronic device of a method of constructing a training sample according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 3, the apparatus 300 includes a computing unit 301 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)302 or a computer program loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data required for the operation of the device 300 can also be stored. The calculation unit 301, the ROM302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 400 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 301 performs the respective methods and processes described above, such as the construction method of the training sample. For example, in some embodiments, the method of constructing the training samples may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 308.
In some embodiments, part or all of the computer program may be loaded and/or installed onto device 300 via ROM302 and/or communication unit 309. When the computer program is loaded into RAM303 and executed by the computing unit 301, one or more steps of the method of constructing training samples described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the method of constructing the training samples in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable training sample construction apparatus, such that the program codes, when executed by the processor or controller, cause the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (13)

1. A method for constructing a training sample comprises the following steps:
acquiring a travel scheme set, wherein the travel scheme set comprises a plurality of first travel scheme sets and a plurality of second travel scheme sets, and the first travel scheme set comprises an actual travel scheme;
obtaining an operation information set of each trip scheme set according to the operation information corresponding to each trip scheme in the trip scheme set;
obtaining an estimated model by using the operation information sets of the first travel scheme sets and the actual travel schemes in the first travel scheme sets;
inputting the operation information sets of the plurality of second trip scheme sets into the estimation model to obtain an actual trip scheme prediction result output by the estimation model for each second trip scheme set;
and obtaining a construction result of the training sample according to the plurality of second travel scheme sets and actual travel scheme prediction results of the plurality of second travel scheme sets.
2. The method of claim 1, wherein the obtaining of the operation information set of each travel plan set according to the operation information corresponding to each travel plan in the travel plan set comprises:
for each travel scheme set, acquiring operation information corresponding to each travel scheme in the travel scheme set;
sequencing the acquired operation information according to the time stamps;
and taking the sequencing result of the operation information as the operation information set of the travel scheme set.
3. The method of claim 1, wherein the obtaining of the operation information set of each travel plan set comprises:
acquiring a preset operation logic;
and for each operation information set, under the condition that the operation information contained in the operation information set is determined to meet the preset operation logic, reserving the operation information set.
4. The method of claim 1, wherein the obtaining a prediction model using the operation information sets of the first travel plan sets and actual travel plans of the first travel plan sets comprises:
inputting the operation information sets of the plurality of first travel scheme sets into a neural network model to obtain an actual travel scheme prediction result output by the neural network model for each first travel scheme set;
and adjusting parameters of the neural network model according to the actual trip scheme prediction result of each first trip scheme set and the loss function value obtained by calculation of the actual trip scheme until the neural network model converges to obtain the estimated model.
5. The method of claim 1, wherein obtaining the constructed result of the training sample according to the plurality of second travel scheme sets and the actual travel scheme prediction results of the plurality of second travel scheme sets comprises:
and regarding each second travel scheme set, taking the travel scheme corresponding to the actual travel scheme prediction result in the second travel scheme set as a positive sample, and taking other travel schemes in the second travel scheme set as negative samples.
6. A training sample construction apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a travel scheme set, the travel scheme set comprises a plurality of first travel scheme sets and a plurality of second travel scheme sets, and the first travel scheme set comprises an actual travel scheme;
the processing unit is used for obtaining an operation information set of each trip scheme set according to the operation information corresponding to each trip scheme in the trip scheme set;
the training unit is used for obtaining an estimated model by using the operation information sets of the first travel scheme sets and the actual travel scheme in the first travel scheme sets;
the prediction unit is used for inputting the operation information sets of the plurality of second trip scheme sets into the prediction model to obtain an actual trip scheme prediction result output by the prediction model for each second trip scheme set;
and the construction unit is used for obtaining the construction result of the training sample according to the plurality of second travel scheme sets and the actual travel scheme prediction results of the plurality of second travel scheme sets.
7. The apparatus according to claim 6, wherein when obtaining the operation information set of each travel plan set according to the operation information corresponding to each travel plan in the travel plan set, the processing unit specifically performs:
for each travel scheme set, acquiring operation information corresponding to each travel scheme in the travel scheme set;
sequencing the acquired operation information according to the time stamps;
and taking the sequencing result of the operation information as the operation information set of the travel scheme set.
8. The apparatus according to claim 6, wherein the processing unit, when obtaining the operation information set of each travel solution set, specifically performs:
acquiring a preset operation logic;
and for each operation information set, under the condition that the operation information contained in the operation information set is determined to meet the preset operation logic, reserving the operation information set.
9. The apparatus of claim 6, wherein the training unit, when obtaining the pre-estimation model using the operation information sets of the first travel scheme sets and the actual travel schemes in the first travel scheme sets, specifically performs:
inputting the operation information sets of the plurality of first travel scheme sets into a neural network model to obtain an actual travel scheme prediction result output by the neural network model for each first travel scheme set;
and adjusting parameters of the neural network model according to the actual trip scheme prediction result of each first trip scheme set and the loss function value obtained by calculation of the actual trip scheme until the neural network model converges to obtain the estimated model.
10. The apparatus according to claim 6, wherein the constructing unit, when obtaining the construction result of the training sample according to the plurality of second travel scheme sets and the actual travel scheme prediction results of the plurality of second travel scheme sets, specifically performs:
and regarding each second travel scheme set, taking the travel scheme corresponding to the actual travel scheme prediction result in the second travel scheme set as a positive sample, and taking other travel schemes in the second travel scheme set as negative samples.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
CN202111158831.8A 2021-09-30 2021-09-30 Training sample construction method and device, electronic equipment and readable storage medium Pending CN113962382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111158831.8A CN113962382A (en) 2021-09-30 2021-09-30 Training sample construction method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111158831.8A CN113962382A (en) 2021-09-30 2021-09-30 Training sample construction method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113962382A true CN113962382A (en) 2022-01-21

Family

ID=79462731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111158831.8A Pending CN113962382A (en) 2021-09-30 2021-09-30 Training sample construction method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113962382A (en)

Similar Documents

Publication Publication Date Title
CN112560496A (en) Training method and device of semantic analysis model, electronic equipment and storage medium
CN113343803A (en) Model training method, device, equipment and storage medium
CN113361578A (en) Training method and device of image processing model, electronic equipment and storage medium
CN113221565A (en) Entity recognition model training method and device, electronic equipment and storage medium
CN114861059A (en) Resource recommendation method and device, electronic equipment and storage medium
CN113641829A (en) Method and device for training neural network of graph and complementing knowledge graph
CN113032258A (en) Electronic map testing method and device, electronic equipment and storage medium
CN113190746A (en) Recommendation model evaluation method and device and electronic equipment
CN115186738B (en) Model training method, device and storage medium
CN114141236B (en) Language model updating method and device, electronic equipment and storage medium
CN114997414B (en) Data processing method, device, electronic equipment and storage medium
US20220164723A1 (en) Method for determining boarding information, electronic device, and storage medium
CN114328959B (en) Knowledge graph construction and use method, device, equipment and medium
CN113704256B (en) Data identification method, device, electronic equipment and storage medium
CN113344214B (en) Training method and device of data processing model, electronic equipment and storage medium
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN113962382A (en) Training sample construction method and device, electronic equipment and readable storage medium
CN114969444A (en) Data processing method and device, electronic equipment and storage medium
CN113033179A (en) Knowledge acquisition method and device, electronic equipment and readable storage medium
CN112905917A (en) Inner chain generation method, model training method, related device and electronic equipment
CN114880242B (en) Test case extraction method, device, equipment and medium
CN113901314A (en) Method, apparatus, device and medium for processing user query content
CN116049335A (en) POI classification and model training method, device, equipment and storage medium
CN113704314A (en) Data analysis method and device, electronic equipment and storage medium
CN114416678A (en) Resource processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination