I am just learning solo/improv skill so "Grain of Salt" as I am no means an expert. but hey I get by without.. anyhow I digress.
my two methods are sort of mentioned above.
I have a 30sec looper on my B1Xon. this has been a ton of fun in and of itself. With it I can make a beat (even though there are a ton of drum tracks, its far more organic when I make my own dead notes and thumps up on the spot) layer a simple bass line over that, (or even a drone) then layer some power chords on that. once all that is going I go noodle city and try to come up with some thing that resembles someone actually soloing in the moment.
I also have an old Yamaha keyboard with a lot of backing tracks I can get down to. lots of different styles to mash out to.
my other approach (a bit more practical) is to load up my Blues set list, sometimes through my amp with an aux cord. Ill play the bass lines as normal till solo time.
then Ill do two things.
first I will try to emulate the guitarists solo on my base. Key word on TRY

so it obviously wont sound exactly like a guitar, but Im trying to draw from the inspiration. so a bend here, a trill there, and a long note here then some shreddy stuff when it sounds appropriate.
The second step is to try to come up with
my own solo while staying in that key and following the I IV V (for now, gotta crawl first ya know) either on the same track repeated, or on the next track in the list.
I am just a hobby-ist Bassist, but I go the weekly open jam a cpl times a month and am working my way up to taking some solos. these steps are growing my confidence.
I do not have a ton of 'formal' training. but I have a ton of fun learning and playing out

and that is what its about right!
rock on monn