Data writing method, program, and vehicle
By separating the trained model into a distinct region within the semiconductor memory, the method addresses the complexity of writing trained models in existing technologies, facilitating easier management and improving the accuracy of vehicle state estimation.
Patent Information
- Application Number
- JP2023181398
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-05-02
AI Technical Summary
Existing data writing methods for semiconductor memory in vehicles, such as electric bicycles, face challenges in efficiently writing trained models into memory, particularly due to integration with applications, which complicates handling and management of multiple trained models.
The proposed data writing method involves writing a trained model into a third region of the semiconductor memory that is separate from the regions storing the bootloader and the application, allowing for easier management and updating of trained models without requiring multiple applications.
This approach simplifies the process of writing trained models into semiconductor memory, making it easier to manage and update models for different vehicle types, thereby enhancing the accuracy and efficiency of vehicle state estimation.
Smart Images

Figure 2025070832000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a data writing method, a program, and a vehicle. [Background technology]
[0002] Patent Document 1 discloses a monitoring system for bicycles. The monitoring system includes a forward monitoring device that monitors the forward direction of travel of the bicycle, and a control device. The control device includes a trained model that inputs the detection results of the forward monitoring device and outputs a determination result as to whether or not an obstacle is included in the detection results. The trained model is stored in the memory of the forward monitoring device. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2023-50763 A Summary of the Invention [Problem to be solved by the invention]
[0004] The present disclosure aims to provide a data writing method, a program, and a vehicle that make it easier to write a trained model to a semiconductor memory. [Means for solving the problem]
[0005] In order to achieve the above object, a data writing method according to one aspect of the present disclosure includes a first step and a second step. In the first step, a trained model that has been machine-learned in advance to estimate a state of a vehicle that is either a human-powered vehicle or an electric bicycle is acquired. In the second step, the trained model acquired in the first step is written to a third area in a non-volatile memory area of a semiconductor memory, the third area being different from both a first area in which a boot loader is stored and a second area in which an application that references the trained model is stored.
[0006] A program according to an aspect of the present disclosure causes one or more processors to execute the data writing method.
[0007] A vehicle according to an aspect of the present disclosure is either a human-powered vehicle or an electric bicycle, and includes a vehicle body, a semiconductor memory to which data is written by the data writing method, and a control unit, wherein the control unit executes the application stored in the second area by referring to the trained model stored in the third area of the semiconductor memory. Effect of the Invention
[0008] The data writing method and the like according to the present disclosure have the advantage of making it easier to write a trained model to a semiconductor memory. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a side view illustrating an electric bicycle according to an embodiment. [Diagram 2] FIG. 2 is a block diagram illustrating an electric bicycle according to an embodiment. [Diagram 3] FIG. 3 is an explanatory diagram of a data writing method according to the embodiment. [Figure 4] FIG. 4 is a flowchart showing a first writing example of the data writing method according to the embodiment. [Diagram 5] FIG. 5 is a schematic diagram showing an example of a user interface used in the first writing example. [Figure 6] FIG. 6 is a flowchart showing a second write example of the data write method according to the embodiment. [Figure 7] FIG. 7 is a schematic diagram showing an example of a user interface used in the second writing example. [Figure 8] FIG. 8 is a block diagram illustrating an electric bicycle according to a modified example of the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the drawings. Note that each of the embodiments described below shows a specific example of the present disclosure. Therefore, the numerical values, shapes, materials, components, arrangement and connection forms of the components, steps, order of steps, etc. shown in the following embodiments are merely examples and are not intended to limit the present disclosure. Therefore, among the components in the following embodiments, components that are not described in the independent claims will be described as optional components.
[0011] In addition, each figure is a schematic diagram and is not necessarily illustrated precisely. Therefore, for example, the scales in each figure do not necessarily match. In addition, in each figure, substantially the same configurations are given the same reference numerals, and duplicated explanations are omitted or simplified.
[0012] A data writing method, a program, and a vehicle according to an embodiment will be described below.
[0013] (Embodiment) [vehicle] First, the configuration of the vehicle will be described with reference to Figs. 1 and 2. In the embodiment, the vehicle is an electric bicycle 2. The electric bicycle 2 is a vehicle that can travel on a traveling surface by electric power, and is, for example, an electrically assisted bicycle or a self-propelled vehicle such as a so-called electric kickboard. The electric bicycle 2 may be a vehicle for which the user does not need a driver's license. In the embodiment, the electric bicycle 2 is a two-wheeled bicycle consisting of two wheels, a front wheel and a rear wheel, but is not limited to this. For example, the electric bicycle 2 may be a three-wheeled bicycle consisting of one front wheel or one rear wheel and two wheels on the other.
[0014] Here, the vehicle is not limited to the electric bicycle 2, but may be a human-powered vehicle in which the wheels are powered by pedaling force. Human-powered vehicles may include, for example, bicycles. As described above, electrically assisted bicycles are classified as electric bicycles 2, but they may also be classified as human-powered vehicles. Thus, in the embodiment, the vehicle is either a human-powered vehicle or an electric bicycle 2. In the following, as an example, the vehicle will be described as being an electric bicycle 2.
[0015] FIG. 1 is a side view illustrating an electric bicycle 2 according to an embodiment. FIG. 2 is a block diagram illustrating an electric bicycle 2 according to an embodiment. As shown in FIG. 1 and FIG. 2, the electric bicycle 2 is a vehicle that can travel on a traveling surface by rotating its wheels. In the embodiment, the electric bicycle 2 is an electrically assisted bicycle that supplements the user's pedaling force with auxiliary driving force from an electric motor 43. Note that the electric bicycle 2 may have separate human driving force that powers the wheels using pedaling force and auxiliary driving force that powers the wheels using the electric motor 43, and may be a bicycle that can travel (self-propelled) with only the electric motor 43.
[0016] For example, the electric bicycle 2 has an assist mode, a push-walking mode, and a self-propelled mode. The assist mode is a mode that assists the forward movement of the electric bicycle 2 based on the user's pedaling force on the pedals 16. The push-walking mode is a mode that assists the forward movement of the electric bicycle 2 based on the force with which the user pushes the electric bicycle 2 forward when the user walks while pushing the electric bicycle 2. The self-propelled mode is a mode that assists the forward movement of the electric bicycle 2 when the user walks while supporting the electric bicycle 2.
[0017] The electric bicycle 2 has a frame (body) 11, a front wheel 12, a rear wheel 13, a saddle 14, handlebars 15, pedals 16, cranks 17, a chain 18, a transmission, one or more sensors 30, a control device 40, an electric motor 43, a notification unit 50, an operating unit 61, a manual switch 62, and a battery 63.
[0018] A front wheel 12, a rear wheel 13, a saddle 14, handlebars 15, pedals 16, cranks 17, a chain 18, a gearbox, one or more sensors 30, an electric motor 43, a control device 40, a notification unit 50, an operation unit 61, a manual switch 62, a battery 63, and the like are attached to the frame 11. The frame 11 is the framework of the electric bicycle 2. The frame 11 is made of metal such as aluminum alloy, iron, chrome molybdenum steel, steel, or titanium. The frame 11 may also be made of carbon, synthetic resin, or the like.
[0019] The frame 11 has a front frame 11a and a rear frame 11b.
[0020] The front frame 11a constitutes the front portion of the frame 11. The front frame 11a has a head tube 11a1, a down tube 11a2, and a seat tube 11a3. The frame 11 may have a suspension.
[0021] The head tube 11a1 is connected to the front end of the front frame 11a. A front fork 11a4 and a handlebar 15 are attached to the head tube 11a1 so as to be rotatable around an axis along the longitudinal direction of the head tube 11a1. A front wheel 12 is rotatably attached to the front fork 11a4. By turning the handlebar 15 left and right, the direction of the front wheel 12 supported by the front fork 11a4 can be rotated left and right. A headlight is attached to the front fork 11a4. The front fork 11a4 may have a suspension.
[0022] The down tube 11a2 connects the head tube 11a1 and the seat tube 11a3.
[0023] The seat tube 11a3 holds the saddle 14. The saddle 14 is attached to the seat tube 11a3 so as to be movable along the longitudinal direction of the seat tube 11a3. The lower end of the seat tube 11a3 is connected to the rear end of the down tube 11a2. The seat tube 11a3 is located between the front wheel 12 and the rear wheel 13 in the front-rear direction. A battery 63 is detachably attached to the seat tube 11a3.
[0024] The rear frame 11b is disposed rearward of the front frame 11a and constitutes the rear portion of the frame 11. The rear wheel 13, a rear sprocket 71 linked to the axle of the rear wheel 13, and a rear seat 80 are attached to the rear frame 11b. A chain 18 is stretched between the rear sprocket 71 and the front sprocket 72. As a result, the rotational force of the front sprocket 72, which is rotated by depressing the pedal 16, is transmitted to the rear wheel 13 via the chain 18 and the rear sprocket 71. In this embodiment, the pedal 16, the front sprocket 72, the rear sprocket 71, and the chain 18 form a rear wheel drive mechanism that relies on human power.
[0025] The front wheel 12 has a tire 12a for the vehicle (electric bicycle 2) to travel. The front wheel 12 is the front wheel of two wheels aligned in the front-rear direction. The front wheel 12 is supported by a front fork 11a4 so as to be rotatable about an axis along the left-right direction. The front wheel 12 may receive power from an electric motor 43, and may be provided with a motor that applies a driving force to rotate the front wheel 12, for example. The front wheel 12 is an example of a wheel.
[0026] The rear wheel 13 has a tire 13a for the vehicle (electric bicycle 2) to travel on. The rear wheel 13 is the rear wheel of two wheels aligned in the front-rear direction. The rear wheel 13 is supported by a rear fork so that it can rotate about an axis along the left-right direction. The rear wheel 13 may receive power from an electric motor 43, and may be provided with a motor that applies a driving force to rotate the rear wheel 13, for example. The rear wheel 13 is one example of a wheel. The front wheel 12 and the rear wheel 13 may be collectively referred to as wheels.
[0027] The rear wheel 13 has a rear sprocket 71. The rear sprocket 71 is connected to a front sprocket 72 via a chain 18. In this embodiment, power output from an electric motor 43 is transmitted to the rear wheel 13.
[0028] The saddle 14 is a portion on which a user sits and is movably attached to the seat tube 11a3.
[0029] The handlebars 15 change the steering angle of the electric bicycle 2, for example, when the user steers the electric bicycle 2. A pair of grips and a pair of brake levers 81 are provided on both ends of the handlebars 15. The pair of grips are held by the user's hands when riding the electric bicycle in an appropriate posture. The pair of grips are also held by the hands when pushing or supporting the electric bicycle 2, and receive a forward pushing force. One brake lever 81 applies a mechanical braking force to the front wheel 12 by driving a front brake device (not shown). The other brake lever 81 applies a mechanical braking force to the rear wheel 13 by driving a rear brake device (not shown).
[0030] At least one of the pair of grips may be provided with a grip sensor that detects the gripping force or pushing force. A steering angle sensor that measures the steering angle of the handlebars 15 may be provided on a rotation shaft provided at the center of the handlebars 15, and this steering angle sensor may detect the steering angle of the handlebars 15. A brake sensor may be provided on the brake lever 81, and this brake sensor may detect the operation of the brake lever 81.
[0031] For example, when the user rides the electric bicycle 2, the pedal 16 receives a pedaling force from the user. The pedal 16 is attached to one of the longitudinal ends of each crank arm 17a, the end opposite the crank shaft 17b. The pedal 16 is rotatably attached to the crank arm 17a. The rotation axis of the pedal 16 is approximately parallel to the rotation axis of the crank shaft 17b of the crank 17.
[0032] The crank 17 has a crank shaft 17 b , a pair of crank arms 17 a , and a front sprocket 72 .
[0033] The crank arms 17a are provided on both sides of the front frame 11a, and are fixed to both ends of a crank shaft 17b extending in the left-right direction. One end of the crank arm 17a is rotatably fixed to the crank shaft 17b, and the pedal 16 is rotatably fixed to the other end of the crank arm 17a. The front sprocket 72 is attached to the crank shaft 17b of the crank arm 17a and rotates together with the rotation of the crank shaft 17b. When a user applies a pedaling force to the pedal 16, the crank arm 17a rotates about the crank shaft 17b, and the front sprocket 72 also rotates about the crank shaft 17b. Due to the rotation of the front sprocket 72, a human-powered driving force based on the pedaling force is transmitted to the rear sprocket 71 of the rear wheel 13 via the chain 18, and the rear sprocket 71 rotates, causing the rear wheel 13 to rotate. For example, when the electric bicycle 2 operates in the assist mode, a human-powered driving force based on a pedaling force and an auxiliary driving force by the electric motor 43 added to the human-powered driving force are transmitted to the rear wheel 13.
[0034] The chain 18 transmits the rotational force of the front sprocket 72 rotated by depression of the pedal 16 and the auxiliary driving force output from the electric motor 43 to the rear sprocket 71. The chain 18 is a power transmission body such as a belt, a shaft, a wire, or a gear.
[0035] The transmission is configured with a known speed change mechanism such as a planetary gear or a multi-stage gear having a plurality of driving force transmission paths with different gear ratios. The transmission can change the speed, for example, to a low gear, a medium gear, a high gear, etc., by switching the driving force transmission path. The transmission may be configured to manually switch the driving force transmission path, or may be configured to electrically switch the driving force transmission path.
[0036] The one or more sensors 30 each acquire vehicle information related to the electric bicycle 2. The vehicle information is, for example, information indicating the speed of the electric bicycle 2, or information indicating the acceleration of the electric bicycle 2. The vehicle information may also include information indicating the number of rotations of the crank 17, information indicating the human driving force, or information indicating the angular velocity of the electric bicycle 2. In the embodiment, the electric bicycle 2 is equipped with one or more sensors 30 including at least a vibration sensor. The one or more sensors 30 may include, in addition to a vibration sensor, a speed sensor, an acceleration sensor, a crank rotation sensor, a gyro sensor, a torque sensor, or a sound sensor. The one or more sensors 30 each output information indicating the detection result to the control device 40.
[0037] The vibration sensor detects vibrations of a target part of the vehicle (electric bicycle 2). Here, the vibrations of the target part detected by the vibration sensor are different from the sound emitted by the target part. The speed sensor is a sensor that detects the speed at which the electric bicycle 2 travels when the assist mode, the pushing mode, or the self-propelled mode is being executed. The acceleration sensor is a sensor that detects the acceleration of the traveling electric bicycle 2. The crank rotation sensor is a sensor that detects the number of rotations of the crank 17 per unit time when the assist mode, the pushing mode, or the self-propelled mode is being executed. The gyro sensor is a six-axis sensor that detects the tilt speed (angular velocity) of the vehicle. The torque sensor is a sensor that detects the human-powered driving force generated by the rotation of the crank shaft 17b based on the force applied to the pedal 16. The sound sensor is a sensor that detects the sound generated from a target part of the vehicle. The sound is, for example, sound emitted from the front sprocket 72, the rear sprocket 71, the chain 18, the brake device, the tires 12a, 13a, the transmission, or the like.
[0038] In the embodiment, a vibration sensor, a speed sensor, an acceleration sensor, a crank rotation sensor, a gyro sensor, a torque sensor, and a sound sensor are given as examples of the one or more sensors 30 of the electric bicycle 2, but the sensors are not limited to these. For example, the one or more sensors 30 may include an inclination sensor that detects the inclination of the vehicle (electric bicycle 2) with respect to a horizontal plane. Also, for example, the one or more sensors 30 may include a battery sensor that detects the state of the battery 63, such as the charging rate, discharge performance, or remaining capacity of the battery 63. Also, for example, the one or more sensors 30 may include a motor rotation sensor that detects the number of rotations per unit time of the electric motor 43.
[0039] The one or more sensors 30 need only include at least a sensor that detects data to be input into a trained model (also called an "AI (Artificial Intelligence) model") described below, and need not include all of the above sensors.
[0040] The electric motor 43 applies an auxiliary driving force to assist the traveling of the vehicle (electric bicycle 2). The electric motor 43 receives electric power from the battery 63 and drives based on the control of the control device 40. The electric motor 43 transmits a rotational torque as an auxiliary driving force to the rear sprocket 71 via the chain 18 to rotate the rear wheel 13. The rotational torque is an auxiliary driving force, which is a driving force by the electric motor 43 to be added to a human-powered driving force, and an auxiliary driving force, which is an auxiliary force given to the force of pushing or supporting the electric bicycle 2 while walking. The electric motor 43 adds the auxiliary driving force to the human-powered driving force based on the force of stepping on the pedals 16 while the assist mode is being executed. In addition, the electric motor 43 adds the auxiliary driving force to the force of pushing the electric bicycle 2 while the push-walking mode is being executed. In addition, the electric motor 43 adds the auxiliary driving force to the force of pushing the electric bicycle 2 while the self-propelling mode is being executed. In addition, the electric motor 43 adds the auxiliary driving force for the electric bicycle 2 to self-propel while being supported by the user while the self-propelling mode is being executed.
[0041] In this embodiment, the electric motor 43 is housed in a resin or metal housing together with the control device 40 and the like to form a unit. A crank rotation sensor, a torque sensor, and the like are provided inside the housing.
[0042] The control device 40 is realized, for example, by a microcomputer (microcontroller) or the like, and is composed of a non-volatile memory (a semiconductor memory 42 described later) in which applications including programs and the like and trained models are stored, a volatile memory (storage unit) which is a temporary storage area for executing the programs, an input / output port, a processor for executing the programs, etc. The control device 40 may also be realized by a dedicated electronic circuit.
[0043] One or more sensors 30, an electric motor 43, an operation unit 61, a manual switch 62, a battery 63, a headlight, etc. are electrically connected to the control device 40. Operation signals from the operation unit 61 and the manual switch 62, and information indicating detection results from each sensor are input to the control device 40.
[0044] The control device 40 drives the electric motor 43 according to the operation mode of the electric bicycle 2. Specifically, the control device 40 switches between the assist mode, the pushing mode, and the self-propelled mode to execute each mode. The assist mode is executed when the user is riding the electric bicycle 2 after the manual switch 62 is pressed to turn on the power. When executing the assist mode, the control device 40 determines the magnitude of the auxiliary driving force generated by the electric motor 43 based on the force applied to the pedal 16 and the speed of the electric bicycle 2, etc. The pushing mode is executed when the user is not riding the electric bicycle 2, the manual switch 62 is pressed to turn on the power, and the user is pushing the electric bicycle 2. The self-propelled mode is executed when the user is not riding the electric bicycle 2 and is walking while supporting the electric bicycle 2, similar to the pushing mode. In the self-propelled mode, the user is not applying a force to push the electric bicycle 2 forward. In addition, when executing the pushing mode, the control device 40 determines the magnitude of the auxiliary driving force generated by the electric motor 43 based on the pushing force applied to the electric bicycle 2 and the speed of the electric bicycle 2, etc. Furthermore, when the self-propelled mode is executed, the control device 40 determines the magnitude of the predetermined auxiliary driving force to be generated by the electric motor 43.
[0045] Furthermore, the control device 40 supplies power from the battery 63 to the electric motor 43, the one or more sensors 30, the headlights, and the like.
[0046] In the embodiment, the control device 40 is housed inside a housing that houses the electric motor 43, but this is not limiting. The control device 40 may be provided separately from the electric motor 43.
[0047] The notification unit 50 is a communication module capable of wireless or wired communication with an external device. The notification unit 50 can notify the external device of the estimation result of the estimation unit 412 described later. The external device is, for example, a cloud server managed by a servicer that owns multiple vehicles (electric bicycles 2) and rents out the vehicles. The notification unit 50 may also be capable of directly communicating with a terminal device owned by a user riding the electric bicycle 2. The terminal device is, for example, a smartphone, a tablet terminal, a personal computer, or a cycle computer. In this case, the terminal device corresponds to the external device.
[0048] The operation unit 61 is provided, for example, near one of the pair of brake levers 81. The operation unit 61 is an operation terminal such as a cycle computer that is equipped with a light switch (not shown) for turning on the headlights, etc. The operation unit 61 has buttons and the like for accepting operations by the user. The buttons are, for example, a touch panel display or mechanical buttons.
[0049] The operation unit 61 has a display unit that displays the estimation result of the estimation unit 412. The display unit is, for example, a liquid crystal display or an organic EL display. The operation unit 61 may also have an audio unit such as an electronic bell for notifying the estimation result of the estimation unit 412 to the surroundings of the vehicle (electric bicycle 2) by sound. The audio unit may be a speaker that outputs sound. The operation unit 61 may also be a vibration unit for notifying the user of the estimation result of the estimation unit 412 by vibration. The vibration unit may be a vibration generating device having a vibration generating function (vibration function) for transmitting vibration to the user by vibrating the operation unit 61. The vibration generating device may be a vibration motor that generates vibration. The operation unit 61 may also be a light source unit for notifying the user of the estimation result of the estimation unit 412 by light. The light source unit may be an LED module that emits light of a single color or multiple colors.
[0050] The manual switch 62 is a mechanical switch that accepts a push-walking operation or a self-propelled operation for executing the push-walking mode or the self-propelled mode. During a period in which the manual switch 62 is pressed by the user, the operation unit 61 continues to output a mode-on signal for executing the push-walking mode or the self-propelled mode to the control device 40. On the other hand, during a period in which the manual switch 62 is not pressed, the operation unit 61 does not output a mode-on signal to the control device 40.
[0051] When the manual switch 62 is pressed once, the pushed walking mode or the self-propelled mode may be executed without continuing to press the manual switch 62. When the manual switch 62 is pressed again while the pushed walking mode or the self-propelled mode is being executed, the pushed walking mode or the self-propelled mode may be stopped.
[0052] The battery 63 is a storage battery that stores electric power for driving the electric motor 43 and the like. The battery 63 is, for example, a secondary battery, but may also be a capacitor or the like. The battery 63 is electrically connected to the electric motor 43. Specifically, the battery 63 supplies electric power to the electric motor 43 and the like.
[0053] [Control device] Next, a specific description will be given of the control device 40. The control device 40 includes a control unit 41 and a semiconductor memory 42. The control unit 41 executes an application including a program stored in the semiconductor memory 42 to realize the function of an acquisition unit 411 and the function of an estimation unit 412.
[0054] The acquisition unit 411 acquires vehicle information related to the vehicle (electric bicycle 2). In the embodiment, the acquisition unit 411 acquires vibration information as vehicle information from a vibration sensor provided in a target part of the one or more sensors 30 for estimating the state of the vehicle. The vibration information may include, for example, information indicating mechanical vibrations generated in a part of the vehicle (electric bicycle 2), or information indicating sounds generated from a part of the vehicle. In the embodiment, the target part is, for example, a wheel (front wheel 12 or rear wheel 13) of the vehicle. The acquisition unit 411 may acquire vibration information from a vibration sensor provided in the vicinity of the target part, rather than from a vibration sensor provided in the target part. For example, when the target part is a wheel of the vehicle, the acquisition unit 411 may acquire vibration information from a vibration sensor provided in the frame 11.
[0055] The estimation unit 412 estimates the state of the vehicle (electric bicycle 2) based on the vehicle information acquired by the acquisition unit 411. For example, the estimation unit 412 estimates the state of a part provided in the vehicle as the state of the vehicle. In other words, the estimation unit 412 estimates the state of a target part as the state of the vehicle. In the embodiment, the estimation unit 412 estimates the state of the wheels of the vehicle (here, the air pressure of the tires 12a, 13a) based on the vibration information acquired by the acquisition unit 411.
[0056] The estimation unit 412 estimates the air pressure of the tires 12a, 13a from the vibration information using a trained model constructed in advance by machine learning using teacher data. That is, by constructing in advance a trained model that uses vibration information as input and performs machine learning to output whether the air pressure of the tires 12a, 13a is equal to or lower than a specified value, the estimation unit 412 can estimate whether the state of the target part (here, the state of the wheels of the vehicle) is abnormal or normal. The estimation unit 412 outputs the estimation result to an external device via the notification unit 50, or outputs it to the operation unit 61 to notify the surroundings of the vehicle.
[0057] The semiconductor memory 42 is a non-volatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) or a flash memory. The semiconductor memory 42 stores an application that realizes the functions of the acquisition unit 411 and the estimation unit 412, and a trained model that is referred to when the application is executed. In addition, the semiconductor memory 42 stores a boot loader.
[0058] 3, a boot loader is stored in a first area A1 in a non-volatile memory area of the semiconductor memory 42, an application that references a trained model is stored in a second area A2 different from the first area A1, and the trained model is stored in a third area A3 different from the first area A1 and the second area A2. In other words, in the non-volatile memory area of the semiconductor memory 42, the first area A1 in which the boot loader is stored, the second area A2 in which the application is stored, and the third area A3 in which the trained model is stored are logically separated.
[0059] [How to write data] Next, a method for writing data to the semiconductor memory 42 will be described. Fig. 3 is an explanatory diagram of the data writing method according to the embodiment. Fig. 3(a) is a diagram showing an example of a semiconductor memory 100 into which data has been written by the data writing method of the comparative example. Fig. 3(b) is a diagram showing an example of a semiconductor memory 42 into which data has been written by the data writing method according to the embodiment.
[0060] First, a data writing method of the comparative example will be described. As shown in (a) of Fig. 3, in the data writing method of the comparative example, a boot loader is written to a first area A1 in a non-volatile memory area of the semiconductor memory 100, and an application in which a trained model is incorporated is written to a second area A2. In the example shown in (a) of Fig. 3, a boot loader is stored in the first area A1 indicated by addresses 0x08000000 to 0x08007fff of the semiconductor memory 100, and an application in which a trained model is incorporated is stored in the second area A2 indicated by addresses 0x08008000 to 0x0803ffff.
[0061] As described above, in the semiconductor memory 100 into which data is written using the data writing method of the comparative example, the trained model is integrated with the application, and the trained model cannot be treated equivalently to a parameter, resulting in the following problems:
[0062] That is, unless the estimation unit 412 uses a trained model corresponding to the type of vehicle (electric bicycle 2), it may not be possible to estimate the state of the vehicle with sufficient accuracy. The type of vehicle is determined, for example, by the types of parts (for example, frame 11, or tires 12a, 13a, etc.) that the vehicle has. For this reason, it is necessary to create and manage a trained model for each type of vehicle.
[0063] However, in the semiconductor memory 100, since the trained model is integrated with the application, in order to prepare multiple types of trained models, multiple types of applications must be prepared in the same number as the number of types of trained models. In other words, when manufacturing the semiconductor memory 100, an application in which a trained model is incorporated must be created and managed for each type of vehicle. In addition, in the data writing method of the comparative example, it is necessary to write an application in accordance with the type of vehicle in which the trained model is incorporated into the semiconductor memory 100, rather than writing only the trained model into the semiconductor memory 100 according to the type of vehicle. For this reason, the data writing method of the comparative example has a problem in that it is difficult to write the trained model into the semiconductor memory 100.
[0064] In contrast, in the data writing method according to the embodiment, as shown in (b) of Fig. 3, a boot loader is written to a first area A1 in a non-volatile memory area of the semiconductor memory 42, an application that refers to a trained model is written to a second area A2, and the trained model is written to a third area A3. In the example shown in (b) of Fig. 3, the boot loader is stored in the first area A1 indicated by addresses 0x08000000 to 0x08007fff of the semiconductor memory 42, the application is stored in the second area A2 indicated by addresses 0x08008000 to 0x08037fff, and the trained model is stored in the third area A3 indicated by addresses 0x08038000 to 0x0803ffff. In other words, in the semiconductor memory 42, just as the second area A2 in which applications are stored in the non-volatile memory area is fixed relative to the first area A1 in which the boot loader is stored, the third area A3 in which the trained model is stored is fixed relative to the first area A1 and the second area A2 in which the boot loader and applications are stored, respectively.
[0065] As described above, in the semiconductor memory 42 in which data is written by the data writing method according to the embodiment, the trained model is separated from the application, and the trained model can be treated equivalently to a parameter, so that the above problem can be solved. That is, in the semiconductor memory 42, it is only necessary to prepare a trained model for each type of vehicle, and it is not necessary to prepare multiple types of applications in the same number as the number of types of trained models. Specifically, in the semiconductor memory 42, it is only necessary to prepare a common application that can refer to each of the multiple types of trained models as a parameter. Therefore, when manufacturing the semiconductor memory 42, it is only necessary to create and manage only the trained model for each type of vehicle. And, in the data writing method according to the embodiment, it is only necessary to write only the trained model to the semiconductor memory 42, not the application in which the trained model is incorporated, so that there is an advantage that the trained model can be easily written to the semiconductor memory 42.
[0066] Below, examples of writing a trained model to the semiconductor memory 42 in the data writing method according to the embodiment will be listed.
[0067] <First post example> 4 is a flowchart showing a first writing example of the data writing method according to the embodiment. The first writing example is performed when writing a trained model corresponding to the type of vehicle (electric bicycle 2) at the stage of manufacturing the semiconductor memory 42 in a factory or the like.
[0068] In the first writing example, a data writing device such as a computer installed in a factory executes the data writing method. Specifically, as shown in Fig. 4, when the data writing device receives an instruction to select one type of vehicle from multiple types of vehicles during the manufacture of the semiconductor memory 42 (S11), the data writing device acquires a trained model corresponding to the selected one type of vehicle (S12). Then, the data writing device writes the acquired trained model into the third area A3 of the semiconductor memory 42 (S13).
[0069] In addition, in step S11, the data writing device acquires the trained model by reading out a trained model corresponding to one type of vehicle from multiple types of trained models corresponding to each of multiple types of vehicles that are pre-stored, for example, in an internal memory or an external storage device.
[0070] FIG. 5 is a schematic diagram showing an example of a user interface used in the first writing example. FIG. 5 shows a screen displayed on a display 200 provided in the data writing device. As shown in FIG. 5, the screen displays character strings each representing a plurality of types of vehicles (six types in this case), option buttons 201 corresponding to each character string, a first button 202 for inputting an instruction to write the trained model to the semiconductor memory 42, and a second button 203 for inputting an instruction to confirm whether the trained model has been correctly written to the semiconductor memory 42. The worker selects the option button 201 corresponding to the desired vehicle type, and then selects the first button 202. As a result, the data writing device accepts an instruction to select one type of vehicle from the plurality of types of vehicles.
[0071] <Second example> 6 is a flowchart showing a second writing example of the data writing method according to the embodiment. The second writing example is performed, for example, when a user of a vehicle (electric bicycle 2) selects a trained model to be used from multiple types of trained models and writes it to the semiconductor memory 42. The second writing example is also performed, for example, when a trained model has been written to the semiconductor memory 42 and the trained model is to be overwritten with an updated trained model or a new trained model.
[0072] In the second writing example, a data writing device such as a computer executes the data writing method by receiving an instruction transmitted from an information processing terminal 300 such as a smartphone (see FIG. 7) carried by a user. Specifically, as shown in FIG. 6, after manufacturing the semiconductor memory 42, when the data writing device receives an instruction to select one type of trained model from a plurality of types of trained models (S21), the data writing device acquires the selected one type of trained model (S22). Then, the data writing device writes the acquired trained model into the third area A3 of the semiconductor memory 42 (S23).
[0073] In addition, in step S21, the data writing device acquires one type of trained model by reading the trained model from multiple types of trained models pre-stored in, for example, an internal memory or an external storage device.
[0074] FIG. 7 is a schematic diagram showing an example of a user interface used in the second writing example. FIG. 7 shows a screen displayed on a display provided in the information processing terminal 300. As shown in FIG. 7, icons 301 each representing a plurality of types (three types here) of trained models are displayed on the screen. The user selects the icon 301 corresponding to the desired type of trained model. This causes the data writing device to accept an instruction to select one type of trained model from the plurality of types of trained models.
[0075] (Other variations, etc.) Although the present disclosure has been described above based on the embodiments, the present disclosure is not limited to these embodiments.
[0076] For example, in the above embodiment, there may be multiple semiconductor memories 42. Fig. 8 is a block diagram illustrating an electric bicycle 2A according to a modified embodiment. As shown in Fig. 8, in the electric bicycle 2A according to this modified embodiment, the control device 40 is equipped with multiple (here, two) semiconductor memories 42. The multiple semiconductor memories 42 include a first semiconductor memory 421 having a first area A1 and a second area A2, and a second semiconductor memory 422 having a third area A3.
[0077] As described above, the semiconductor memory 42 in which the trained model is stored (here, the second semiconductor memory 422) may be physically separated from the semiconductor memory 42 in which the boot loader and the application are stored (here, the first semiconductor memory 421). This aspect has the advantage that the second semiconductor memory 422 can be prepared according to the memory capacity required by the trained model, making it easier to write the trained model to the semiconductor memory 42 without worrying about limitations on the available memory capacity.
[0078] Also, for example, in the above embodiment, the number of trained models written to the semiconductor memory 42 is not limited to one, and may be multiple. In this case, in the non-volatile memory area of the semiconductor memory 42, the multiple trained models are written to multiple third areas A3, respectively.
[0079] Also, for example, in the above embodiment, the trained model may be a model that estimates a physical quantity other than the air pressure of the tires 12a, 13a of the vehicle. In other words, the trained model may be a model that receives the vehicle information acquired by the acquisition unit 411 as an input and outputs an estimation result of the state (physical quantity) of the vehicle.
[0080] Moreover, each processing unit used in the electric bicycle 2 (vehicle) according to each of the above embodiments is realized as an LSI, which is typically an integrated circuit. These may be individually implemented as single chips, or may be integrated into a single chip that includes some or all of them.
[0081] The integrated circuit is not limited to an LSI, but may be realized by a dedicated circuit or a general-purpose processor. A field programmable gate array (FPGA) that can be programmed after the LSI is manufactured, or a reconfigurable processor that can reconfigure the connections and settings of the circuit cells inside the LSI may also be used.
[0082] In the above embodiment, each component may be realized by a dedicated hardware or by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.
[0083] Furthermore, all the numbers used above are merely examples for the purpose of specifically explaining the present disclosure, and the embodiments of the present disclosure are not limited to the numbers exemplified.
[0084] In addition, the division of functional blocks in the block diagram is an example, and multiple functional blocks may be realized as one functional block, one functional block may be divided into multiple blocks, or some functions may be transferred to another functional block. Furthermore, the functions of multiple functional blocks having similar functions may be processed in parallel or in a time-sharing manner by a single piece of hardware or software.
[0085] In addition, the order in which each step is performed in the flowchart is merely for illustrative purposes and may be other than the above. In addition, some of the steps may be performed simultaneously (in parallel) with other steps.
[0086] In addition, the present disclosure also includes forms obtained by applying various modifications to the embodiments that a person skilled in the art may conceive, and forms realized by arbitrarily combining the components and functions of the embodiments within the scope that does not deviate from the spirit of the present disclosure.
[0087] (summary) The effects of the data writing method, the program, and the vehicle according to the embodiments will be described below.
[0088] As described above, the data writing method according to the first aspect of the present disclosure includes a first step (S11, S12, S21, S22) and a second step (S13, S23). In the first step, a trained model that has been machine-learned in advance to estimate the state of a vehicle that is either a human-powered vehicle or an electric bicycle 2, 2A is acquired. In the second step, the trained model acquired in the first step is written to a third area A3 in the non-volatile memory area of the semiconductor memory 42, which is different from both the first area A1 in which a boot loader is stored and the second area A2 in which an application that references the trained model is stored.
[0089] This has the advantage that it is easy to write the trained model to the semiconductor memory 42, since it is necessary to write only the trained model to the semiconductor memory 42, not the application in which the trained model is embedded.
[0090] In the data writing method according to the second aspect of the present disclosure, in the first aspect, the trained model is a model that estimates the air pressure of tires 12a, 13a of a vehicle.
[0091] This has the advantage that it is possible to create a semiconductor memory 42 having a trained model for estimating the air pressure of the tires 12a, 13a of a vehicle.
[0092] In addition, in the data writing method according to the third aspect of the present disclosure, in the first or second aspect, in a first step, when an instruction to select one type of vehicle from multiple types of vehicles is received during the manufacture of the semiconductor memory 42 (S11), a trained model corresponding to the one type of vehicle is obtained (S12).
[0093] According to this, for example, when a worker at a factory or the like selects a trained model according to the type of vehicle, the trained model is written to the semiconductor memory 42, which has the advantage that it becomes easier to write a trained model according to the type of vehicle to the semiconductor memory 42.
[0094] In addition, in a data writing method according to a fourth aspect of the present disclosure, in any one of the first to third aspects, in a first step, after manufacturing the semiconductor memory 42, when an instruction to select one type of trained model from multiple types of trained models is received (S21), the one type of trained model is acquired (S22).
[0095] According to this, for example, if a user selects a desired type of trained model, the trained model is written to the semiconductor memory 42, which has the advantage that it is easier for the user to write the desired trained model to the semiconductor memory 42.
[0096] In addition, in a data writing method according to a fifth aspect of the present disclosure, in any one of the first to fourth aspects, there are multiple semiconductor memories 42, and the multiple semiconductor memories 42 include a first semiconductor memory 421 having a first area A1 and a second area A2, and a second semiconductor memory 422 having a third area A3.
[0097] This has the advantage that a second semiconductor memory 422 can be prepared according to the memory capacity required by the trained model, making it easier to write the trained model to the semiconductor memory 42 without worrying about limitations on available memory capacity.
[0098] A program according to a sixth aspect of the present disclosure causes one or more processors to execute the data writing method according to any one of the first to fifth aspects.
[0099] This has the same advantages as the data writing method described above.
[0100] A vehicle according to a seventh aspect of the present disclosure is any one of a human-powered vehicle or an electric bicycle 2, 2A, and includes a vehicle body (frame) 11, a semiconductor memory 42 into which data is written by the data writing method according to any one of the first to fifth aspects, and a control unit 41. The control unit 41 references a trained model stored in a third area A3 of the semiconductor memory 42 and executes an application stored in the second area A2.
[0101] This has the same advantages as the data writing method described above. [Explanation of symbols]
[0102] 11 Frame (body) 12a,13a Tires 2,2A Electric bicycle (vehicle) 42 Semiconductor Memory 421 First Semiconductor Memory 422 Second semiconductor memory A1 1st area A2 2nd area A3 Third area
Claims
1. A first step of acquiring a trained model that has been machine-learned in advance to estimate a state of a vehicle that is either a human-powered vehicle or an electric bicycle; A second step of writing the trained model acquired in the first step to a third area different from both a first area in which a boot loader is stored and a second area in which an application that references the trained model is stored in a non-volatile memory area of a semiconductor memory. Data writing method.
2. The trained model is a model for estimating tire pressure of the vehicle.
2. The data writing method according to claim 1.
3. In the first step, when an instruction to select one type of vehicle from a plurality of types of vehicles is received during manufacturing of the semiconductor memory, the trained model corresponding to the one type of vehicle is acquired.
3. The data writing method according to claim 1 or 2.
4. In the first step, after manufacturing the semiconductor memory, when an instruction to select one type of trained model from a plurality of types of trained models is received, the one type of trained model is acquired.
3. The data writing method according to claim 1 or 2.
5. The semiconductor memory is a plurality of memories, the plurality of semiconductor memories include a first semiconductor memory having the first region and the second region, and a second semiconductor memory having the third region; 3. The data writing method according to claim 1 or 2.
6. One or more processors, 3. A method for writing data according to claim 1 or 2, program.
7. Either a human-powered vehicle or an electric bicycle, The car body and A semiconductor memory having data written therein by the data writing method according to claim 1 or 2; A control unit that executes the application stored in the second area by referring to the trained model stored in the third area of the semiconductor memory. vehicle.
Citation Information
Patent Citations
Monitoring system for bicycle
JP2023050763A