Well, here's my idea on walk-ups or walk-downs in a bass line, and this comes from my bass playing and not my guitar playing. I'm not skilled enough with the guitar to do a reasonable walk-down. So, bear that in mind.
Let's say you're going from G to D. I'd use the second and third notes in the G chord and then jump right to D (the fifth). If you're playing a blues song, use a flatted third. That's a practical walk-up.
Sometimes what I like to do is to jump to the octave, so I'll play a low G on the third fret of the E string then jump up to the fifth fret on the D string to hit another G and then use the flatted seventh, the sixth, and then on down to the fifth. There's a practical walk-down.
Another bit of advice is that if you play your walk-ups and walk-downs really fast and hit a wrong note that isn't emphasized, you can just shrug and say "That's the blues, baby. That's the blues."
Anyway, the point is that I pretend that the base chord from which you're changing is a scale, and then I use select notes from that scale - mostly the second, the third (or flatted third), the fourth, and the flatted seventh (and less often the seventh, but that has a very bright feel to it and I am usually playing bass for folk or blues and don't want so much of a "major" feel - it works good for Country though).
I'm not saying this is "right". I'm just saying it's what I do.
Hope that helps. If not, a person with actual knowledge will be along directly to help you.